Contributing¶
Contributing to liter-llm¶
Thank you for your interest in contributing to liter-llm! This guide will help you get started with development.
Table of Contents¶
- Development Setup
- Development Workflow
- Adding Providers
- E2E Tests
- Exploring Tasks
- Code Quality
- Submitting Changes
Development Setup¶
Task Installation¶
This project uses Task for task automation and orchestration. Task is a task runner that simplifies development workflows across multiple languages and platforms.
Install Task¶
Choose the installation method for your platform:
macOS (Homebrew):
Linux:
# Using the installer script
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
# Or via package managers:
apt install go-task # Debian/Ubuntu
pacman -S go-task # Arch
Windows:
For complete installation instructions, visit the official Task documentation.
Quick Start¶
After installing Task, set up your development environment:
# One-time setup - installs all dependencies
task setup
# Build in dev mode (fast iteration)
task build:dev
The setup command will install Rust, Python, Node.js, Go, Java, and Elixir tooling as needed.
Development Workflow¶
Common Commands¶
# Build all crates
task build
# Build in dev mode (fast iteration)
task build:dev
# Build in release mode (optimized)
task build:release
# Format all code
task format
# Run all linters via prek
task lint
# Generate READMEs from templates
task generate-readme
Language-Specific Tasks¶
Each language binding has its own namespace:
Rust:
Python:
Node.js:
task node:build # Build NAPI-RS native module (release)
task node:build:dev # Build in debug mode
task node:test
Go:
task go:build # Build Go bindings (requires FFI)
task go:build:ffi # Build FFI static library for Go
task go:test
task go:format
task go:lint
Java:
Elixir:
Ruby:
task ruby:build # Build Ruby native extension
task ruby:test # Run Ruby tests
task ruby:format # Format Ruby code
task ruby:lint # Lint Ruby code
WebAssembly:
task wasm:build # Build WASM package (web target)
task wasm:build:bundler # Build WASM package (bundler target)
task wasm:build:node # Build WASM package (Node.js target)
task wasm:test # Run WASM tests
C:
task c:build:ffi # Build FFI library for C tests
task c:e2e:build # Build C E2E tests
task c:e2e:test # Run C E2E tests
Adding Providers¶
Steps¶
-
Add a provider entry to
schemas/providers.json:{ "my-provider": { "base_url": "https://api.myprovider.com/v1", "auth_header": "Authorization", "auth_prefix": "Bearer", "model_prefixes": ["my-provider/"], "parameter_mappings": {} } }Fields:
base_url(required): Provider API base URLauth_header(required): Header name for authenticationauth_prefix(optional): Prefix for the auth value (e.g. "Bearer")model_prefixes(required): Model name prefixes that route to this providerparameter_mappings(optional): Map OpenAI parameter names to provider-specific names
-
Regenerate types
-
Build and test
-
Regenerate E2E tests
E2E Tests¶
E2E tests are generated from JSON fixtures in tools/e2e-generator/fixtures/ and produce runnable test suites for each language binding.
# Generate E2E tests for all languages
task e2e:generate:all
# Generate for a specific language
task e2e:generate:rust
task e2e:generate:python
task e2e:generate:go
task e2e:generate:java
task e2e:generate:elixir
task e2e:generate:ruby
task e2e:generate:c
# Run Rust E2E tests
task e2e:test:rust
Generated test files in e2e/ should not be edited directly — modify fixtures or the generator source instead.
Exploring Tasks¶
Code Quality¶
Pre-commit Hooks¶
The project uses prek for pre-commit hooks:
# Install hooks
prek install
prek install --hook-type commit-msg
# Run all hooks manually
prek run --all-files
Commit Messages¶
We use conventional commits:
feat: add support for new-providerfix: correct auth header injectiondocs: update installation instructionschore: update dependenciestest: add tests for streaming
Submitting Changes¶
-
Create a feature branch
-
Make your changes and run checks locally:
-
Commit and push
-
Create a Pull Request — link any related issues and ensure CI passes.
Maintenance Tasks¶
Version Synchronization¶
Version is managed in Cargo.toml workspace and synced across all manifests:
Questions?¶
- Check existing issues
- Join our Discord community
Thank you for contributing to liter-llm!