ccc
cocoindex-io/cocoindex-code
Semantic code search and indexing for your codebase with CLI-based querying.
What is ccc?
ccc is a CLI tool for CocoIndex Code that enables semantic search across your codebase and manages the search index. Use it when you need to find code by concept or functionality, update the index after changes, or explore the codebase structure.
- Search the codebase semantically by concept, functionality, or behavior rather than exact syntax
- Filter search results by programming language using --lang flag
- Restrict search to specific directory paths using --path glob patterns
- Paginate through results with --offset and --limit for comprehensive exploration
- Automatically initialize and manage the codebase index without user intervention
- Keep the index fresh by re-indexing after significant code changes
How to install ccc
npx skills add https://github.com/cocoindex-io/cocoindex-code --skill ccc- Node.js and npm installed
- ccc CLI installed (via npx skills add or direct installation)
How to use ccc
- 1.Run `ccc init` from the project root if this is the first time using ccc in this project
- 2.Run `ccc index` to build the initial semantic index of your codebase
- 3.Use `ccc search <query>` with natural language describing what you're looking for (e.g., 'database connection pooling')
- 4.Optionally filter results with `--lang python` or `--path 'src/api/*'` flags
- 5.Use `--offset` and `--limit` to paginate through additional results if needed
- 6.Re-run `ccc index` after making significant code changes to keep the index current
Use cases
- Finding database connection pooling logic across a large codebase
- Locating user authentication flows when implementing security features
- Discovering error handling and retry logic patterns in existing code
- Searching for API request validation code when building new endpoints
- Exploring code organization and module structure during onboarding or refactoring
- Developers working in large or unfamiliar codebases
- Teams needing to understand code patterns and architecture
- Engineers performing refactoring or feature implementation
- Code reviewers searching for related implementations
ccc FAQ
Search by concept, functionality, or behavior (e.g., 'user authentication flow'), not exact syntax. The semantic search understands intent rather than literal code patterns.
Re-index after significant changes like adding new files, refactoring modules, or renaming components. There's no need to re-index between consecutive searches if no code changed.
Use `--lang python` (repeatable) to filter by language and `--path 'src/api/*'` to restrict to a directory glob pattern.
Run `ccc init` from the project root, then `ccc index` to build the index, then retry your search command.
Use your editor's file-reading tool to load the matched file, or use `sed -n '<start>,<end>p' <file>` in the terminal to extract the specific line range returned.
Full instructions (SKILL.md)
Source of truth, from cocoindex-io/cocoindex-code.
name: ccc description: "This skill should be used when code search is needed (whether explicitly requested or as part of completing a task), when indexing the codebase after changes, or when the user asks about ccc, cocoindex-code, or the codebase index. Trigger phrases include 'search the codebase', 'find code related to', 'update the index', 'ccc', 'cocoindex-code'."
ccc - Semantic Code Search & Indexing
ccc is the CLI for CocoIndex Code, providing semantic search over the current codebase and index management.
Ownership
The agent owns the ccc lifecycle for the current project — initialization, indexing, and searching. Do not ask the user to perform these steps; handle them automatically.
- Initialization: If
ccc searchorccc indexfails with an initialization error (e.g., "Not in an initialized project directory"), runccc initfrom the project root directory, thenccc indexto build the index, then retry the original command. - Index freshness: Keep the index up to date by running
ccc index(orccc search --refresh) when the index may be stale — e.g., at the start of a session, or after making significant code changes (new files, refactors, renamed modules). There is no need to re-index between consecutive searches if no code was changed in between. - Installation: If
cccitself is not found (command not found), refer to management.md for installation instructions and inform the user.
Searching the Codebase
To perform a semantic search:
ccc search <query terms>
The query should describe the concept, functionality, or behavior to find, not exact code syntax. For example:
ccc search database connection pooling
ccc search user authentication flow
ccc search error handling retry logic
Filtering Results
-
By language (
--lang, repeatable): restrict results to specific languages.ccc search --lang python --lang markdown database schema -
By path (
--path): restrict results to a glob pattern relative to project root. If omitted, defaults to the current working directory (only results under that subdirectory are returned).ccc search --path 'src/api/*' request validation
Pagination
Results default to the first page. To retrieve additional results:
ccc search --offset 5 --limit 5 database schema
If all returned results look relevant, use --offset to fetch the next page — there are likely more useful matches beyond the first page.
Working with Search Results
Search results include file paths and line ranges. To explore a result in more detail:
- Use the editor's built-in file reading capabilities (e.g., the
Readtool) to load the matched file and read lines around the returned range for full context. - When working in a terminal without a file-reading tool, use
sed -n '<start>,<end>p' <file>to extract a specific line range.
Settings
To view or edit embedding model configuration, include/exclude patterns, or language overrides, see settings.md.
Management & Troubleshooting
For installation, initialization, daemon management, troubleshooting, and cleanup commands, see management.md.
Related skills
More from cocoindex-io/cocoindex-code and the wider catalog.

architecture-diagram
Create professional dark-themed architecture diagrams as self-contained HTML+SVG files.

app-icon
Generate professional app icons for React Native Expo apps with iOS 26 Liquid Glass support.

github-issue-triage
Agent skill from code-yeongyu/oh-my-openagent.

github-triage
Read-only GitHub issue and PR analyzer that spawns background tasks for evidence-backed triage reports.

github-issue-triage
Triage GitHub issues with streaming analysis—one background task per issue for real-time results.
build-tam
Build a Total Addressable Market list by sourcing accounts and contacts from Crustdata, Dropleads, and PDL.