Skip to content

Commit 6177ff7

Browse files
committed
docs(cli): document the completion command
opencode completion appears in the CLI help but is missing from the CLI reference. Also note that the credentials command is available as opencode providers.
1 parent 5c52626 commit 6177ff7

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

  • packages/web/src/content/docs

‎packages/web/src/content/docs/cli.mdx‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ opencode attach http://10.20.30.40:4096
129129

130130
### auth
131131

132-
Command to manage credentials and login for providers.
132+
Command to manage credentials and login for providers. Also available as `opencode providers`.
133133

134134
```bash
135135
opencode auth [command]
@@ -655,6 +655,24 @@ opencode upgrade v0.1.48
655655

656656
---
657657

658+
### completion
659+
660+
Generates a shell completion script for the CLI.
661+
662+
```bash
663+
opencode completion
664+
```
665+
666+
The script is written to stdout, so append it to your shell profile to enable tab completion for `opencode`.
667+
668+
```bash
669+
opencode completion >> ~/.bashrc
670+
```
671+
672+
On macOS, append it to `~/.bash_profile` instead.
673+
674+
---
675+
658676
## Global Flags
659677

660678
The opencode CLI takes the following global flags.

0 commit comments

Comments
 (0)