-
Notifications
You must be signed in to change notification settings - Fork 680
feat(setup): add Cline CLI as supported agent #1116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rodriabregu
wants to merge
1
commit into
Gentleman-Programming:main
Choose a base branch
from
rodriabregu:feat/554-cline-adapter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π― Functional Correctness | π‘ Minor | β‘ Quick win
π Supported by static analysis
π Web query:
For the Cline CLI version supported by this repository, confirm the canonical MCP settings path, global rules directory, and whether --data-dir or equivalent configuration overrides those paths.π‘ Result:
For the Cline CLI, the canonical configuration locations and overriding mechanisms are as follows: Canonical Configuration Paths - MCP Settings: The MCP server configuration file is located at ~/.cline/data/settings/cline_mcp_settings.json [1][2][3]. - Global Rules: Global rules are stored directly under the ~/.cline/ directory [4][5][6]. Configuration Overrides Yes, the paths for these configurations can be overridden using specific configuration flags or environment variables: - --config flag: This flag sets a custom base configuration directory. When used, it replaces the default ~/.cline/data/ path. Consequently, the MCP settings file will be expected at /settings/cline_mcp_settings.json [1][3]. - --data-dir flag: This flag directs Cline to use an isolated local state directory (useful for sandboxing). This also overrides the default ~/.cline/data/ location, shifting the settings and state path to /settings/cline_mcp_settings.json [7][8]. - CLINE_DIR environment variable: Setting this variable overrides the base configuration directory (defaulting to ~/.cline/data/), and all Cline dataβincluding settings and MCP configurationβis stored within the specified directory [1][9][10]. Note that CLI MCP configurations are separate from VS Code extension configurations; servers configured in the VS Code extension do not automatically appear in the CLI [11]. [4][1][2][7]
Citations:
π€ get_repo_knowledge executed:
get_repo_knowledge Gentleman-Programming/engram /tmp/coderabbit-repo-knowledge/gentleman-programming-engram-7ead0552/conventionsLength of output: 6407
π Script executed:
Repository: Gentleman-Programming/engram
Length of output: 50384
π Script executed:
Repository: Gentleman-Programming/engram
Length of output: 14911
π Web query:
site:github.com/cline/cline OR site:docs.cline.bot Cline CLI cline_mcp_settings.json ~/.cline/rules --data-dir releaseπ‘ Result:
To configure MCP servers for the Cline CLI, you should place your cline_mcp_settings.json file in the settings subdirectory of your Cline data directory [1][2][3]. By default, this location is: ~/.cline/data/settings/cline_mcp_settings.json [1][2][3] If you use the --data-dir flag to specify a custom directory for isolated local state, the settings file will be resolved relative to that path [1][4]. Specifically, if you run the CLI with --data-dir , the application will look for the MCP configuration at: /settings/cline_mcp_settings.json [1][4] Please note the following technical details: 1. File Format: The file uses the same JSON format as the Cline VS Code extension [1][5]. 2. Alternative Locations: While older documentation may have incorrectly referenced ~/.cline/mcp.json, the CLI code explicitly reads from the settings directory path described above [2]. You can also override the configuration path entirely using the CLINE_MCP_SETTINGS_PATH environment variable [2]. 3. CLI Interaction: The Cline CLI does not currently feature an interactive /mcp command for managing these settings; you must create or edit the JSON file directly [1][5]. The --data-dir flag enables isolated local state and automatically triggers sandbox mode [4]. If you are troubleshooting configuration issues, ensure your path structure follows the /settings/ subdirectory convention rather than placing the file directly in the root of your data directory [1][3].
Citations:
π Web query:
site:github.com/cline/cline/blob/fd8cecdd/docs/cline-cli/configuration.mdx Cline global rules ~/.cline/rules data-dirπ‘ Result:
Cline stores its configuration and data in the ~/.cline/ directory by default [1]. Specifically, the configuration and persistent data are located in the ~/.cline/data/ directory [1]. The file structure within ~/.cline/ is as follows [1]: - ~/.cline/data/globalState.json: Stores global settings that apply across all workspaces [1]. - ~/.cline/data/secrets.json: Stores encrypted API keys [1]. - ~/.cline/data/settings/cline_mcp_settings.json: Contains MCP server configuration [1]. - ~/.cline/data/workspace/: Contains workspace-specific state [1]. - ~/.cline/data/tasks/: Stores task history and related data [1]. - ~/.cline/log/: Contains log files [1]. While rules that guide AI behavior are typically managed via.clinerules files at the project level, Cline's CLI configuration allows you to override the default data directory by setting the CLINE_DIR environment variable [1]. If set, Cline will use the specified directory instead of ~/.cline/data/ to store its configuration and state [1].
Citations:
π Script executed:
Repository: Gentleman-Programming/engram
Length of output: 50387
π Script executed:
Repository: Gentleman-Programming/engram
Length of output: 10521
π Web query:
site:github.com/cline/cline "global rules" "~/.cline/rules" OR ".clinerules" Cline CLIπ‘ Result:
In the Cline CLI and ecosystem, global rules serve as a way to define instructions that apply automatically to all projects. As of September 2026, the system for discovering these rules has been consolidated and expanded to support legacy paths [1][2]. The Cline CLI and other interfaces (such as the VS Code extension) search for global rules in several designated locations [1][3]. The primary directory for global rules is: - Windows: Documents\Cline\Rules [4][5][6] - macOS: ~/Documents/Cline/Rules [4][5][6] - Linux/WSL: ~/Documents/Cline/Rules (with frequent fallbacks to ~/Cline/Rules) [7][6][8] In addition to the primary Documents-based directory, Cline maintains support for several legacy or alternative global paths to ensure backward compatibility and reliable discovery across different environments (such as headless or WSL installs) [1][2][8]. These search paths currently include: - ~/.cline/rules [1][2] - ~/.clinerules [1] Rules defined in these files are automatically merged into the system prompt [9]. When both global and workspace-specific rules (located in a.clinerules/ directory within your project root) are present, local rules take precedence and are processed after global rules [9]. You can verify that your rules are being loaded by checking the Rules interface within the IDE or by inspecting the system prompt generated during an API request [9][5].
Citations:
π Script executed:
Repository: Gentleman-Programming/engram
Length of output: 1959
π Script executed:
Repository: Gentleman-Programming/engram
Length of output: 5878
Honor Clineβs configured directories.
Cline resolves global rules from
resolveClineDir()/rulesand MCP settings fromresolveClineDataDir()/settings.clineDir()always usesHOME/.cline, soCLINE_DIRandCLINE_DATA_DIRcauseengram setup clineto write files that Cline does not read. Honor these variables, or document that setup supports only default paths and add deterministic tests for that contract.π€ Prompt for AI Agents
Source: MCP tools