coding-friend-cli
v1.15.0
Published
CLI for coding-friend — host learning docs, setup MCP server, initialize projects
Downloads
2,464
Maintainers
Readme
coding-friend-cli
CLI companion for the coding-friend plugin — a lean toolkit for disciplined engineering workflows with Claude Code.
Requirements
- Node.js >= 18
- The coding-friend plugin installed in Claude Code
Install
npm i -g coding-friend-cliCommands
cf install # Install plugin (interactive scope chooser)
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)
# 💡 Safe to run multiple times (idempotent).
cf uninstall # Uninstall plugin (interactive scope chooser)
cf uninstall --user # Uninstall from user scope (full cleanup)
cf uninstall --global # Same as --user
cf uninstall --project # Uninstall from project scope only
cf uninstall --local # Uninstall from local scope only
# 💡 Interactive — asks for confirmation before acting.
cf disable # Disable plugin (interactive scope chooser)
cf disable --user # Disable at user scope (all projects)
cf disable --global # Same as --user
cf disable --project # Disable at project scope
cf disable --local # Disable at local scope
# 💡 Plugin stays installed but won't load.
cf enable # Re-enable plugin (interactive scope chooser)
cf enable --user # Enable at user scope (all projects)
cf enable --global # Same as --user
cf enable --project # Enable at project scope
cf enable --local # Enable at local scope
cf init # Initialize workspace (interactive)
# 💡 You can run this anywhere, anytime.
cf config # Manage Coding Friend configuration (interactive menu)
# 💡 Edit docsDir, language, learn settings, and more.
cf host [path] # Build and serve learning docs at localhost:3333
# [path] is optional, default is `docs/learn`
cf mcp [path] # Setup MCP server for LLM integration
# [path] is optional, default is `docs/learn`
# This prints a JSON config snippet to add to your client's MCP
cf permission # Manage Claude Code permission rules for Coding Friend
cf permission --all # Apply all recommended permissions without prompts
cf statusline # Setup coding-friend statusline
cf update # Update plugin + CLI + statusline
cf update --cli # Update only the CLI (npm package)
cf update --plugin # Update only the Claude Code plugin
cf update --statusline # Update only the statusline
cf update --project # Update plugin at project scope
cf update --local # Update plugin at local scope
cf dev on [path] # Switch to local plugin source for development
cf dev off # Switch back to remote marketplace
cf dev status # Show current dev mode (local or remote)
cf dev sync # Sync local changes to cache (no version bump needed)
cf dev restart # Reinstall local dev plugin (off + on)
cf dev update # Update local dev plugin to latest version (off + on)
cf session save # Save current Claude Code session to docs/sessions/
cf session load # Load a saved session from docs/sessions/
cf help # Show all commands🐳 CLI Development
To work on the CLI locally:
cd cli
npm install
npm run build
npm link # Creates global symlink for `cf` binaryNow cf is available globally, pointing to your local source. After making changes:
npm run build # Rebuild (no need to re-link)
npm run watch # Auto-rebuild on file changesFor development without rebuilding:
npm run dev -- <command> # e.g. npm run dev -- initTo unlink when done:
npm unlink -g coding-friend-cliTo check if cf is pointing to the local plugin source:
npm ls -g coding-friend-cli
# Result:
# /Users/thi/.nvm/versions/node/v22.21.1/lib
#└── [email protected] -> ./../../../../../git/coding-friend/cliRunning tests
Tests are written with Vitest and live in src/lib/__tests__/.
cd cli
# Run all tests once
npm test
# Watch mode (re-runs on file changes)
npm run test:watchCurrent coverage: lib/json.ts, lib/paths.ts, lib/exec.ts.
Publish CLI to npm
Publishing is automated via GitHub Actions (.github/workflows/publish-cli.yml). Push a tag with the cli-v* prefix to trigger it:
# Bump version in cli/package.json first, then tag and push
git tag cli-v1.2.3
git push origin cli-v1.2.3The workflow will build, bundle, and publish to npm automatically (with provenance), then create a GitHub Release with the changelog for that version.
Manual publish (if needed):
cd cli
npm login # Login if not already
npm publish # Build + bundle + publishprepublishOnly runs automatically: builds TypeScript → dist/ and bundles libs from lib/.
- Bump
versionincli/package.jsonbefore publishing - First time or public package:
npm publish --access public - Package name:
coding-friend-cli→ users install withnpm i -g coding-friend-cli
License
MIT
