Config
Understand where Cline stores configuration and how global and project config work together.
Cline configuration lives in two scopes:
- Global configuration in
~/.cline/(applies globally across all Cline applications, including IDE, CLI, and SDK) - Project configuration in
.cline/(applies only to the current workspace)
Configuration Directory Layout
Cline stores shared configuration across a few well-known locations. The primary root is ~/.cline/, with structured app state under ~/.cline/data/:
~/.cline/
data/
settings/
providers.json # API keys and provider configuration
global-settings.json # Global settings
cline_mcp_settings.json # MCP settings
teams/ # Team state
sessions/ # One folder of messages per session
db/ # SQLite databases (sessions.db, cron.db, ...)
logs/ # CLI and hub logs
rules/ # Global rules
workflows/ # Global workflows
hooks/ # Global hooks
skills/ # Global skills
agents/ # Global agent definitions
plugins/ # Global plugins (.js, .ts)
cron/ # Global cron specsAdditional global search paths supported by the code:
~/Documents/Cline/
Rules/ # Additional global rules
Hooks/ # Additional global hooks
Plugins/ # Additional global plugins
Workflows/ # Additional global workflowsProject-level configuration lives in .cline/ at your repository root:
.cline/
rules/ # Project rules
workflows/ # Project workflows
skills/ # Project skills
hooks/ # Lifecycle hooks
agents/ # Project agent definitions
plugins/ # Project pluginsNotes:
- Global provider settings, global settings, and MCP settings are stored under
~/.cline/data/settings/. - Global rules, workflows, hooks, skills, agents, plugins, and cron specs resolve directly under
~/.cline/. - Rules, hooks, plugins, and workflows may also be discovered from
~/Documents/Cline/for compatibility. - In a project, Cline also reads the older
.clinerules/layout (rules, plus itsworkflows/,skills/andhooks/folders),AGENTS.mdat the project root, and skills in.agents/skills/. Globally, it also reads~/.agents/AGENTS.mdand skills in~/.agents/skills/.
What Goes Where?
- Use global (
~/.cline/) for defaults shared across all Cline applications (IDE, CLI, SDK) on your machine. - Use project (
.cline/) for team-shared behavior that should travel with the repo.
Commit .cline/ files you want to share with your team. Keep secrets out of the repo.
Configure Through the CLI
Use the interactive config UI:
cline configFrom there, you can view/edit:
- Settings (global + workspace)
- Rules
- Skills
- Hooks
Useful Configuration Commands
Use a custom configuration directory:
cline --config /path/to/custom/config "your task"Or via environment variable:
export CLINE_DIR=/path/to/custom/config
cline "your task"Open the CLI log file (~/.cline/data/logs/cline.log, or the file CLINE_LOG_PATH names) when troubleshooting:
cline doctor logEnvironment Variables
| Variable | Description |
|---|---|
CLINE_DIR | Custom configuration directory (replaces ~/.cline/), like --config |
CLINE_DATA_DIR | Custom data directory (replaces ~/.cline/data/) |
CLINE_HUB_PORT | Port of the local hub (default: 25463) |
CLINE_HUB_ADDRESS | Hub address for cline schedule commands, like their --address option |
CLINE_SESSION_BACKEND_MODE | Force backend mode (local, hub, remote, auto) |
CLINE_SANDBOX | Enable sandbox mode |
CLINE_SANDBOX_DATA_DIR | Sandbox session storage directory |
CLINE_HOOKS_DIR | Additional hooks directory |
CLINE_LOG_PATH | CLI log file (default: ~/.cline/data/logs/cline.log). cline doctor log opens it |
CLINE_DATA_DIR
export CLINE_DATA_DIR=/custom/path/to/cline
cline "your task"Related Docs
- Rules
- Skills
- Hooks
- Plugins
- .clineignore (deprecated)
Security Notes
Only use rules, hooks, skills, and plugins from sources you trust.
Hooks and plugins can execute code. Review them like any other executable artifact before adding them globally or to a project.