Skip to content

ace index

Parses and indexes your codebase into ACECode’s semantic search engine.

Terminal window
ace index [options]
FlagDescriptionDefault
-p, --projectProject slug to indexAuto-detected from .ace/config
--forceForce full re-index (ignore change detection)false
--since <commit>Only index files changed since this commit
--api-key <key>Override API keyACE_API_KEY env var
--api-url <url>Override API URLhttps://api.acecode.dev
Terminal window
# Index current project (auto-detect from .ace/config)
ace index
# Index a specific project
ace index -p my-backend
# Force full re-index
ace index --force
# Only index files changed since last commit
ace index --since HEAD~1

The ace index command:

  1. Scans your project for source files
  2. Parses each file using the TypeScript Compiler API (TS/JS) or tree-sitter (other languages)
  3. Splits code into semantic chunks (functions, classes, blocks)
  4. Sends chunks to the API for embedding and storage
  5. Detects unchanged files via content hash — only re-indexes modified files

ACECode uses content hashes to avoid re-indexing unchanged files. On subsequent runs:

📁 Scanning 847 files...
⚡ 823 files unchanged (skipped)
⚡ Indexing 24 changed files...
✅ Done in 3.2s