Skip to content

Commands ​

Complete reference for all AI-First CLI commands.

init ​

Initialize AI-First and generate context files.

bash
ai-first init [options]

Options ​

FlagAliasDescriptionDefault
--root <path>-rRoot directoryprocess.cwd()
--output <path>-oOutput directory./ai

Example ​

bash
ai-first init --root ./my-project --output ./docs/ai

index ​

Create SQLite index for fast symbol queries.

bash
ai-first index [options]

Options ​

FlagAliasDescription
--root <path>-rRoot directory
--output <path>-oOutput directory
--semantic-sEnable semantic indexing with embeddings

Example ​

bash
# Basic indexing
ai-first index

# Semantic indexing (for large repos)
ai-first index --semantic

doctor ​

Check repository health and AI readiness.

bash
ai-first doctor [options]

Options ​

FlagDescription
--fixAuto-fix issues when possible

Example ​

bash
ai-first doctor
ai-first doctor --fix

explore ​

Navigate module dependencies.

bash
ai-first explore <module>

Example ​

bash
# List all modules
ai-first explore all

# Explore specific module
ai-first explore src
ai-first explore lib

map ​

Generate repository architecture map.

bash
ai-first map [options]

Options ​

FlagAliasDescription
--root <path>-rRoot directory
--output <path>-oOutput path

summarize ​

Create hierarchical summary for AI navigation.

bash
ai-first summarize [options]

Options ​

FlagAliasDescription
--root <path>-rRoot directory
--output <path>-oOutput path

context ​

Generate unified context file.

bash
ai-first context [options]

Global Options ​

These options work with all commands:

FlagDescription
--helpShow help
--versionShow version number

Exit Codes ​

CodeDescription
0Success
1Error

Released under the MIT License.