# Basic installation
pip install gollm
# With LLM support (recommended)
pip install gollm[llm]
# For development
pip install -e .[dev]
# Clone the repository
git clone https://github.com/wronai/gollm.git
cd gollm
# Install in development mode
pip install -e .[dev]
# Create a new directory
mkdir my_project
cd my_project
# Initialize goLLM
gollm init
This creates a gollm.json
configuration file with default settings.
# Create a Python file
echo 'def hello():
print("Hello, World!")' > hello.py
# Validate the file
gollm validate hello.py
# Generate a simple function
gollm generate "Create a function that calculates factorial" -o math_utils.py
# Generate a complete project
gollm generate "Create a Flask web application with user authentication" -o myapp
A typical goLLM project looks like this:
my_project/
├── gollm.json # Configuration file
├── src/ # Source code
│ └── main.py
├── tests/ # Test files
│ └── test_main.py
├── docs/ # Documentation
├── .gollm/ # Cache and temporary files
├── README.md # Project documentation
└── requirements.txt # Python dependencies
Edit gollm.json
to customize goLLM’s behavior:
{
"version": "0.2.0",
"validation_rules": {
"max_line_length": 88,
"max_function_lines": 50,
"require_docstrings": true
},
"project_management": {
"todo_integration": true,
"changelog_integration": true
},
"llm_integration": {
"enabled": true,
"provider": "openai"
}
}
# Validate a single file
gollm validate src/main.py
# Validate entire project
gollm validate-project
# Generate a single file
gollm generate "Create a function to process CSV files" -o csv_utils.py
# Generate a complete project
gollm generate "Create a REST API with FastAPI" -o myapi
# List all TODOs
gollm todo list
# Add a new TODO
gollm todo add "Implement user authentication"
# Complete a TODO
gollm todo complete 1
# Show changelog
gollm changelog show
# Add a change
gollm changelog add "Added user authentication"
# Bump version
gollm changelog bump 1.0.0