Repository navigation
docs: describe agent creation without the removed CLI command - #57419
Conversation
`opencode agent create` and `opencode agent list` are documented on the CLI and Agents pages, but the v2 CLI has no `agent` command, so both fail with "Unexpected positional argument". Remove the stale CLI reference and document creating an agent as a markdown file, with `opencode debug agents` to list the agents OpenCode has loaded.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
Looks good. The v2 CLI has no agent command (only debug agents), and the new text matches what v2 actually loads: markdown files under {agent,agents}/ in the project .opencode/ folder or the global config folder, with the #markdown link pointing to the existing section. opencode debug agents does list the loaded agents. Nothing was run because this only changes docs. No other English docs page still mentions opencode agent. The translated pages still describe the command, as the description notes.
Public API: unchanged (docs only).
|
translation sync ci hasn't run in a while so doing this manually for now |
Issue for this PR
Closes #57406
Type of change
What does this PR do?
opencode agent createandopencode agent listare documented on the CLI and Agents pages, but the v2 CLI has noagentcommand. Running either prints:packages/web/src/content/docs/cli.mdx: remove theagentcommand section (createflags andlist).packages/web/src/content/docs/agents.mdx: replace the interactiveagent createinstructions with the supported workflow — add a markdown file under.opencode/agents/or~/.config/opencode/agents/— and point at the existing Markdown section that documents the file format.packages/web/src/content/docs/agents.mdx: mentionopencode debug agents, which prints the agents OpenCode has loaded.The locale copies under
packages/web/src/content/docs/<locale>/still describe the removed commands; I left them alone because translations are synced separately.How did you verify your code works?
opencode agent createreturnsUnexpected positional argument: "create"on v2.1.0, and the command map inpackages/cli/src/index.tshas noagententry.opencode debug agentsis registered (debug.agents) and lists the loaded agent catalog.bunx prettier --checkpasses on both edited files.Screenshots / recordings
Not a UI change.
Checklist