### Install Coraline from crates.io Source: https://greysquirr3l.github.io/coraline/getting-started.html Install the Coraline CLI tool using Cargo, the Rust package manager. ```bash cargo install coraline ``` -------------------------------- ### Serve Coraline Application Source: https://greysquirr3l.github.io/coraline/getting-started.html Command to start the Coraline application server. The --mcp flag enables MCP tools. ```bash coraline serve --mcp ``` -------------------------------- ### Start the Coraline MCP server Source: https://greysquirr3l.github.io/coraline/cli-reference.html Starts the MCP server, which can communicate over stdio when the --mcp flag is used. Typically invoked by an MCP client. ```bash coraline serve --mcp ``` ```bash coraline serve --mcp --path /path/to/project ``` -------------------------------- ### Clone and Build Coraline Source: https://greysquirr3l.github.io/coraline/development.html Clone the repository, navigate to the project directory, and build the project using Cargo. Install the CLI binary to your system's PATH. ```bash git clone https://github.com/greysquirr3l/coraline.git cd coraline # Build (debug) cargo build --all-features # Build and install to ~/.cargo/bin cargo install --path crates/coraline --force # Verify coraline --version ``` -------------------------------- ### Coraline update output (up to date) Source: https://greysquirr3l.github.io/coraline/cli-reference.html Example output when the Coraline version is current. ```text ✓ coraline is up to date (v0.3.0) ``` -------------------------------- ### Get Symbols Overview for a File Source: https://greysquirr3l.github.io/coraline/mcp-tools.html Fetches an overview of all symbols within a specified file, grouped by their kind and ordered by line number. Requires the file path as input. ```json { "file_path": "src/lib.rs", "symbol_count": 14, "by_kind": { "function": [ ... ], "struct": [ ... ] }, "symbols": [ ... ] } ``` -------------------------------- ### Coraline update output (update available) Source: https://greysquirr3l.github.io/coraline/cli-reference.html Example output when a newer version of Coraline is available. ```text Update available: v0.3.0 → v0.4.0 Run `cargo install coraline` to upgrade. ``` -------------------------------- ### coraline_get_symbols_overview Source: https://greysquirr3l.github.io/coraline/mcp-tools.html Get an overview of all symbols in a file, grouped by kind and ordered by line number. ```APIDOC ## coraline_get_symbols_overview ### Description Get an overview of all symbols in a file, grouped by kind and ordered by line number. ### Method Not applicable (function call) ### Endpoint Not applicable (function call) ### Parameters #### Input - **file_path** (string) - Required - Path to file (relative to project root or absolute). ### Output - **file_path** (string) - Path to the file. - **symbol_count** (number) - Total number of symbols in the file. - **by_kind** (object) - Symbols grouped by kind (e.g., `function`, `struct`). - **symbols** (array) - List of all symbols in the file. ``` -------------------------------- ### Read File Contents Source: https://greysquirr3l.github.io/coraline/print.html Read the contents of a specified file within the project. You can define the starting line and the maximum number of lines to retrieve. ```python coraline_read_file(path='path/to/file.rs', start_line=10, limit=100) ``` -------------------------------- ### Customize Indexing Include Patterns Source: https://greysquirr3l.github.io/coraline/configuration.html Modify the `include_patterns` to specify which file types Coraline should index. This example includes Rust, TypeScript, and specific JavaScript files. ```toml [indexing] include_patterns = [ "**/*.rs", "**/*.ts", "**/*.tsx", "src/**/*.js", ] ``` -------------------------------- ### Customize Indexing Max File Size Source: https://greysquirr3l.github.io/coraline/configuration.html Adjust the `max_file_size` setting to control the maximum file size (in bytes) Coraline will index. This example sets the limit to 512 KB. ```toml [indexing] max_file_size = 524288 # 512 KB ``` -------------------------------- ### Response for Session Security Status Source: https://greysquirr3l.github.io/coraline/print.html This is an example response from a tools/call request for session security status. It includes details on session activity, guardrail hits, blocked calls, and configured limits. ```json { "jsonrpc": "2.0", "id": "sec-1", "result": { "content": [ { "type": "text", "text": "{\"session\":{\"tool_calls\":12,\"guardrail_hits\":3,\"blocked_calls\":1},\"limits\":{\"enabled\":true,\"max_tool_calls_per_session\":500,\"max_guardrail_hits_per_session\":100,\"max_blocked_calls_per_session\":25},\"security\":{\"enabled\":true,\"input_guardrail_mode\":\"monitor\",\"output_guardrail_mode\":\"enforce\"}}" } ], "isError": false } } ``` -------------------------------- ### Coraline CLI Initialization and Query Source: https://greysquirr3l.github.io/coraline/development.html Demonstrates initializing the Coraline index and performing a query. Ensure you are in the Coraline project directory. ```bash cd /path/to/coraline coraline init -i # index itself coraline query "resolve_unresolved" coraline context "how does reference resolution work" ``` -------------------------------- ### Initialize and Index Project Source: https://greysquirr3l.github.io/coraline/getting-started.html Commands to initialize a new Coraline project and index data. ```bash coraline init coraline index ``` -------------------------------- ### Initialize Coraline Project Source: https://greysquirr3l.github.io/coraline/cli-reference.html Initializes Coraline in a specified directory. Use options to control indexing, force overwrite, or skip git hooks. Prompts for model download if stdin is a TTY. ```bash coraline init # Initialize current directory coraline init /path/to/my-app # Initialize a specific path coraline init -i # Initialize, prompt for model, then index coraline init -i --no-hooks # Initialize and index, skip git hooks coraline init --force # Wipe and reinitialize existing project ``` -------------------------------- ### Indexing and Context Configuration with File Size Limit Source: https://greysquirr3l.github.io/coraline/configuration.html Configuration for indexing, including max file size and batch size, along with context settings and Rust crate patterns. ```ini [indexing] max_file_size = 2097152 # 2 MB for generated code batch_size = 200 include_patterns = [ "crates/**/*.rs", ] exclude_patterns = [ "**/target/**", "**/.git/**", ] [context] max_nodes = 50 traversal_depth = 3 ``` -------------------------------- ### Get Nodes for a File Source: https://greysquirr3l.github.io/coraline/print.html Retrieve all indexed symbols (nodes) associated with a specific file path. ```python coraline_get_file_nodes(file_path='src/main.rs') ``` -------------------------------- ### coraline_node Source: https://greysquirr3l.github.io/coraline/mcp-tools.html Get complete details for a specific node by ID, including its source code body read from disk. ```APIDOC ## coraline_node ### Description Retrieve complete details for a specific node by its ID, including its source code body. ### Method Not applicable (function call) ### Endpoint Not applicable (function call) ### Parameters #### Input - **node_id** (string) - Optional - The node ID. Either `node_id` or `name` must be provided. - **name** (string) - Optional - Symbol name (alternative to `node_id`). Either `node_id` or `name` must be provided. - **file** (string) - Optional - Disambiguate `name` by file path. - **include_edges** (boolean) - Optional - Defaults to `false`. Also return incoming/outgoing edge counts. ### Output Full node record including `body` (source lines), `visibility`, `decorators`, `type_parameters`, `is_async`, `is_static`, `is_abstract`, and optionally `incoming_edge_count` / `outgoing_edge_count`. ``` -------------------------------- ### coraline init Source: https://greysquirr3l.github.io/coraline/print.html Initializes Coraline in a project directory, setting up the necessary configuration and database. It can optionally download the embedding model and perform an initial index. ```APIDOC ## `coraline init [PATH]` Initialize Coraline in a project directory. Creates `.coraline/` with a SQLite database, default `config.toml`, and initial memory templates. When stdin is a TTY, prompts to download the embedding model (~137 MB) after initialization. Decline to skip — all non-embedding tools remain fully functional and you can download later with `coraline model download`. If `.coraline/` already exists and `--index` is passed **without** `--force`, `init` skips the overwrite and runs indexing directly on the existing project. **Options:** Flag| Description ---|--- `-i`, `--index`| Run a full index immediately after initialization `-f`, `--force`| Overwrite an existing `.coraline/` directory without prompting `--no-hooks`| Skip automatic git hook installation **Examples:** ``` coraline init # Initialize current directory coraline init /path/to/my-app # Initialize a specific path coraline init -i # Initialize, prompt for model, then index coraline init -i --no-hooks # Initialize and index, skip git hooks coraline init --force # Wipe and reinitialize existing project ``` **On success, creates:** * `.coraline/coraline.db` — SQLite knowledge graph * `.coraline/config.toml` — Annotated config template * `.coraline/memories/` — Initial memory files * `.coraline/.gitignore` — Excludes local data files from git * `.git/hooks/post-commit` — Auto-sync hook (unless `--no-hooks`) ``` -------------------------------- ### List Project Memories Source: https://greysquirr3l.github.io/coraline/print.html Lists all available memories for the project, including their count. ```json { "memories": ["project_overview", "architecture_notes", ...], "count": N } ``` -------------------------------- ### Manage Coraline git post-commit hook Source: https://greysquirr3l.github.io/coraline/cli-reference.html Installs, removes, or checks the status of the git 'post-commit' hook that automatically runs 'coraline sync'. ```bash coraline hooks install ``` ```bash coraline hooks status ``` ```bash coraline hooks remove ``` -------------------------------- ### Release Workflow: Version Bumping and Tagging Source: https://greysquirr3l.github.io/coraline/print.html Commands to bump the version in Cargo.toml files, update the CHANGELOG, commit, tag, and push for a release. ```bash # Bump version in crates/coraline/Cargo.toml and crates/tree-sitter-blazor/Cargo.toml # Update CHANGELOG.md git add -A git commit -m "chore: release v0.2.0" git tag v0.2.0 git push origin main --tags ``` -------------------------------- ### Customize Indexing Exclude Patterns Source: https://greysquirr3l.github.io/coraline/configuration.html Use `exclude_patterns` to prevent Coraline from indexing specific files or directories. This example adds a custom exclusion for 'tests/fixtures/'. ```toml [indexing] exclude_patterns = [ "**/.git/**", "**/node_modules/**", "**/target/**", "**/dist/**", "tests/fixtures/**", # custom exclusion ] ``` -------------------------------- ### Read Full Configuration Source: https://greysquirr3l.github.io/coraline/configuration.html Command to display the entire Coraline configuration in JSON format. ```bash coraline config ``` -------------------------------- ### Implement a New Tool Source: https://greysquirr3l.github.io/coraline/development.html Steps to implement a new tool by defining a struct that implements the `Tool` trait, registering it in the `create_default_registry` function, and adding unit tests and documentation. ```rust #![allow(unused)] fn main() { pub struct MyTool { project_root: PathBuf } impl Tool for MyTool { fn name(&self) -> &'static str { "coraline_my_tool" } fn description(&self) -> &'static str { "..." } fn input_schema(&self) -> Value { json!({ ... }) fn execute(&self, params: Value) -> ToolResult { ... } } } ``` ```rust #![allow(unused)] fn main() { registry.register(Box::new(MyTool::new(project_root.to_path_buf()))); } ``` -------------------------------- ### Indexing and Context Configuration Source: https://greysquirr3l.github.io/coraline/configuration.html Configuration for file indexing patterns (include/exclude) and context settings like max nodes and code blocks. ```ini [indexing] include_patterns = [ "src/**/*.ts", "src/**/*.tsx", "tests/**/*.ts", ] exclude_patterns = [ "**/node_modules/**", "**/dist/**", "**/.next/**", "src/**/*.d.ts", ] [context] max_nodes = 30 max_code_blocks = 8 traversal_depth = 2 ``` -------------------------------- ### Get Node Details Source: https://greysquirr3l.github.io/coraline/print.html Retrieve comprehensive details for a given node ID, including its source code. Optionally, include edge counts for incoming and outgoing relationships. ```python coraline_node(node_id='...', include_edges=True) ``` -------------------------------- ### Coraline CLI Entry Point and Project Structure Source: https://greysquirr3l.github.io/coraline/architecture.html This snippet outlines the directory structure of the Coraline project, highlighting key modules like the CLI entry point, public API surface, database layer, parsing pipeline, and framework-specific resolvers. ```rust #!/usr/bin/env bash # Coraline CLI entry point (clap) # Public API surface # SQLite layer + schema + FTS # Tree-sitter parsing + indexing pipeline # Graph traversal and subgraph queries # Cross-file reference resolution # Language/framework-specific resolvers # crate::, super::, self:: resolution # ./Foo imports, @/ aliases, components # .razor file discovery, .NET types # PSR-4, blade views, facades # Vector storage + cosine similarity # Project memory CRUD # TOML + JSON configuration loading # Incremental sync + git hook management # Structured logging (tracing) # MCP server (JSON-RPC over stdio) # Shared utilities # Tool trait + ToolRegistry # search, callers, callees, impact, find_symbol, ... # coraline_context # read_file, list_dir, status, config # write/read/list/delete/edit memory ``` -------------------------------- ### Get Outgoing Dependency Graph Source: https://greysquirr3l.github.io/coraline/mcp-tools.html Retrieves the outgoing dependency graph from a node, showing what the symbol imports, calls, or references. The traversal depth and edge kinds can be specified. ```json { "root_id": "abc123", "nodes": [ ... ], "edges": [ ... ], "stats": { "node_count": 8, "edge_count": 10, "file_count": 3, "max_depth": 2 } } ``` -------------------------------- ### Coraline Project Configuration Defaults Source: https://greysquirr3l.github.io/coraline/configuration.html This snippet shows the default configuration settings for a Coraline project, including indexing, context, and sync parameters. It serves as a reference for all available options. ```toml # Coraline project configuration # All settings are optional — defaults are shown below. [indexing] max_file_size = 1048576 # 1 MB — skip files larger than this batch_size = 100 # Files processed per batch include_patterns = [ "**/*.rs", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.py", "**/*.go", "**/*.java", "**/*.cs", "**/*.cpp", "**/*.c", "**/*.h", "**/*.rb", "**/*.php", "**/*.swift", "**/*.kt", "**/*.razor", ] exclude_patterns = [ "**/.git/**", "**/target/**", "**/node_modules/**", "**/dist/**", "**/build/**", "**/.coraline/**", ] [context] max_nodes = 20 # Max graph nodes in context output max_code_blocks = 5 # Max code snippets to attach max_code_block_size = 1500 # Max chars per code block traversal_depth = 1 # Graph hops from entry nodes [sync] git_hooks_enabled = true # Auto-sync on git commit watch_mode = false # Watch for file changes (not yet implemented) debounce_ms = 500 # Watch mode debounce delay auto_sync_interval_secs = 120 # MCP background sync interval (0 = disabled) [vectors] enabled = false # Requires ONNX model (see below) model = "nomic-embed-text-v1.5" dimension = 384 batch_size = 32 ``` -------------------------------- ### Request Session Security Status Source: https://greysquirr3l.github.io/coraline/print.html This is an example of a tools/call request to retrieve live MCP session security counters and configured guardrail/session limits. It's useful for runtime triage. ```json { "jsonrpc": "2.0", "id": "sec-1", "method": "tools/call", "params": { "name": "coraline_session_security_status", "arguments": {} } } ``` -------------------------------- ### Implement Framework Resolver Source: https://greysquirr3l.github.io/coraline/print.html Create a new file for your framework resolver (e.g., `src/resolution/frameworks/my_lang.rs`) and implement the `FrameworkResolver` trait. ```rust #![allow(unused)] fn main() { pub struct MyLangResolver; impl FrameworkResolver for MyLangResolver { fn name(&self) -> &'static str { "my_lang" } fn detect(&self, project_root: &Path) -> bool { ... } fn resolve_to_paths(&self, ctx: &ResolveContext<'_>) -> Vec { ... } } } ``` -------------------------------- ### Coraline Semantic Search Output Example Source: https://greysquirr3l.github.io/coraline/mcp-tools.html This JSON structure represents the output of a Coraline semantic search query, including freshness check details and search results with similarity scores. ```json { "query": "how is sync staleness detected", "freshness": { "checked": true, "stale_files_added": 0, "stale_files_modified": 2, "stale_files_removed": 0, "synced": true, "files_added": 0, "files_modified": 2, "files_removed": 0, "embeddings_refreshed": true, "embeddings_refreshed_count": 18, "check_interval_seconds": 30 }, "results": [ { "id": "abc123", "name": "resolve_unresolved", "qualified_name": "coraline::resolution::ReferenceResolver::resolve_unresolved", "kind": "function", "file_path": "src/resolution/mod.rs", "start_line": 42, "docstring": null, "signature": "fn resolve_unresolved(...)", "score": 0.87 } ] } ``` -------------------------------- ### Testing Commands Source: https://greysquirr3l.github.io/coraline/development.html Commands to run all tests, specific integration tests, specific unit tests, and tests with captured output for debugging purposes. ```bash # All tests cargo test --all-features 2>&1 | grep "test result" # Single integration file cargo test --test graph_test # Single unit test cargo test memory::tests::test_write_read # With output (for debugging) cargo test test_name -- --nocapture ``` -------------------------------- ### Adjust Context Generation Limits Source: https://greysquirr3l.github.io/coraline/configuration.html Configure the `[context]` section to control the size and detail of context provided by Coraline. This example increases the maximum nodes, code blocks, and block size. ```toml [context] max_nodes = 40 max_code_blocks = 10 max_code_block_size = 2000 traversal_depth = 2 ``` -------------------------------- ### List Directory Contents Source: https://greysquirr3l.github.io/coraline/print.html List the contents of a directory within the project. By default, it lists the contents of the project root directory. ```python coraline_list_dir(path='src/components') ``` -------------------------------- ### Get Detailed Graph Statistics Source: https://greysquirr3l.github.io/coraline/mcp-tools.html Retrieves comprehensive statistics about the code graph, including total counts, breakdowns by language, node kind, and edge kind. No input parameters are required. ```json { "totals": { "nodes": 1842, "edges": 4201, "files": 47, "unresolved_references": 123, "vectors": 0 }, "files_by_language": { "rust": 28, "typescript": 14, "toml": 5 }, "nodes_by_kind": { "function": 412, "method": 287, "import": 201, "struct": 88 }, "edges_by_kind": { "contains": 1842, "calls": 987, "imports": 201, "exports": 178 } } ``` -------------------------------- ### Download Models and Embed Data Source: https://greysquirr3l.github.io/coraline/getting-started.html Commands for downloading machine learning models and generating embeddings for your data. ```bash coraline model download coraline embed ``` -------------------------------- ### coraline_path Source: https://greysquirr3l.github.io/coraline/mcp-tools.html Finds a path between two nodes in the code graph using BFS traversal across all edge kinds. Requires specifying either the ID or name (with optional file for disambiguation) for both the starting and target nodes. ```APIDOC ## coraline_path ### Description Find a path between two nodes in the graph, using BFS over all edge kinds. ### Method POST ### Endpoint /coraline/path ### Parameters #### Query Parameters - **from_id** (string) - Optional - Starting node ID - **from_name** (string) - Optional - Starting node name (alternative to `from_id`) - **from_file** (string) - Optional - Disambiguate `from_name` by file path - **to_id** (string) - Optional - Target node ID - **to_name** (string) - Optional - Target node name (alternative to `to_id`) - **to_file** (string) - Optional - Disambiguate `to_name` by file path For each endpoint, either the `_id` or `_name` parameter must be provided. ### Response #### Success Response (200) - **from_id** (string) - The ID of the starting node. - **to_id** (string) - The ID of the target node. - **path_found** (boolean) - Indicates if a path was found. - **path** (array) - An array of node IDs representing the path, if found. - **length** (number) - The length of the path, if found. ### Response Example ```json { "from_id": "abc123", "to_id": "def456", "path_found": true, "path": ["abc123", "mid789", "def456"], "length": 3 } ``` Returns `{ "path_found": false }` if no path exists. ``` -------------------------------- ### List All Project Memories with Coraline Source: https://greysquirr3l.github.io/coraline/mcp-tools.html View a list of all available project memories. This command does not require any input parameters. ```bash coraline list_memories ``` -------------------------------- ### Show Project Statistics Source: https://greysquirr3l.github.io/coraline/mcp-tools.html Displays project statistics including total files, nodes, edges, and unresolved reference counts. This provides a high-level overview of the project's indexed state. ```json { "files": 128, "nodes": 4201, "edges": 9872, "unresolved": 153, "db_size_bytes": 2097152 } ``` -------------------------------- ### Implement a New Framework Resolver Source: https://greysquirr3l.github.io/coraline/development.html Steps to implement a new framework resolver by creating a Rust file implementing the `FrameworkResolver` trait, adding it to `default_resolvers()`, and declaring it in the `mod.rs` file. ```rust #![allow(unused)] fn main() { pub struct MyLangResolver; impl FrameworkResolver for MyLangResolver { fn name(&self) -> &'static str { "my_lang" } fn detect(&self, project_root: &Path) -> bool { ... } fn resolve_to_paths(&self, ctx: &ResolveContext<'_>) -> Vec { ... } } } ``` ```rust pub mod my_lang; ``` -------------------------------- ### Write a Project Memory with Coraline Source: https://greysquirr3l.github.io/coraline/mcp-tools.html Use this command to create or update a project memory file stored in `.coraline/memories/`. The memory name should not include the `.md` extension. ```bash coraline write_memory --name "project_overview" --content "# Project Overview This project aims to..." ``` -------------------------------- ### Development and Testing Commands Source: https://greysquirr3l.github.io/coraline/development.html Common Cargo commands for development, including building in debug and release modes, running all tests, running tests with captured output, running specific tests, linting, and formatting. ```bash # Development build cargo build --all-features # Release build cargo build --release --all-features # Run all tests cargo test --all-features # Run tests with output cargo test --all-features -- --nocapture # Run a specific test by name cargo test resolve_unresolved # Run a specific integration test file cargo test --test extraction_test # Lint (project default clippy baseline) cargo lint # Format cargo fmt # Check formatting without modifying cargo fmt -- --check ``` -------------------------------- ### Manage Coraline project configuration Source: https://greysquirr3l.github.io/coraline/cli-reference.html Read or update the project configuration. Supports printing the full config, a specific section, or setting values. ```bash coraline config ``` ```bash coraline config --section context ``` ```bash coraline config --json ``` ```bash coraline config --set context.max_nodes=30 ``` ```bash coraline config --set indexing.batch_size=50 ``` ```bash coraline config --set vectors.enabled=true ``` -------------------------------- ### Coraline Serve with JSON-RPC Source: https://greysquirr3l.github.io/coraline/print.html Pipe JSON-RPC messages to the `coraline serve` command to interact with Coraline as a language server. ```bash printf '%s\n%s\n%s\n' \ '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"test","version":"0.0.1"}}}' \ '{"jsonrpc":"2.0","method":"notifications/initialized"}' \ '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \ | coraline serve --mcp ``` -------------------------------- ### Register Tool in Registry Source: https://greysquirr3l.github.io/coraline/print.html Register the newly implemented tool in `src/tools/mod.rs` within the `create_default_registry(...)` function. ```rust #![allow(unused)] fn main() { registry.register(Box::new(MyTool::new(project_root.to_path_buf()))); } ``` -------------------------------- ### Show Index Statistics Source: https://greysquirr3l.github.io/coraline/cli-reference.html Displays statistics about the project's index, such as file count, node count, edge count, and unresolved references. Use --json to output the statistics in JSON format. ```bash coraline stats coraline stats --json ``` -------------------------------- ### Manage Coraline Project Configuration Source: https://greysquirr3l.github.io/coraline/print.html Reads or updates the project configuration file. Supports printing the full config, a specific section, or as JSON. Values can be set using key-value pairs. ```bash coraline config # Print full config (TOML) coraline config --section context # Print one section coraline config --json # Print as JSON coraline config --set context.max_nodes=30 # Update a value coraline config --set indexing.batch_size=50 coraline config --set vectors.enabled=true ``` -------------------------------- ### coraline_get_config Source: https://greysquirr3l.github.io/coraline/mcp-tools.html Reads the current project configuration from `.coraline/config.toml`. ```APIDOC ## `coraline_get_config` ### Description Read the current project configuration from `.coraline/config.toml`. ### Output Full `CoralineConfig` as JSON with all four sections (`indexing`, `context`, `sync`, `vectors`). ``` -------------------------------- ### Read Specific Configuration Section Source: https://greysquirr3l.github.io/coraline/configuration.html Command to display a specific section of the Coraline configuration. ```bash coraline config --section context coraline config --section indexing ``` -------------------------------- ### Find Files by Pattern Source: https://greysquirr3l.github.io/coraline/print.html Find files within the project that match a given name, substring, or glob pattern. The search recursively walks the project tree and skips common directories like `.git` and `node_modules`. ```python coraline_find_file(pattern='*.rs', limit=20) ``` -------------------------------- ### Run Lints and Tests Source: https://greysquirr3l.github.io/coraline/print.html Execute cargo lint and run all tests with all features enabled, capturing the output to grep for the test result summary. ```bash cargo lint && cargo test --all-features 2>&1 | grep "test result" ``` -------------------------------- ### Perform Full Project Reindex Source: https://greysquirr3l.github.io/coraline/cli-reference.html Executes a full reindex of the project, parsing all source files and updating the knowledge graph. Use -f to force re-parsing of unchanged files or -q for silent operation. ```bash coraline index # Index current directory coraline index /path/to/project # Index a specific path coraline index -f # Force full re-parse coraline index -q # Silent (useful in scripts) ``` -------------------------------- ### Output Configuration as JSON Source: https://greysquirr3l.github.io/coraline/configuration.html Command to output the entire Coraline configuration specifically as JSON. ```bash coraline config --json ``` -------------------------------- ### Find Files by Pattern Source: https://greysquirr3l.github.io/coraline/mcp-tools.html Finds files within the project by name or glob pattern. It recursively searches the project tree, excluding common directories like `.git` and `node_modules`. Use `limit` to control the maximum number of results. ```json { "pattern": "*.rs", "files": ["src/lib.rs", "src/db.rs", "src/graph.rs"], "count": 3 } ``` -------------------------------- ### Write Project Memory Source: https://greysquirr3l.github.io/coraline/print.html Writes or updates a project memory in Markdown format. Requires a memory name and its content. -------------------------------- ### Add Custom Environment Exclusion Source: https://greysquirr3l.github.io/coraline/configuration.html If your project uses a non-standard naming convention for virtual environments, add an explicit `exclude_pattern` to prevent indexing them. ```toml exclude_patterns = ["**/my_custom_env/**"] ```