cf install

Install the Coding Friend plugin into Claude Code or Codex CLI from the terminal.

Overview

cf install installs the Coding Friend plugin for the selected host. Claude Code is the default; Codex CLI is opt-in with --agent codex or --codex.

Usage

cf install              # Interactive — asks which scope to use
cf install --user       # Install at user scope (all projects)
cf install --global     # Same as --user
cf install --project    # Install at project scope (shared via git)
cf install --local      # Install at local scope (this machine only)
cf install --agent codex # Register Codex marketplace + enable plugin config
cf install --codex       # Alias for --agent codex

Scopes

Scope flags apply to Claude Code installs. Codex CLI uses Codex's own global plugin marketplace plus project setup from cf init --agent codex.

ScopeFlagSettings fileUse case
User--user / --global~/.claude/settings.jsonPersonal use across all projects
Project--project.claude/settings.jsonTeam-shared plugin (via git)
Local--local.claude/settings.local.jsonThis machine only (gitignored)

Read more about Claude Code scopes here.

Regardless of scope, Claude Code always downloads the plugin to a shared cache directory (~/.claude/plugins/cache/). The scope only controls where the plugin is referenced — i.e., which settings file gets an entry pointing to the cached plugin. Installing at multiple scopes does not duplicate the plugin; it just adds references in different settings files. To remove the plugin from a specific scope, use cf uninstall --<scope>.

What It Does

Claude Code

  1. Checks prerequisites — verifies that the claude CLI is available
  2. Asks for scope — prompts which scope to install at (or uses the flag)
  3. Registers marketplace — adds the coding-friend-marketplace if not already registered (always global)
  4. Installs plugin — installs coding-friend@coding-friend-marketplace at the chosen scope
  5. Version check — if the plugin is already installed, compares with the latest version and suggests cf update if an update is available
  6. Shell completion — sets up tab completion for the cf command in your shell (bash, zsh, fish, or PowerShell)

Codex CLI

  1. Checks prerequisites — verifies that codex exists and is at least 0.130.0
  2. Registers marketplace — runs codex plugin marketplace add dinhanhthi/coding-friend when needed
  3. Records plugin enablement — writes the Coding Friend plugin table in ~/.codex/config.toml
  4. Deploys agents — copies generated cf-*.toml agents into Codex's personal agents directory when available
  5. Prints the manual plugin step — Codex still requires opening /plugins and installing coding-friend from the UI

Under the Hood

For Claude Code, cf install runs these Claude CLI commands for you:

# Marketplace registration (always global)
claude plugin marketplace add dinhanhthi/coding-friend

# Plugin installation (with scope)
claude plugin install coding-friend@coding-friend-marketplace --scope <scope>

For Codex CLI:

codex plugin marketplace add dinhanhthi/coding-friend
# then in Codex: /plugins -> install coding-friend

Next Steps

After installing:

  • Run cf init to initialize your workspace with documentation folders and configuration.
  • For Codex CLI, run cf init --agent codex --trust-project.
  • Run cf memory init to set up AI memory for the project (also available as a step in cf init).
  • Run cf statusline to show real-time info in Claude Code.