gollm

Getting Started with goLLM

Prerequisites

Installation

Using pip

# Basic installation
pip install gollm

# With LLM support (recommended)
pip install gollm[llm]

# For development
pip install -e .[dev]

From Source

# Clone the repository
git clone https://github.com/wronai/gollm.git
cd gollm

# Install in development mode
pip install -e .[dev]

Quick Start

1. Initialize a Project

# Create a new directory
mkdir my_project
cd my_project

# Initialize goLLM
gollm init

This creates a gollm.json configuration file with default settings.

2. Validate Your Code

# Create a Python file
echo 'def hello():
    print("Hello, World!")' > hello.py

# Validate the file
gollm validate hello.py

3. Generate Code

# 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

Project Structure

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

Configuration

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"
  }
}

Common Tasks

Validate Code

# Validate a single file
gollm validate src/main.py

# Validate entire project
gollm validate-project

Generate Code

# 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

Manage TODOs

# List all TODOs
gollm todo list

# Add a new TODO
gollm todo add "Implement user authentication"

# Complete a TODO
gollm todo complete 1

Update Changelog

# Show changelog
gollm changelog show

# Add a change
gollm changelog add "Added user authentication"

# Bump version
gollm changelog bump 1.0.0

Next Steps

Getting Help