A CLI tool for AI-assisted coding using Triton LLM backend
Project description
Kubrick CLI
An AI-assisted coding CLI tool powered by your own Triton LLM backend. Like Claude Code, but self-hosted.
Installation
Local Installation
pip install -e .
kubrick
Docker
Understanding Docker File Permissions
CRITICAL: When using Docker, Kubrick creates files in your project. Without proper configuration, these files will be owned by root, causing permission issues.
The Solution:
- Option 1 (Recommended): Use the
kubrick-dockerwrapper - handles permissions automatically - Option 2: Use Docker Compose with exported UID/GID environment variables
- Option 3: Include
--user $(id -u):$(id -g)in every Docker command
Quick Install (Recommended)
Install the kubrick-docker wrapper for easy usage:
# Install from GitHub (installs to ~/.local/bin/kubrick-docker)
curl -fsSL https://raw.githubusercontent.com/rcland12/kubrick-cli/master/scripts/install-kubrick-docker.sh | sh
# Add to PATH if needed (add to ~/.bashrc or ~/.zshrc)
export PATH="$HOME/.local/bin:$PATH"
# Run from any project directory
cd /path/to/your/project
kubrick-docker
Benefits:
- ✅ Automatically handles UID/GID (no configuration needed)
- ✅ Smart image fallback (Docker Hub → GHCR → Local build)
- ✅ Simple command from any directory
- ✅ Files always owned by you, never root
Uninstall:
curl -fsSL https://raw.githubusercontent.com/rcland12/kubrick-cli/master/scripts/uninstall-kubrick-docker.sh | sh
Docker Compose
Use Docker Compose for a convenient alias-style workflow.
Setup (Required): Export UID/GID in your shell config (~/.bashrc or ~/.zshrc):
export UID=$(id -u)
export GID=$(id -g)
Usage:
cd /path/to/your/project
docker compose -f /path/to/kubrick-cli/docker-compose.yaml run --rm kubrick
Manual Docker Commands
IMPORTANT: Always include --user $(id -u):$(id -g) to avoid file permission issues!
cd /path/to/your/project
# From Docker Hub
docker run --rm -it \
--network host \
--user $(id -u):$(id -g) \
-v ${HOME}:/home/kubrick \
-v ${PWD}:/workspace \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
rcland12/kubrick-cli
# From GitHub Container Registry
docker run --rm -it \
--network host \
--user $(id -u):$(id -g) \
-v ${HOME}:/home/kubrick \
-v ${PWD}:/workspace \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
ghcr.io/rcland12/kubrick-cli
Why --user is required:
- Without it, Docker runs as root and creates root-owned files
- With it, files are owned by you and compatible with pip installation
- The container uses
chmod 1777on directories (same as VS Code Dev Containers)
See DOCKER.md for detailed Docker usage, UID/GID configuration, and troubleshooting.
Quick Start
# Basic usage
kubrick
# Custom Triton server
kubrick --triton-url my-server:8000
# Load previous conversation
kubrick --load 20240118_143022
Requirements
- Python 3.8+
- LLM Provider (choose one):
- Triton Inference Server with streaming LLM model (default:
http://localhost:8000) - OpenAI API (GPT-4, GPT-3.5-turbo, etc.)
- Anthropic API (Claude models)
- Triton Inference Server with streaming LLM model (default:
Documentation
- WIKI.md - Complete features, commands, and usage guide
- PROVIDERS.md - Multi-provider setup (Triton, OpenAI, Anthropic)
- TRITON.md - Triton backend setup and requirements
- TESTING.md - Testing guide and CI/CD setup
- DOCKER.md - Docker setup and troubleshooting
Configuration
Config stored at ~/.kubrick/config.json. Override with environment variables:
export TRITON_URL=localhost:8000
export TRITON_MODEL_NAME=llm_decoupled
Development
Install Development Dependencies
pip install -e ".[dev]"
Run Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=kubrick_cli --cov-report=term-missing
# Run specific test file
pytest tests/test_tool_executor.py -v
See TESTING.md for detailed testing documentation.
Code Quality
# Format code
black kubrick_cli tests
# Check linting
flake8 kubrick_cli
License
MIT License - See LICENSE
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kubrick_cli-0.1.5.tar.gz.
File metadata
- Download URL: kubrick_cli-0.1.5.tar.gz
- Upload date:
- Size: 52.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b996a1b207b332ddba9171ea42f59eee75ab4b6ceb5ed3eff053da5d4d75ab9
|
|
| MD5 |
d068f93b8820fc5caafee06d503c9396
|
|
| BLAKE2b-256 |
99d7b33ec707bbc8ecfa1c13e2ab4322cba1facf52883cbfbc10d76a45f29833
|
File details
Details for the file kubrick_cli-0.1.5-py3-none-any.whl.
File metadata
- Download URL: kubrick_cli-0.1.5-py3-none-any.whl
- Upload date:
- Size: 51.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7d097f86038e6abf93a4a2672be4a3c9c5dd2f5b93955dd6f97892d167bce19
|
|
| MD5 |
603b2d2e9f66d346553a6670e08a710c
|
|
| BLAKE2b-256 |
b712ff899410c0e10342d4fea98a59143a3e551a2158c7accb6e4077c2649b03
|