Skip to content

docs(cli): drop the attach command from the CLI reference - #58204

Closed
LuisAlbertoMK wants to merge 1 commit into
anomalyco:devfrom
LuisAlbertoMK:remove-attach-docs
Closed

LuisAlbertoMK wants to merge 1 commit into
anomalyco:devfrom
LuisAlbertoMK:remove-attach-docs

Conversation

@LuisAlbertoMK

@LuisAlbertoMK LuisAlbertoMK commented Oct 22, 2026 •

Copy link
Copy Markdown

Issue for this PR

Part of #57957 (the attach row). It should not close the issue: six other command sections in that checklist are still stale.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

opencode attach is not a v2 command. It exits 1 and prints the root usage, because the word is read as the project directory. Connecting to a server is the root --server flag now, and the flag table never documented it.

So the attach section is removed from cli.mdx and every locale, the same way the removed agent command was cleaned up in #57419. --server and --standalone are added to the root flag table, with the descriptions from packages/cli/src/commands/commands.ts. The run section is fixed in the same pass, because its example and flag row still passed --attach.

The rest of the checklist is untouched. Whether each remaining section should be dropped or rewritten is your call, and one PR doing all seven would be harder to review.

How did you verify your code works?

Against a source build of dev (cdf1c200a6), from packages/cli:

  • bun run src/index.ts --help lists --server and --standalone with the exact descriptions now in the table.
  • bun run src/index.ts run --help has --server and no --attach.
  • bun run src/index.ts attach http://localhost:4096 exits 1 with the root usage.
  • All 18 cli.mdx files still have balanced code fences, and the deleted block ends right before ### auth in every locale. Locale diffs are deletions only (0 insertions), so no encoding or line-ending churn.
  • prettier output for cli.mdx is byte-identical to the file.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #57957

opencode attach is not a v2 command. It exits 1 and prints the root usage, because the word is read as the project directory. Connecting to a server is the root --server flag now, and the flag table never documented it.

Remove the section from every locale, matching the cleanup of the removed agent command in anomalyco#57419. Document --server and --standalone in the root flag table, and fix the run example that still passed --attach.

Part of anomalyco#57957.
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Oct 22, 2026
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The English cli.mdx changes are correct. The new --server / --standalone rows match the flag definitions in packages/cli/src/commands/commands.ts word for word, and run takes --server with no --attach. This is docs only, so there was nothing to run. No public API changes.

  1. The translated pages are only partly fixed. The 17 locale cli.mdx files had their attach section removed. But they still show opencode run --attach http://localhost:4096 and an --attach row in the run flag table (around lines 274 and 290). None of them got the root --server / --standalone rows. A reader of a translated page still gets a flag that doesn't exist. Please make the same run and root-table edits in each locale, or remove the locale files from this pull request and leave them for a follow-up, so the description matches what changes.
  2. web.mdx still mentions opencode attach. Its "Attaching a Terminal" section, in English and all 17 locales, still says to run opencode attach http://localhost:4096. It could be switched to opencode --server <url> here or in a follow-up. Otherwise the docs still point at the missing command.

#58016 also removes the English attach section, so the two will conflict there.

Related: #57957

@LuisAlbertoMK

Copy link
Copy Markdown
Author

Closing this in favor of #58016, which was opened earlier and does the same removal on the English page, including moving export/import under session. No reason to make a maintainer read the same deletion twice.

The parts of this PR that #58016 does not cover moved to #58207: the same removal for the 17 translated cli.mdx files, and the run section, which still passed --attach.

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