CLI Reference
The intend CLI is your primary tool for managing projects and compiling intents.
Global Flags
--help,-h: Show help for a command.--version,-v: Show the CLI version.
Commands
init
Initialize a new Intend project.
bash
intend init <project_name>Scaffolds a new directory with a default configuration, directory structure, and example files.
build
Compile all .intent files in the current project.
bash
intend build [options]Options:
| Flag | Description |
|---|---|
--output <dir> | Override the output directory specified in config. |
--config <file> | Use a specific configuration file (default: intend.config.json). |
--provider <name> | Override the AI provider (gemini or ollama). |
--model <name> | Override the model name (e.g., gemini-1.5-pro, llama3). |
--api-key <key> | Override the API key for cloud providers. |
--watch | Watch for file changes and rebuild automatically. |
--force | Force a full rebuild, ignoring the intend.lock file. |
--debug | Enable verbose logging. Shows system prompts, user prompts, and reasoning. |
--attempts <num> | Max retry attempts for AI generation (default: 3). |
watch
Watch for changes in .intent files and recompile them automatically.
bash
intend watch [options]Options:
| Flag | Description |
|---|---|
--output <dir> | Override the output directory. |
--config <file> | Use a specific config file. |
--provider <name> | Override the AI provider. |
--api-key <key> | Override the API key. |
parse
Debug command to test the parser on a specific file. Prints the AST (Abstract Syntax Tree).
bash
intend parse <file_path> [options]Options:
--cst: Print the Concrete Syntax Tree (CST) instead of the AST. Useful for debugging grammar issues.