Skip to content

Give the code samples --project-url and --project-api-key - #94

Merged
curquiza merged 1 commit into
mainfrom
code-samples-project-url
Nov 10, 2026
Merged

curquiza merged 1 commit into
mainfrom
code-samples-project-url

Conversation

@curquiza

Copy link
Copy Markdown
Member

What

Every sample (178) of .code-samples.meilisearch.yaml now runs its command with --project-url and --project-api-key, on one line after the command name. The samples no longer start with meili config set:

meili index view \
  --project-url MEILISEARCH_URL --project-api-key API_KEY \
  --id movies

A sample is now one command. The other flags go on the next lines, and the line breaks that were already there stay.

Contract

  • The command name and flags derive from its routes: no command changes
  • Output goes through src/lib/output.ts, errors through src/lib/errors.ts: no code changes
  • The command never waits for a human: no command changes
  • The description starts with one short sentence: no command changes
  • What the user types sends analytics: no command changes
  • The command never speaks HTTP itself: no command changes

Tests

  • --help snapshot: no command changes
  • JSON output snapshot: no command changes
  • Integration test: no command changes
  • pnpm lint, pnpm typecheck, pnpm test pass locally: lint and typecheck pass. In pnpm test, every unit and contract test passes, test/contract/docs.test.ts included. The integration tests fail because no local Meilisearch was running; they fail the same way on main.

Simplicity

  • Nothing in the diff exists for a case the API cannot produce
  • Nothing shared added

Docs

  • docs/contract/: nothing to update
  • The ADRs: nothing touched
  • No accepted ADR was edited
  • New or changed prose follows rule 17: rule 19 of CLAUDE.md and the code samples step of .claude/skills/add-command/SKILL.md describe the new shape
  • .code-samples.meilisearch.yaml updated: this is the change itself

Housekeeping

  • oclif.manifest.json: no command changes
  • Changeset: the change is invisible to users of the package
  • No new dependency

Notes for the reviewer

One script on the file. Each sample keeps its own key: MASTER_KEY for the key samples, API_KEY for the others.

🤖 Generated with Claude Code

Every sample of .code-samples.meilisearch.yaml runs its command with
--project-url and --project-api-key on one line, and no longer starts
with meili config set.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@curquiza
curquiza merged commit f5ba7d0 into main Nov 10, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant