Skip to content

feat(cli): add deepcode completion <bash|zsh|fish> (Codex parity)#152

Merged
oratis merged 1 commit into
mainfrom
feat/cli-completion
Jun 3, 2026
Merged

feat(cli): add deepcode completion <bash|zsh|fish> (Codex parity)#152
oratis merged 1 commit into
mainfrom
feat/cli-completion

Conversation

@oratis

@oratis oratis commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

Codex ships codex completion <shell>; DeepCode had no shell completion at all. This adds a completion subcommand that prints a bash / zsh / fish completion script covering the top-level flags and subcommands. Unknown or missing shell prints a usage message and exits 2.

Install examples:

  • bash: eval "$(deepcode completion bash)"
  • zsh: deepcode completion zsh > "${fpath[1]}/_deepcode"
  • fish: deepcode completion fish > ~/.config/fish/completions/deepcode.fish

Test plan

  • pnpm typecheck
  • pnpm --filter deepcode-cli test — 109 passing, incl. 8 new tests (per-shell script content, isCompletionShell, runCompletion exit codes)
  • Smoke-tested the built CLI: node dist/cli.js completion bash|fish emit valid scripts; completion powershell → usage + exit 2
  • prettier --check + eslint clean
  • CI green (ubuntu + macOS)

Documentation

  • --help text updated (new completion line). Flag/subcommand lists carry a note to keep them in sync with parse-args.ts.

Release notes label

  • release-notes:feature

Related

Codex/Claude Code/DeepCode capability-alignment review. Codex parity: codex completion.

Codex ships `codex completion`; DeepCode had no shell completion. Adds a
`completion` subcommand that prints a bash / zsh / fish completion script
covering the top-level flags and subcommands. Unknown or missing shell prints a
usage message and exits 2.

Smoke-tested end-to-end (`node dist/cli.js completion bash|fish`) plus 8 unit
tests. Flag/subcommand lists live in completion.ts with a note to keep them in
sync with parse-args.ts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit 36136c4 into main Jun 3, 2026
3 checks passed
@oratis oratis deleted the feat/cli-completion branch June 3, 2026 17:04
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