CLI Reference
Complete reference for all livectx commands and options.
Commands
generate
Generate context files from your codebase.
$ livectx generate [flags]Flags
| Flag | Description | Default |
|---|---|---|
| --output, -o | Output directory | . |
| --dry-run | Preview without writing files | false |
| --verbose, -v | Show detailed output | false |
| --no-color | Disable colored output | false |
| --no-cache | Ignore cache and force full regeneration | false |
| --include-secrets | Include files with potential secrets (use with caution) | false |
Examples
$ livectx generate$ livectx generate --output ./docs$ livectx generate --dry-run --verbose$ livectx generate --no-cacheci
Generate context and commit/push changes. Designed for CI/CD pipelines.
$ livectx ci [flags]This command runs livectx generate internally, then optionally commits and pushes the changes. It automatically detects CI environments (GitHub Actions, GitLab CI, CircleCI, etc.) and configures git appropriately.
Flags
| Flag | Description | Default |
|---|---|---|
| --commit | Create a git commit with changes | false |
| --push | Push changes to remote (implies --commit) | false |
| --message, -m | Commit message | "chore: update context files [skip ci]" |
| --skip-if-unchanged | Skip commit/push if no changes | true |
| --output, -o | Output directory | . |
Examples
$ livectx ci # Just generate (same as 'livectx generate')$ livectx ci --commit # Generate and commit if changed$ livectx ci --commit --push # Generate, commit, and push$ livectx ci --commit -m "docs: update" # Custom commit messagevalidate
Validate configuration and optionally test API connectivity.
$ livectx validate [flags]Flags
| Flag | Description |
|---|---|
| --check-api | Test API connectivity |
integrate
Configure AI coding tools to use livectx context files.
$ livectx integrate [tool...] [flags]Supported tools:
claude-code— Adds references to CLAUDE.mdcursor— Adds references to .cursorrulescopilot— Adds references to .github/copilot-instructions.md
Flags
| Flag | Description |
|---|---|
| --all | Integrate with all tools (even if not detected) |
| --dry-run | Preview changes without writing files |
Examples
$ livectx integrate # Auto-detect and configure$ livectx integrate --all # All tools$ livectx integrate claude-code cursor # Specific tools$ livectx integrate --dry-run # Preview changesinit
Create a configuration file in the current directory.
$ livectx initversion
Display version and build information.
$ livectx versionOutput includes:
- Version number
- Build date
- Git commit
- Go version
- OS/Architecture
completion
Generate shell completion scripts.
$ livectx completion bash # Add to ~/.bashrc: eval "$(livectx completion bash)"$ livectx completion zsh # Add to ~/.zshrc: eval "$(livectx completion zsh)"$ livectx completion fish # Add to config.fish: livectx completion fish | sourceConfiguration
Create a .livectx.yaml file in your project root to customize behavior.
Full Configuration Example
# Output settings
output_dir: "."
context_file: "CONTEXT.md"
prompt_file: "SYSTEM_PROMPT.md"
# Scanner settings
max_file_size: 102400 # 100KB - files larger are skipped
max_files: 500 # Maximum number of files to include
# Patterns to exclude (in addition to .gitignore)
exclude:
- "*.test.js"
- "*.spec.ts"
- "**/__tests__/**"
- "**/fixtures/**"
- "**/testdata/**"
# Patterns to include (if set, only matching files are included)
include:
- "*.go"
- "*.ts"
- "*.tsx"
# LLM configuration
llm:
provider: "anthropic" # or "openrouter"
model: "claude-sonnet-4-20250514"Configuration Options
Output Settings
| Option | Description | Default |
|---|---|---|
| output_dir | Directory for output files | "." |
| context_file | Name of context file | "CONTEXT.md" |
| prompt_file | Name of system prompt file | "SYSTEM_PROMPT.md" |
Scanner Settings
| Option | Description | Default |
|---|---|---|
| max_file_size | Maximum file size in bytes | 102400 (100KB) |
| max_files | Maximum number of files | 500 |
| exclude | Glob patterns to exclude | [] |
| include | Glob patterns to include | [] (all files) |
LLM Settings
| Option | Description | Default |
|---|---|---|
| llm.provider | "anthropic" or "openrouter" | "anthropic" |
| llm.model | Model ID to use | "claude-sonnet-4-20250514" |
Environment Variables
| Variable | Description |
|---|---|
| ANTHROPIC_API_KEY | API key for Anthropic Claude |
| OPENROUTER_API_KEY | API key for OpenRouter |
| NO_COLOR | Disable colored output (any value) |
Config options can also be set via environment variables with the LIVECTX_ prefix. For example, LIVECTX_MAX_FILES=200.