Configuration File
Customize Coding Friend behavior with .coding-friend/config.json.
Overview
Configure Coding Friend using .coding-friend/config.json. Two locations:
- Global:
~/.coding-friend/config.json— applies to all projects - Local:
.coding-friend/config.json— project-specific, overrides global
Edit interactively with cf config, or manually edit the JSON files.
Full Config
{
"language": "en",
"docsDir": "docs",
"privacyBlock": true,
"scoutBlock": true,
"commit": {
"verify": true
},
"learn": {
"language": "en",
"outputDir": "docs/learn",
"categories": [
{
"name": "concepts",
"description": "Design patterns, algorithms, architecture principles"
},
{
"name": "patterns",
"description": "Repository pattern, observer pattern"
},
{
"name": "languages",
"description": "Language-specific features, syntax, idioms"
},
{ "name": "tools", "description": "Libraries, frameworks, CLI tools" },
{ "name": "debugging", "description": "Debugging techniques, bug fixes" }
],
"autoCommit": false,
"readmeIndex": false
},
"statusline": {
"components": ["version", "folder", "model", "branch", "context", "usage"],
"accountAliases": {
"me@work.com": "Work"
}
},
"autoApprove": false,
"autoApproveAllowExtra": [],
"autoApproveIgnore": [],
"memory": {
"tier": "auto",
"embedding": {
"provider": "transformers",
"model": "Xenova/all-MiniLM-L6-v2",
"ollamaUrl": "http://localhost:11434"
},
"daemon": {
"idleTimeout": 0
},
"autoCapture": false,
"autoStart": false
}
}
Properties
language
- Type:
string - Default:
"en" - Language for doc-generating skills (
/cf-ask,/cf-remember,/cf-plan,/cf-research)
docsDir
- Type:
string - Default:
"docs" - Top-level folder name where all skill outputs are stored
- Must be a single folder name (no slashes) — all subfolders (
plans/,memory/,research/,sessions/) sit inside it
privacyBlock
- Type:
boolean - Default:
true - Enables the privacy-block hook that prevents reading sensitive files (
.env, credentials, etc.) - Set to
falseto disable
scoutBlock
- Type:
boolean - Default:
true - Enables the scout-block hook that prevents the agent from reading too many files at once
- Set to
falseto disable
commit
Settings for the /cf-commit workflow.
commit.verify
- Type:
boolean - Default:
true - Run tests before allowing commit
- Set to
falseto skip pre-commit verification
learn
Settings for the /cf-learn skill.
learn.language
- Type:
string - Default:
"en" - Language for
/cf-learnnotes - Falls back to top-level
language, then"en"
learn.outputDir
- Type:
string - Default:
"docs/learn" - Where learning docs are saved
- Supports absolute paths (
/path/to/dir) or~/paths for external storage
learn.categories
- Type:
arrayof{ name, description } - Default: 5 categories (concepts, patterns, languages, tools, debugging)
- Subdirectories and their descriptions for organizing learning docs
learn.autoCommit
- Type:
boolean - Default:
false - Auto-commit after each
/cf-learn(useful for external output dirs)
learn.readmeIndex
- Type:
boolean | "per-category" - Default:
false false— no indextrue— single README containing all indexes"per-category"— one README per category folder
statusline
Settings for the statusline display (global config only).
statusline.components
- Type:
arrayof component IDs - Default: all components shown
- Available components:
"version","folder","model","branch","context","usage" - Only listed components are shown — omit a component to hide it
statusline.accountAliases
- Type:
Record<string, string>(email → alias) - Default:
{}(no aliases) - Custom display names for accounts, keyed by email address
- When set, the alias replaces the full name/email display in the statusline (e.g.,
👤 Workinstead of👤 Name (email)) - Each account can have its own alias — switching accounts preserves all aliases
- Set interactively via
cf statusline,cf config, orcf init
autoApprove
- Type:
boolean - Default:
false - Enables the auto-approve hook that reduces permission prompts
- Uses a 3-step classification pipeline (rules → working-dir → LLM) to auto-approve safe operations
autoApproveAllowExtra
- Type:
string[] - Default:
[] - Additional Bash command prefixes to auto-approve (merged with built-in allow list)
- Entries are matched as command prefixes:
"cargo test"matchescargo test,cargo test --lib, etc. - Cannot override DENY patterns — adding
"rm -rf"does not bypass the built-in deny - Both global and local configs are merged (union, deduped)
- See Auto-Approve reference for details
autoApproveIgnore
- Type:
string[] - Default:
[] - Bash command prefixes the hook should not classify — returns no decision so Claude Code's native
permissions.allowpatterns handle them - Only applies to commands that would be prompted ("ask") or sent to the LLM classifier ("unknown"). Security DENY patterns are always enforced
- For compound commands (pipes, chains), the first segment is checked
- Both global and local configs are merged (union, deduped)
- Use this when you have flexible glob patterns in
.claude/settings.json(e.g."Bash(cargo test * | *)") and want Claude Code to decide instead of the hook - See Auto-Approve reference for the difference with
autoApproveAllowExtra
memory
Settings for the memory system.
memory.tier
- Type:
"auto" | "full" | "lite" | "markdown" - Default:
"auto" - Controls which search backend the MCP server uses — this does not start or stop the daemon
"auto"— detect best available at startup: SQLite installed → Tier 1, daemon running → Tier 2, otherwise → Tier 3"full"— require Tier 1 (SQLite + hybrid search). Fails if deps not installed viacf memory init"lite"— require Tier 2 (MiniSearch daemon). Fails if daemon not running viacf memory start-daemon"markdown"— force Tier 3 (grep over markdown files). Always works, no setup needed- Use this to force a specific tier for testing or to skip auto-detection (e.g.,
"markdown"to use Tier 3 even when SQLite is installed)
memory.embedding
Settings for the embedding model used in Tier 1 semantic search. See Embedding Models for details.
memory.embedding.provider
- Type:
"transformers" | "ollama" - Default:
"transformers" "transformers"— local Transformers.js model, no external service needed"ollama"— local Ollama server, supports more models
memory.embedding.model
- Type:
string - Default:
"Xenova/all-MiniLM-L6-v2"(transformers) or"all-minilm:l6-v2"(ollama) - The embedding model to use for vector generation
- Changing to a model with different dimensions requires
cf memory rebuild
memory.embedding.ollamaUrl
- Type:
string - Default:
"http://localhost:11434" - URL of the Ollama server (only used when
provideris"ollama")
memory.daemon
Settings for the Tier 2 MiniSearch daemon.
memory.daemon.idleTimeout
- Type:
number(milliseconds) - Default:
0(no timeout — daemon runs until explicitly stopped) - Auto-shutdown the daemon after this many milliseconds of inactivity. Set to
0to disable auto-shutdown (recommended). Thecf memory configwizard prompts in minutes and converts automatically. - If the daemon stops (e.g., due to idle timeout or crash), it is automatically respawned on the next memory request with up to 3 retry attempts before falling back to Tier 3.
memory.autoCapture
- Type:
boolean - Default:
false - Enable automatic memory capture via PreCompact hook
- When enabled, session summaries are saved as
episodememories before context compaction
memory.autoStart
- Type:
boolean - Default:
false - Auto-start the daemon when the MCP server connects
Layered Config
Local settings override global settings at the top-level key level (not deep merge).
- If global has
{ "language": "en", "docsDir": "docs" }and local has{ "language": "vi" }, the result is{ "language": "vi", "docsDir": "docs" } - If local has a
learnobject, it replaces the entire globallearnobject
Custom Skill Guides
Separate from config.json, you can extend built-in skills with project-specific guidance. See Custom Skill Guides for details.