gollm

CLI Reference

Overview

goLLM provides a command-line interface for common tasks. All commands support the --help flag for more information.

Global Options

Option Description
--config PATH Path to configuration file
--verbose Enable verbose output
--quiet Suppress non-essential output
--version Show version and exit

Commands

gollm init [PATH]

Initialize a new goLLM project.

Options:

Examples:

# Initialize in current directory
gollm init

# Initialize in specific directory
gollm init my_project

gollm validate [PATH]

Validate Python files.

Options:

Examples:

# Validate current directory
gollm validate

# Validate specific file
gollm validate src/main.py

# Validate with specific rules
gollm validate --rules=line-length,function-length

gollm generate PROMPT

Generate code using LLM with quality validation.

Options:

Examples:

# Generate code with prompt
gollm generate "Create a Flask web server"

# Save to file
gollm generate "Create a Flask web server" -o app.py

# Use fast mode for quicker results
gollm generate "Create a Flask web server" --fast

# Specify number of iterations
gollm generate "Create a Flask web server" --iterations 2

gollm direct

Direct API commands for fast LLM access with minimal processing.

gollm direct generate PROMPT

Generate text using direct API access without validation pipeline.

Options:

Examples:

# Generate code with direct API access
gollm direct generate "Write Hello World in Python"

# Use specific model
gollm direct generate "Write Hello World in Python" --model codellama:7b

# Save output to file
gollm direct generate "Write Hello World in Python" -o hello.py

gollm direct chat PROMPT

Chat with LLM using direct API access without validation pipeline.

Options:

Examples:

# Chat with LLM using direct API access
gollm direct chat "How do I use asyncio in Python?"

# Get JSON response
gollm direct chat "How do I use asyncio in Python?" --format json

gollm todo

Manage TODOs in your project.

Subcommands:

Examples:

# List all TODOs
gollm todo list

# Add a new TODO
gollm todo add "Fix login bug"

# Complete a TODO
gollm todo complete 1

gollm changelog

Manage project changelog.

Subcommands:

Examples:

# Show changelog
gollm changelog show

# Add a change
gollm changelog add "Fixed critical security issue"

# Bump version
gollm changelog bump 1.2.3

gollm config

Manage configuration.

Subcommands:

Examples:

# Show all config
gollm config show

# Get specific value
gollm config get validation.max_line_length

# Set a value
gollm config set validation.max_line_length 100

Environment Variables

All CLI options can be set via environment variables with the GOLLM_ prefix:

# Equivalent to --verbose
export GOLLM_VERBOSE=1

# Set default model
export GOLLM_MODEL=gpt-4

Exit Codes

Code Description
0 Success
1 General error
2 Invalid arguments
3 File not found
4 Validation failed
5 Configuration error

Shell Completion

Enable shell completion by adding to your shell’s rc file:

Bash:

eval "$(_GOLLM_COMPLETE=bash_source gollm)" >> ~/.bashrc

Zsh:

eval "$(_GOLLM_COMPLETE=zsh_source gollm)" >> ~/.zshrc

Fish:

gollm --completion fish > ~/.config/fish/completions/gollm.fish

Configuration File

See Configuration Reference for details on the configuration file format.