Contributing to liter-llm
Thank you for your interest in contributing to liter-llm! This guide will help you get started with development.
Development Setup
Section titled “Development Setup”Task Installation
Section titled “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
Section titled “Install Task”Choose the installation method for your platform:
macOS (Homebrew):
brew install go-taskLinux:
# Using the installer scriptsh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin# Or via package managers:apt install go-task # Debian/Ubuntupacman -S go-task # ArchWindows:
# Using Scoopscoop install task
# Or using Chocolateychoco install go-taskFor complete installation instructions, visit the official Task documentation.
Quick Start
Section titled “Quick Start”After installing Task, set up your development environment:
# One-time setup - installs all dependenciestask setup
# Build in dev mode (fast iteration)task build:devThe setup command will install Rust, Python, Node.js, Go, Java, and Elixir tooling as needed.
Development Workflow
Section titled “Development Workflow”Common Commands
Section titled “Common Commands”# Build all cratestask build
# Build in dev mode (fast iteration)task build:dev
# Build in release mode (optimized)task build:release# Run all teststask test
# Run all checks (lint + test)task check# Format all codetask format
# Run all linters via prektask lint
# Generate READMEs from templatestask generate:readme# Update all dependenciestask update
# Clean all build artifactstask cleanLanguage-Specific Tasks
Section titled “Language-Specific Tasks”Each language binding has its own namespace:
Rust:
task rust:buildtask rust:testtask rust:formattask rust:lintPython:
task python:installtask python:testtask python:formattask python:lintNode.js:
task node:build # Build NAPI-RS native module (release)task node:build:dev # Build in debug modetask node:testGo:
task go:build # Build Go bindings (requires FFI)task go:build:ffi # Build FFI static library for Gotask go:testtask go:formattask go:lintJava:
task java:build:ffi # Build FFI shared library for Javatask java:testElixir:
task elixir:build # Compile (includes Rustler NIF)task elixir:testtask elixir:depsRuby:
task ruby:build # Build Ruby native extensiontask ruby:test # Run Ruby teststask ruby:format # Format Ruby codetask ruby:lint # Lint Ruby codeWebAssembly:
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 testsC:
task c:build:ffi # Build FFI library for C teststask c:e2e:build # Build C E2E teststask c:e2e:test # Run C E2E testsAdding Providers
Section titled “Adding Providers”-
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
Terminal window task generate:types -
Build and test
Terminal window task build:devtask test -
Regenerate E2E tests
Terminal window task e2e:generate:alltask test
E2E Tests
Section titled “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 languagestask e2e:generate:all
# Generate for a specific languagetask e2e:generate:rusttask e2e:generate:pythontask e2e:generate:gotask e2e:generate:javatask e2e:generate:elixirtask e2e:generate:rubytask e2e:generate:c
# Run Rust E2E teststask e2e:test:rustGenerated test files in e2e/ should not be edited directly – modify fixtures or the generator source instead.
Exploring Tasks
Section titled “Exploring Tasks”# Show all available taskstask --list
# Show all tasks including internal onestask --list-allCode Quality
Section titled “Code Quality”Pre-commit Hooks
Section titled “Pre-commit Hooks”The project uses prek for pre-commit hooks:
# Install hooksprek installprek install --hook-type commit-msg
# Run all hooks manuallyprek run --all-filesCommit Messages
Section titled “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
Section titled “Submitting Changes”-
Create a feature branch
Terminal window git checkout -b feat/add-provider-support -
Make your changes and run checks locally:
Terminal window task check -
Commit and push
Terminal window git commit -m "feat: add support for new provider"git push origin feat/add-provider-support -
Create a Pull Request – link any related issues and ensure CI passes.
Maintenance Tasks
Section titled “Maintenance Tasks”Version Synchronization
Section titled “Version Synchronization”Version is managed in Cargo.toml workspace and synced across all manifests:
task version:syncQuestions?
Section titled “Questions?”- Check existing issues
- Join our Discord community