codecontext config

Configure CodeContext settings and preferences

The config command allows you to view and modify CodeContext configuration settings. Customize behavior, set preferences, and configure advanced options.

$ codecontext config [key] [value]

Common Commands

View all settings

Display current configuration:

$ codecontext config --list

Get a specific value

View a single configuration value:

$ codecontext config ai.model

Set a value

Update configuration:

$ codecontext config output.format "markdown"

Reset to defaults

Restore default configuration:

$ codecontext config --reset

Available Settings

AI Settings

ai.provider

AI provider to use

managed

ai.model

Specific model to use

basic | advanced

ai.temperature

Creativity level (0-1)

0.7

Output Settings

output.format

Documentation format

markdown | html

output.style

Writing style

technical | friendly

output.badges

Include badges in README

true | false

Behavior Settings

update.autoCommit

Auto-commit after updates

true | false

update.preserveCustom

Keep custom sections

true | false

update.gitHooks

Enable git hooks

true | false

Configuration File

Configuration is stored in .codecontext/config.json:

{
  "version": "2.0.0",
  "ai": {
    "provider": "codecontext",
    "model": "basic",
    "temperature": 0.7
  },
  "output": {
    "format": "markdown",
    "style": "technical",
    "badges": true,
    "emoji": false
  },
  "update": {
    "autoCommit": false,
    "preserveCustom": true,
    "gitHooks": false
  },
  "ignore": [
    "node_modules",
    "dist",
    "*.test.js"
  ]
}

Environment Variables

Override with Environment

You can override config values using environment variables:

export CODECONTEXT_AI_MODEL="advanced"
export CODECONTEXT_OUTPUT_FORMAT="html"
export CODECONTEXT_UPDATE_AUTO_COMMIT="true"

Advanced ConfigurationPRO

Pro users get access to advanced configuration options:

Custom Templates

template.readme: "custom-readme.md"

Use your own documentation templates

Webhook Integration

webhooks.onUpdate: "https://..."

Send notifications on updates

Team Settings

team.sharedConfig: true

Share config across team

Performance Tuning

performance.parallel: 4

Process multiple files in parallel

Examples

Switch to friendly writing style

$ codecontext config output.style "friendly"

Enable auto-commit after updates

$ codecontext config update.autoCommit true

Use Advanced AI for better quality (Pro)

$ codecontext config ai.model "advanced"

Add ignore patterns

$ codecontext config ignore "['*.test.js', 'docs/*']"

Best Practices

  • Version control your config: Commit .codecontext/config.json to share settings with your team
  • Use environment variables for secrets: Never store API keys in config files
  • Test config changes: Run codecontext status after changes
  • Document custom settings: Add comments to explain non-default values

Related Topics

);