CLI Reference

Complete reference for all livectx commands and options.

Commands

generate

Generate context files from your codebase.

Terminal
$ livectx generate [flags]

Flags

FlagDescriptionDefault
--output, -oOutput directory.
--dry-runPreview without writing filesfalse
--verbose, -vShow detailed outputfalse
--no-colorDisable colored outputfalse
--no-cacheIgnore cache and force full regenerationfalse
--include-secretsInclude files with potential secrets (use with caution)false

Examples

Terminal
$ livectx generate
Terminal
$ livectx generate --output ./docs
Terminal
$ livectx generate --dry-run --verbose
Terminal
$ livectx generate --no-cache

ci

Generate context and commit/push changes. Designed for CI/CD pipelines.

Terminal
$ 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

FlagDescriptionDefault
--commitCreate a git commit with changesfalse
--pushPush changes to remote (implies --commit)false
--message, -mCommit message"chore: update context files [skip ci]"
--skip-if-unchangedSkip commit/push if no changestrue
--output, -oOutput directory.

Examples

Terminal
$ livectx ci # Just generate (same as 'livectx generate')
Terminal
$ livectx ci --commit # Generate and commit if changed
Terminal
$ livectx ci --commit --push # Generate, commit, and push
Terminal
$ livectx ci --commit -m "docs: update" # Custom commit message

validate

Validate configuration and optionally test API connectivity.

Terminal
$ livectx validate [flags]

Flags

FlagDescription
--check-apiTest API connectivity

integrate

Configure AI coding tools to use livectx context files.

Terminal
$ livectx integrate [tool...] [flags]

Supported tools:

  • claude-code — Adds references to CLAUDE.md
  • cursor — Adds references to .cursorrules
  • copilot — Adds references to .github/copilot-instructions.md

Flags

FlagDescription
--allIntegrate with all tools (even if not detected)
--dry-runPreview changes without writing files

Examples

Terminal
$ livectx integrate # Auto-detect and configure
Terminal
$ livectx integrate --all # All tools
Terminal
$ livectx integrate claude-code cursor # Specific tools
Terminal
$ livectx integrate --dry-run # Preview changes

init

Create a configuration file in the current directory.

Terminal
$ livectx init

version

Display version and build information.

Terminal
$ livectx version

Output includes:

  • Version number
  • Build date
  • Git commit
  • Go version
  • OS/Architecture

completion

Generate shell completion scripts.

Terminal
$ livectx completion bash # Add to ~/.bashrc: eval "$(livectx completion bash)"
Terminal
$ livectx completion zsh # Add to ~/.zshrc: eval "$(livectx completion zsh)"
Terminal
$ livectx completion fish # Add to config.fish: livectx completion fish | source

Configuration

Create a .livectx.yaml file in your project root to customize behavior.

Full Configuration Example

.livectx.yaml
# 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

OptionDescriptionDefault
output_dirDirectory for output files"."
context_fileName of context file"CONTEXT.md"
prompt_fileName of system prompt file"SYSTEM_PROMPT.md"

Scanner Settings

OptionDescriptionDefault
max_file_sizeMaximum file size in bytes102400 (100KB)
max_filesMaximum number of files500
excludeGlob patterns to exclude[]
includeGlob patterns to include[] (all files)

LLM Settings

OptionDescriptionDefault
llm.provider"anthropic" or "openrouter""anthropic"
llm.modelModel ID to use"claude-sonnet-4-20250514"

Environment Variables

VariableDescription
ANTHROPIC_API_KEYAPI key for Anthropic Claude
OPENROUTER_API_KEYAPI key for OpenRouter
NO_COLORDisable colored output (any value)

Config options can also be set via environment variables with the LIVECTX_ prefix. For example, LIVECTX_MAX_FILES=200.