cf init
Initialize workspace with documentation folders and platform configuration.
Overview
Interactive setup for Coding Friend. Run it in the root directory of your project:
cf init
cf init has two modes depending on whether the project has been initialized before:
- First run (no
.coding-friend/directory) — runs a linear step-by-step wizard that walks you through all settings in order. - Subsequent runs (
.coding-friend/directory exists) — shows an interactive menu where you pick which setting to configure or reconfigure. Each menu item shows its current status.
You can run cf init as many times as you want.
💡 To edit individual settings later, you can also use cf config.
Config File Locations
At the start, cf init displays config file locations:
Config files:
Global: ~/.coding-friend/config.json
Local: .coding-friend/config.json (this project)
Local overrides global at property level.
Status Display
Configs can be stored in two different locations - global and local. Local overrides global at the property level.
- Global config:
~/.coding-friend/config.json - Local config:
<project>/.coding-friend/config.json - The meaning of the labels is as follows:
[global]- set only in global config[local]- set only in local (project) config[both]- set in both global and local config[-]- not configured anywhere (using defaults)
Setup Steps
- Step 1 - Docs folder name (default:
"docs"), where plans, memory, research, and session docs are stored in your project. - Step 2 - Configure
.gitignore. Keeps Coding Friend's AI-generated docs and config out of your git history. You can edit it later in.gitignore. - Step 3 - Docs language. Skills like
/cf-plan,/cf-ask,/cf-rememberwill write docs in this language. - Step 4 -
/cf-learnconfig. The settings for the learning extraction skill. You can configure the language, output directory, and categories. - Step 5 - Shell completion. Adds tab completion for
cfcommands to your shell. - Step 6 - Statusline. The statusline is a small section at the bottom of the screen that shows the current status of the Coding Friend session. You can configure it later with
cf statusline. - Step 7 - CF Memory. Runs the full memory setup wizard — installs dependencies, builds the database, configures MCP, and optionally enables
memory.autoCapture. You can configure it later withcf memory config. - Step 8 - Auto-approve. Opt-in hook that auto-approves safe tool calls (read-only commands), blocks destructive ones, and prompts for ambiguous operations. Uses two-tier classification: rule-based + Sonnet LLM fallback.
- Step 9 - Claude permissions. Offers to apply all recommended Coding Friend permissions (Tier 1 static rules + Tier 2 plugin script rules). You choose the scope: project-level (
.claude/settings.local.json) or user-level (~/.claude/settings.json). If you configured an external/cf-learnoutput directory, external learn directory rules are also included. For fine-grained control, usecf permissionor see the Permissions Reference.
Interactive Menu (Returning Users)
When .coding-friend/ already exists, cf init shows an interactive menu instead of running the wizard:
? Which setting to configure? (Use arrow keys)
❯ Docs folder [local] (docs)
.gitignore (configured)
Docs language [global] (en)
/cf-learn config [local]
Shell completion (installed)
Statusline (configured)
CF Memory MCP (configured)
Auto-approve [-]
Permissions (12/14 rules)
──────────────
Exit
Select any item to reconfigure it, then return to the menu. Choose Exit when done.
Non-Git Directories
cf init can work outside git repos. All git-related steps are automatically skipped in that case.
See Also
cf config- edit individual settings anytimecf install- install the Coding Friend plugincf memory- manage the AI memory system (search, daemon, SQLite)cf permission- manage all Claude Code permissionscf statusline- configure statusline independently/cf-learn- the learning extraction skill configured by this command- Memory System - architecture and configuration
- Permissions Reference - full permission list and explanations
- Configuration - config file format and options