truman-ai
v0.1.1
Published
Breaking Free from Coding Limitations - Multi-provider AI coding CLI with OpenAI, Claude, and Grok support
Downloads
10
Maintainers
Readme
Truman: Universal AI Coding CLI
A terminal-based AI coding assistant that opens as an interactive session in your current directory.
Quick Start
Install dependencies:
pnpm installConfigure API keys:
# Add to your ~/.bashrc or ~/.zshrc export TRUMAN_OPENAI_API_KEY="sk-..." export TRUMAN_CLAUDE_API_KEY="sk-ant-..." export TRUMAN_GROK_API_KEY="xai-..." # Optional: set default models export TRUMAN_OPENAI_MODEL="gpt-4o-mini" # or "gpt-4o", "o3-mini", "o3" export TRUMAN_CLAUDE_MODEL="claude-sonnet-4-20250514" export TRUMAN_GROK_MODEL="grok-beta"Build and run:
pnpm run build ./dist/cli/index.js # or pnpm run dev
Commands
truman- Launch interactive sessiontruman config- Show configuration statustruman config --help- Show how to configure providers
Slash Commands (in interactive mode)
/help- Show available commands/config- Show configuration status/config help- Show configuration help/model [provider]- Switch AI provider/clear- Clear conversation history
Supported Providers
- OpenAI: gpt-4.1-nano, gpt-4.1-mini, gpt-4.1, gpt-4o-mini, gpt-4o, o4-mini, o3-mini, o3 (with tools)
- Claude: claude-sonnet-4-20250514, claude-opus-4-20250514, claude-3-7-sonnet-20250219 (with tools)
- Grok: grok-beta (in development)
Environment Variables
# Required for each provider you want to use
TRUMAN_OPENAI_API_KEY="sk-..."
TRUMAN_CLAUDE_API_KEY="sk-ant-..."
TRUMAN_GROK_API_KEY="xai-..."
# Optional model selection (uses defaults if not set)
TRUMAN_OPENAI_MODEL="gpt-4o-mini"
TRUMAN_CLAUDE_MODEL="claude-sonnet-4-20250514"
TRUMAN_GROK_MODEL="grok-beta"
# Optional base URLs (for custom endpoints)
TRUMAN_OPENAI_BASE_URL="https://api.openai.com/v1"
TRUMAN_CLAUDE_BASE_URL="https://api.anthropic.com"
TRUMAN_GROK_BASE_URL="https://api.x.ai/v1"Development
# Development mode
pnpm run dev
# Build
pnpm run build
# Type check
pnpm run type-checkArchitecture
- Provider-agnostic: Seamlessly switch between AI providers
- Environment-based config: Simple API key management via env vars
- Ink React UI: Beautiful terminal interface
- TypeScript: Full type safety
- Modular: Clean separation of concerns
Status
✅ OpenAI Integration Complete - Real AI responses working! ✅ Claude Integration Complete - Sonnet-4 and Haiku with tools! ✅ File Operations Tools - Read, write, list, and search files ✅ Streaming & Real-time UI - Live responses with thinking indicator 🚧 In Development - Adding Grok provider
Quick Test
# Set your API keys
export TRUMAN_OPENAI_API_KEY="sk-..."
export TRUMAN_CLAUDE_API_KEY="sk-ant-..."
# Run Truman
pnpm run build && node dist/cli/index.js
# Try it out:
# > hello
# > /model claude-sonnet-4-20250514
# > what can you help me with?