CLI Configuration
Reference for all MyClaude CLI configuration: config.json settings, environment variable overrides, and precedence rules.
The MyClaude CLI reads settings from ~/.myclaude/config.json and respects MYCLAUDE_* environment variables with a clear precedence chain.
This reference covers every configurable setting, how to override settings with environment variables, the precedence order, and the config management commands.
Configuration file
The CLI stores its configuration at ~/.myclaude/config.json. This file is created automatically when you run myclaude login and contains both session metadata and user preferences.
File location
| Platform | Path |
|---|---|
| macOS | ~/.myclaude/config.json |
| Linux | ~/.myclaude/config.json |
| Windows | %USERPROFILE%\.myclaude\config.json |
The ~/.myclaude/ directory is created with 700 permissions on Unix systems. On Windows, it inherits the user profile directory permissions.
Full schema
{
"uid": "abc123def456",
"email": "you@example.com",
"username": "your-username",
"displayName": "Your Name",
"apiKey": "AIzaSy...",
"registry": "https://myclaude.sh",
"default_category": "skill",
"color": true,
"quiet": false,
"auto_update_check": true
}Field reference
| Field | Type | Default | Set by | Description |
|---|---|---|---|---|
uid | string | -- | myclaude login | Firebase user ID. Set automatically on login. |
email | string | -- | myclaude login | Account email address. Set automatically on login. |
username | string | -- | myclaude login | MyClaude username. Set automatically on login. |
displayName | string | -- | myclaude login | Display name from profile. Set automatically on login. |
apiKey | string | -- | myclaude login | Firebase public API key. Used for token refresh. Not a secret. |
registry | string | "https://myclaude.sh" | User | API endpoint URL. Override to point to a staging or self-hosted instance. |
default_category | string | "skill" | User | Default category used by myclaude init when --category is not specified. |
color | boolean | true | User | Enable or disable ANSI color codes in terminal output. |
quiet | boolean | false | User | Suppress all output except errors. Equivalent to passing --quiet on every command. |
auto_update_check | boolean | true | User | Check for newer CLI versions on launch. Prints a notice if an update is available. Does not auto-install. |
Fields set by myclaude login (uid, email, username, displayName, apiKey) should not be edited manually. They are overwritten on the next login.
Environment variable overrides
Environment variables override config file settings. All CLI-specific variables use the MYCLAUDE_ prefix.
| Variable | Overrides | Type | Description |
|---|---|---|---|
MYCLAUDE_TOKEN | Stored keychain credentials | string | Authentication token. When set, the CLI skips keychain lookup and uses this token directly. Primary method for CI/CD authentication. |
MYCLAUDE_REGISTRY | registry in config.json | string | API endpoint URL. Useful for pointing the CLI at a staging environment without modifying the config file. |
MYCLAUDE_NO_COLOR | color in config.json | any | Disable ANSI colors when set to any non-empty value. Takes effect regardless of value. |
NO_COLOR | color in config.json | any | Standard NO_COLOR convention (see no-color.org). Disables colors when set to any non-empty value. Equivalent to MYCLAUDE_NO_COLOR. |
MYCLAUDE_QUIET | quiet in config.json | any | Suppress non-error output when set to any non-empty value. |
Example: CI/CD environment
export MYCLAUDE_TOKEN="eyJhbGciOiJSUzI1NiJ9..."
export MYCLAUDE_REGISTRY="https://staging.myclaude.sh"
export MYCLAUDE_NO_COLOR=1
export MYCLAUDE_QUIET=1
myclaude publish --dry-run
# (authenticates via MYCLAUDE_TOKEN, targets staging, no colors, minimal output)Example: disable color for a single command
$ NO_COLOR=1 myclaude search "testing"Precedence chain
When the same setting is specified in multiple places, the CLI resolves them in this order, from highest to lowest priority:
1. Command-line flags (--quiet, --no-color, --token)
2. Environment variables (MYCLAUDE_TOKEN, MYCLAUDE_REGISTRY, NO_COLOR)
3. Config file (~/.myclaude/config.json)
4. Built-in defaultsA command-line flag always wins. An environment variable overrides the config file. The config file overrides built-in defaults.
Precedence examples
| Setting | Flag value | Env var value | Config value | Resolved value |
|---|---|---|---|---|
| Color output | --no-color | (not set) | true | Disabled (flag wins) |
| Color output | (not passed) | NO_COLOR=1 | true | Disabled (env var wins) |
| Color output | (not passed) | (not set) | false | Disabled (config wins) |
| Color output | (not passed) | (not set) | (not set) | Enabled (default) |
| Authentication | --token xyz | MYCLAUDE_TOKEN=abc | keychain | Uses xyz (flag wins) |
| Authentication | (not passed) | MYCLAUDE_TOKEN=abc | keychain | Uses abc (env var wins) |
| Registry | (not passed) | MYCLAUDE_REGISTRY=https://staging... | https://myclaude.sh | Uses staging URL (env var wins) |
Config management commands
The CLI provides subcommands for reading and writing configuration values without editing the JSON file manually.
myclaude config set
Write a configuration value:
$ myclaude config set default_category agent
# Set default_category = "agent"$ myclaude config set color false
# Set color = false$ myclaude config set registry https://staging.myclaude.sh
# Set registry = "https://staging.myclaude.sh"Only user-configurable fields (registry, default_category, color, quiet, auto_update_check) can be set with this command. Attempting to set session fields (uid, email, username, displayName, apiKey) returns an error.
myclaude config get
Read a single configuration value:
$ myclaude config get default_category
# skill$ myclaude config get registry
# https://myclaude.shReturns the resolved value after applying the precedence chain. If an environment variable overrides the config file value, the resolved (effective) value is returned.
myclaude config list
Display all configuration values and their sources:
$ myclaude config list
# uid abc123def456 (login)
# email you@example.com (login)
# username your-username (login)
# displayName Your Name (login)
# apiKey AIzaSy... (login)
# registry https://myclaude.sh (default)
# default_category skill (default)
# color true (default)
# quiet false (default)
# auto_update_check true (default)When an environment variable overrides a setting, the source column reflects it:
$ MYCLAUDE_NO_COLOR=1 myclaude config list
# ...
# color false (env: MYCLAUDE_NO_COLOR)
# ...myclaude config reset
Reset a user-configurable field to its default value:
$ myclaude config reset default_category
# Reset default_category to default: "skill"Per-project configuration
Per-project configuration via a .vaultrc file is planned for a future release. When available, .vaultrc will sit between the config file and built-in defaults in the precedence chain:
1. Command-line flags
2. Environment variables
3. Config file (~/.myclaude/config.json)
4. Project file (.vaultrc) <-- future
5. Built-in defaultsThe .vaultrc file will support the same user-configurable fields as config.json and will be discovered by walking up the directory tree from the current working directory.
Credential storage
Authentication credentials are stored separately from the config file. See CLI Authentication for the full credential storage model. In brief:
| Credential | Storage | Priority |
|---|---|---|
| Refresh token | OS keychain (service: vault-marketplace) | Default |
| Refresh token | ~/.myclaude/credentials (chmod 600) | Fallback when keychain unavailable |
| Auth token | MYCLAUDE_TOKEN environment variable | CI/CD override (highest priority) |
The config file (config.json) never contains tokens. It contains only the public API key and session metadata needed for display purposes and token refresh.
File permissions
| File | Unix permissions | Purpose |
|---|---|---|
~/.myclaude/ | 700 (drwx------) | Config directory |
~/.myclaude/config.json | 600 (-rw-------) | Configuration |
~/.myclaude/credentials | 600 (-rw-------) | Fallback token storage |
~/.myclaude/installed.json | 644 (-rw-r--r--) | Local install registry |
On Windows, files inherit the user profile permissions. The CLI does not modify Windows ACLs.
Related pages
- CLI Authentication -- how login, token storage, and refresh work
- CLI Commands Reference -- complete reference for all 12 commands
- CLI Troubleshooting -- common configuration and auth issues