Generate code from natural language descriptions:
# Basic code generation
gollm generate "Create a function to sort a list of dictionaries by key"
# Generate with validation
gollm generate "Create a REST API endpoint" --validate
# Fast generation (skips validation)
gollm generate "Quick script to parse CSV" --fast
# Validate a single file
gollm validate path/to/file.py
# Validate entire project
gollm validate-project
# Validate with specific rules
gollm validate --rules=pep8,security path/to/file.py
# Initialize a new project
gollm init
# Check project status
gollm status
# List all TODOs in project
gollm todo list
# Generate changelog
gollm changelog generate
goLLM supports multiple LLM adapters:
# Use modular adapter (default)
gollm generate "Create a class" --adapter-type modular
# Use HTTP adapter
gollm generate "Create a class" --adapter-type http
# Process all Python files in a directory
gollm process ./src --output ./output
# Process with specific options
gollm process ./src --validate --fix --format
Create a gollm.json
file in your project root:
{
"validation": {
"enabled": true,
"rules": ["pep8", "security", "performance"]
},
"generation": {
"default_adapter": "modular",
"validate_output": true
}
}
name: goLLM Validation
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install goLLM
run: |
python -m pip install --upgrade pip
pip install gollm[llm]
- name: Run validation
run: gollm validate-project
# Install all required dependencies
pip install -r requirements.txt
# Set your API key
export GOLLM_API_KEY='your-api-key'
# Get detailed error information
gollm validate --verbose path/to/file.py