cc config shell
Manage cc's shell integration — the cc function, daemon auto-start, prompt-segment
helper, and tab-completion that get written to your rc file.
Usage
cc config shell # status (default)
cc config shell status # check whether integration is installed
cc config shell install # install/reinstall for current shell
cc config shell install --shell fish # force fish even if zsh is detected
cc config shell install --force # reinstall when already installedArguments
| Argument | Description |
|---|---|
action | status (default) or install |
Flags
| Flag | Description |
|---|---|
--shell {zsh|bash|fish} | Force a specific shell (auto-detected from parent process / $SHELL otherwise) |
-f, --force | Reinstall even when integration is already in place |
Actions
| Action | Description |
|---|---|
status (default) | Print whether integration is installed for the detected shell |
install | Write the integration file + append source line to your rc file |
What it installs
Writes a small shell file (~/.cc-cli/shell/cc.zsh, cc.bash, or cc.fish) that defines:
ccshell function — wraps the CLI with aCC_RUN_FILEenv var. Letscc switch/cc cd/ switch hooks change your shell's working directory and activate pyenv venvs by writing shell commands that getsourced in the parent shell.- Daemon auto-start — silently starts
cc daemonif the socket isn't already up. - Prompt helper — a powerlevel10k segment (
cc_env) / bash-fish equivalent (__cc_env_segment) showing the active environment name, read directly from~/.cc-cli/cc_cli.dbfor zero latency. - Tab-completion — a native completion script (see
cc config completion) generated from the live CLI, with values pulled from SQLite at TAB time. This is what makescc <TAB>work.
Then appends a source ~/.cc-cli/shell/cc.zsh line (or bash/fish equivalent) to your ~/.zshrc / ~/.bashrc / ~/.config/fish/config.fish.
After install
source ~/.zshrc # or source ~/.config/fish/config.fishTo pick up the function in the current terminal. New terminals get it automatically.
For zsh + powerlevel10k users, add cc_env to POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS in
~/.p10k.zsh. For bash add $(__cc_env_segment) to your PS1; for fish add
__cc_env_segment to your fish_right_prompt.
When to use this manually
cc setup installs shell integration automatically on first run. Use cc config shell install standalone when:
- Your dotfiles got reset and the source line is gone
- You switched from zsh to fish (or vice versa)
- The
ccfunction stopped working and you want to reinstall fresh
Related
cc config completion— the completion script this installscc setup— first-time wizard (includes shell integration as a step)cc daemon— daemon lifecycle (auto-start lives in the shell integration)