Skip to content

feat(cli): add ccc version - #245

Merged
badmonster0 merged 1 commit into
cocoindex-io:mainfrom
junzh0u:feat/ccc-version
Jul 31, 2026
Merged

feat(cli): add ccc version#245
badmonster0 merged 1 commit into
cocoindex-io:mainfrom
junzh0u:feat/ccc-version

Conversation

@junzh0u

@junzh0u junzh0u commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Adds ccc version, which prints the CLI version.

Today the version is only reachable through ccc daemon status or ccc doctor, and both report it by connecting to the daemon. That leaves no answer to "what version are you on?" for the case where it matters most — a user whose daemon won't start, filing a bug. ccc version answers offline: no project discovery, no settings, no daemon.

It reads the same _version.__version__ the daemon handshake compares against, so the CLI and the version check can't drift apart.

Try it

$ ccc version
0.2.40.dev1+gbeba2cfc8

Works from any directory — no initialized project, no global settings, no running daemon required. It shows up in the top-level help alongside the rest:

$ ccc --help
╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ init     Initialize a project for cocoindex-code.                            │
│ index    Create/update index for the codebase.                               │
│ search   Semantic search across the codebase.                                │
│ grep     Structurally grep code by example (no index or daemon required).    │
│ status   Show project status.                                                │
│ reset    Reset project databases and optionally remove settings.             │
│ doctor   Check system health and report issues.                              │
│ mcp      Run as MCP server (stdio mode).                                     │
│ version  Print the CLI version.                                              │
│ daemon   Manage the daemon process.                                          │
╰──────────────────────────────────────────────────────────────────────────────╯

Operational impact

None. Purely additive — a new subcommand, no change to existing commands, settings, protocol, or on-disk state. No migration. The daemon's version reporting stays exactly where it was in ccc daemon status and ccc doctor; this reports the client's, which can legitimately differ from a running daemon's.

Docs updated: README command table and the CLAUDE.md subcommand list.

🤖 Generated with Claude Code

Until now the only way to learn the version was `ccc daemon status` or
`ccc doctor`, both of which require reaching the daemon — so a user
whose daemon won't start had no way to report what client they're on.

`ccc version` prints the client version offline: no project discovery,
no daemon, no settings. It reuses the same `_version.__version__` the
daemon handshake compares against, so the CLI and the protocol check
can't disagree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YGCBE6RbF1uvvPYjfCUoW
@badmonster0
badmonster0 requested a review from georgeh0 July 30, 2026 19:42
@badmonster0
badmonster0 merged commit 66bbb42 into cocoindex-io:main Jul 31, 2026
4 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.

2 participants