Skip to content

Latest commit

 

History

History
323 lines (240 loc) · 6.15 KB

File metadata and controls

323 lines (240 loc) · 6.15 KB

SAIGEN CLI Reference

Complete command-line reference for the SAIGEN (SAI Data Generation) tool.

Overview

SAIGEN is an AI-powered tool for generating, validating, and managing software metadata (saidata) files.

Global Options

saigen [OPTIONS] COMMAND [ARGS]...

Options

  • --version - Show version and exit
  • --help - Show help message and exit
  • --config PATH - Path to configuration file
  • --verbose, -v - Increase verbosity
  • --quiet, -q - Decrease verbosity

Commands

Generation Commands

generate

Generate saidata for software.

saigen generate [OPTIONS] SOFTWARE

Options:

  • --provider TEXT - Package manager provider (apt, dnf, brew, etc.)
  • --output PATH - Output file path
  • --llm-provider TEXT - LLM provider (openai, anthropic, ollama)
  • --model TEXT - LLM model name
  • --use-rag - Use RAG for enhanced generation
  • --force - Overwrite existing file

Examples:

saigen generate nginx --provider apt
saigen generate docker --provider brew
saigen generate nginx --provider apt --use-rag
saigen generate nginx --llm-provider anthropic --model claude-4-sonnet

batch generate

Generate saidata for multiple packages.

saigen batch generate [OPTIONS]

Options:

  • --from PATH - File with list of packages
  • --provider TEXT - Package manager provider
  • --output-dir PATH - Output directory
  • --parallel N - Number of parallel generations
  • --continue-on-error - Continue if one fails

Examples:

saigen batch generate --from packages.txt --provider apt
saigen batch generate --from packages.txt --provider apt --parallel 4

Validation Commands

validate

Validate saidata file against schema.

saigen validate [OPTIONS] FILE

Options:

  • --schema PATH - Custom schema file
  • --strict - Strict validation mode

Examples:

saigen validate nginx.yaml
saigen validate nginx.yaml --strict

test

Test saidata file using MCP server.

saigen test [OPTIONS] FILE

Options:

  • --mcp-server TEXT - MCP server to use
  • --action TEXT - Specific action to test

Examples:

saigen test nginx.yaml
saigen test nginx.yaml --action install

See testing-guide.md for detailed testing documentation.

Repository Management

repo update

Update package repository cache.

saigen repo update [OPTIONS] [PROVIDER]

Options:

  • --all - Update all repositories
  • --force - Force update even if cache is fresh

Examples:

saigen repo update apt
saigen repo update --all

repo list

List available repositories.

saigen repo list [OPTIONS]

Options:

  • --cached - Show only cached repositories
  • --stats - Show statistics

Examples:

saigen repo list
saigen repo list --stats

repo search

Search for packages in repositories.

saigen repo search [OPTIONS] QUERY

Options:

  • --provider TEXT - Limit to specific provider
  • --limit N - Limit results

Examples:

saigen repo search nginx
saigen repo search nginx --provider apt

repo info

Show repository information.

saigen repo info [OPTIONS] PROVIDER

Examples:

saigen repo info apt
saigen repo info brew

See repository-management.md for detailed documentation.

Update Commands

refresh-versions

Refresh version information in saidata.

saigen refresh-versions [OPTIONS] FILE

Options:

  • --provider TEXT - Provider to check
  • --all-providers - Check all providers
  • --dry-run - Preview changes

Examples:

saigen refresh-versions nginx.yaml
saigen refresh-versions nginx.yaml --all-providers

See refresh-versions-command.md for detailed documentation.

update

Update existing saidata file.

saigen update [OPTIONS] FILE

Options:

  • --refresh-urls - Refresh download URLs
  • --refresh-versions - Refresh version info
  • --add-action TEXT - Add new action
  • --llm-provider TEXT - LLM provider for enhancements

Examples:

saigen update nginx.yaml --refresh-urls
saigen update nginx.yaml --add-action configure

Statistics Commands

stats

Show generation statistics.

saigen stats [OPTIONS]

Options:

  • --provider TEXT - Filter by provider
  • --date-range TEXT - Date range (e.g., "7d", "1m")

Examples:

saigen stats
saigen stats --provider apt
saigen stats --date-range 7d

See stats-command.md for detailed documentation.

Cache Management

cache clear

Clear repository cache.

saigen cache clear [OPTIONS] [PROVIDER]

Options:

  • --all - Clear all caches

Examples:

saigen cache clear apt
saigen cache clear --all

cache info

Show cache information.

saigen cache info [OPTIONS]

Examples:

saigen cache info

Configuration Commands

config show

Show current configuration.

saigen config show [OPTIONS]

Examples:

saigen config show

config validate

Validate configuration file.

saigen config validate [OPTIONS] [PATH]

Examples:

saigen config validate
saigen config validate ~/.saigen/config.yaml

Configuration

See configuration-guide.md for detailed configuration documentation.

Exit Codes

  • 0 - Success
  • 1 - General error
  • 2 - Command-line usage error
  • 3 - Configuration error
  • 4 - Validation error
  • 5 - Generation error

Environment Variables

  • SAIGEN_CONFIG - Path to configuration file
  • SAIGEN_CACHE_DIR - Override cache directory
  • SAIGEN_LOG_LEVEL - Set log level (DEBUG, INFO, WARNING, ERROR)
  • OPENAI_API_KEY - OpenAI API key
  • ANTHROPIC_API_KEY - Anthropic API key

See Also