diff --git a/README.md b/README.md index 01ca3cc..ba80760 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,14 @@ apc configure ## Command Reference +### CLI Basics + +```bash +# Check the installed version +apc --version +# apc, version 0.1.1 +``` + ### Core Workflow | Command | Description | @@ -117,7 +125,7 @@ apc configure | `--all` | Apply to all detected tools without prompting | | `--no-memory` | Skip memory entries | | `--override-mcp` | Replace existing MCP servers instead of merging | -| `--dry-run` | Show what would be applied without writing | +| `--dry-run` | Show files that would be written without writing | | `--yes`, `-y` | Skip confirmation prompts | ### Skills @@ -142,7 +150,6 @@ apc configure | Flag | Description | |------|-------------| | `--skill`, `-s` | Skill name(s) to install (repeatable, or `'*'` for all) | -| `--target`, `-t` | Target tool(s) to install to (repeatable, or `'*'` for all detected) | | `--branch` | Git branch to fetch from (default: `main`) | | `--list` | List available skills without installing | | `--yes`, `-y` | Skip confirmation prompts | @@ -260,6 +267,23 @@ apc configure --provider custom --base-url "http://localhost:11434/v1" \ **Supported LLM providers:** Anthropic, OpenAI, Google Gemini, Qwen (Alibaba), GLM (Zhipu), MiniMax, Kimi (Moonshot), and any OpenAI-compatible or Anthropic-compatible endpoint. +## Shell Completion + +APC is built on [Click](https://click.palletsprojects.com/) which has built-in shell completion support. + +```bash +# Bash — add to ~/.bashrc +echo 'eval "$(_APC_COMPLETE=bash_source apc)"' >> ~/.bashrc + +# Zsh — add to ~/.zshrc +echo 'eval "$(_APC_COMPLETE=zsh_source apc)"' >> ~/.zshrc + +# Fish — add to ~/.config/fish/completions/apc.fish +echo 'eval (env _APC_COMPLETE=fish_source apc)' >> ~/.config/fish/completions/apc.fish +``` + +Reload your shell (`source ~/.bashrc` / `source ~/.zshrc`) after adding the line. + ## Development ```bash diff --git a/src/main.py b/src/main.py index ed5b450..44ead0a 100644 --- a/src/main.py +++ b/src/main.py @@ -19,9 +19,16 @@ warning, ) +try: + from importlib.metadata import version as _pkg_version + + _apc_version = _pkg_version("apc-cli") +except Exception: + _apc_version = "0.1.1" + @click.group() -@click.version_option(version="0.1.1", prog_name="apc") +@click.version_option(version=_apc_version, prog_name="apc") def cli(): """apc — AI Personal Context manager.