Complete reference for all CADI command-line interface commands.
--config <path> Path to config file (default: ~/.cadi/config.yaml)
--verbose, -v Enable verbose output
--help, -h Show help
--version Show version
cadi initInitialize a new CADI project.
cadi init [path] [options]Arguments: - path - Directory to
initialize (default: current directory)
Options: - --name <name> -
Project name - --template <template> - Project
template (minimal, library, application)
Example:
cadi init my-project --template librarycadi importImport a project and create Source CADI chunks.
cadi import <path> [options]Arguments: - path - Path to source
files or directory
Options: - --language <lang> -
Source language (rust, python, typescript, etc.) -
--name <name> - Chunk name - --recursive
- Include subdirectories
Example:
cadi import ./src --language rust --name my-librarycadi buildBuild artifacts from a manifest.
cadi build [options]Options: - --manifest <path> -
Path to manifest file (default: cadi.yaml) -
--target <name> - Build target name -
--prefer <rep> - Preferred representation (source,
ir, blob)
Example:
cadi build --target web --prefer ircadi publishPublish chunks to a registry.
cadi publish [options]Options: - --chunks <ids> -
Specific chunk IDs to publish (comma-separated) - --no-sign
- Disable signing (signing is enabled by default if key is configured) -
--registry <url> - Target registry URL -
--dry-run - Perform a trial run without uploading
Example:
cadi publish --signcadi queryQuery the registry for chunks matching a pattern or criteria.
cadi query <pattern> [options]Arguments: - pattern - Search pattern
or chunk ID
Options: - --language <lang> -
Filter by language - --limit <num> - Limit results
(default: 10) - --json - Output in JSON format
Example:
cadi query "auth middleware" --language rustcadi fetchFetch chunks from a registry to local cache.
cadi fetch <chunk_or_manifest> [options]Arguments: - chunk_or_manifest - Chunk
ID or manifest path
Options: - --verify - Verify hash after
fetching - --output <dir> - Output directory
(default: local cache)
Example:
cadi fetch chunk:sha256:abc123... --verifycadi runRun a built application or specific chunk.
cadi run [options]Options: - --manifest <path> -
Path to manifest file - --target <name> - Target to
run - --chunk <id> - Run a specific chunk ID directly
- --sandbox - Run in sandboxed environment -
--env <key=val> - Set environment variable
Example:
cadi run --target server --env PORT=8080cadi validateValidate a CADL file against the specification.
cadi validate <path> [options]Arguments: - path - Path to .cadl
file
Options: - --json - Output validation
report in JSON - --strict - Enable strict validation
mode
Example:
cadi validate my-interface.cadlcadi scrapeScrape and chunk repositories or files.
cadi scrape <url_or_path> [options]Arguments: - url_or_path - URL of a
repository or local file path
Options: - --strategy <name> -
Chunking strategy (file, semantic, fixed) -
--output-dir <dir> - Where to save generated
chunks
Example:
cadi scrape https://github.com/my/repo --strategy semanticcadi planShow the build plan without executing.
cadi plan [options]Options: - --manifest <path> -
Path to manifest file - --target <name> - Target to
plan for - --verbose - Show detailed plan
Example:
cadi plan --target web --verbosecadi verifyVerify chunk integrity and provenance.
cadi verify <chunk_or_manifest> [options]Arguments: - chunk_or_manifest - Chunk
ID or manifest path
Options: - --rebuild - Attempt to
rebuild from source - --verbose - Show verification
details
Example:
cadi verify chunk:sha256:abc123... --rebuildcadi trustManage trusted publishers and trust policies.
cadi trust <subcommand>Subcommands: - add - Add a trusted
publisher - remove - Remove a trusted publisher -
list - List trusted publishers - policy - Show
or set trust policy
Example:
cadi trust add publisher:abc123 --level fullcadi gcGarbage collect local cache.
cadi gc [options]Options: - --status - Show cache status
only - --dry-run - Show what would be removed -
--aggressive - More aggressive cleanup
Example:
cadi gc --dry-runcadi statsShow usage and efficiency statistics.
cadi stats [options]Options: - --detailed - Show detailed
breakdown - --json - Output in JSON format
Example:
cadi stats --detailedcadi demoRun example demonstrations.
cadi demo <name> [options]Arguments: - name - Demo name
(todo-suite)
Options: - --target <target> -
Specific target to demo - --clean - Clean before
building
Example:
cadi demo todo-suite --target web| Variable | Description | Default |
|---|---|---|
CADI_CONFIG |
Config file path | ~/.cadi/config.yaml |
CADI_CACHE |
Cache directory | ~/.cadi/store |
CADI_REGISTRY |
Default registry URL | https://registry.cadi.dev |
CADI_TOKEN |
Authentication token | - |
CADI_LOG |
Log level (tracing) | cadi=info |
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Configuration error |
| 3 | Build failed |
| 4 | Network error |
| 5 | Verification failed |
| 6 | Authentication error |