Your intelligent command-line companion for getting things done faster
TAI is a powerful terminal-based AI assistant that bridges the gap between natural language and command-line operations. Ask questions, get commands, and execute them with confidence - all from your terminal.
- π§ Smart Command Generation - Ask for what you want, get the exact command
- π Clipboard Integration - Copy commands before executing
- π Context-Aware - Load project-specific knowledge automatically
- βοΈ Flexible Configuration - Customize model, temperature, and global contexts
- π Conversation History - Remembers previous interactions for better context
- π Interactive Mode - Type
taiand start chatting - π― Multi-line Support - Perfect for complex queries
# Install TAI
cargo install --path .
# Basic usage
tai "list all running processes"
# Interactive mode
tai
> how do I find large files?
>
# Use project context
tai --context rust "optimize my build"- Rust 1.70+
- An Anthropic API key (or local Ollama setup)
git clone https://github.com/yourusername/tai
cd tai
cargo build --release
cp target/release/tai ~/.local/bin/ # or your preferred PATH locationexport ANTHROPIC_API_KEY="your-api-key-here"
# Or configure it in TAI's config system
tai config anthropic_api_key "your-api-key-here"# Ask a question
tai "how do I compress a folder with tar?"
# Execute a task
tai "show me all Python files larger than 1MB"
# Clear conversation history
tai --clear-historytai
> I need to find all files modified in the last 24 hours
> that contain the word "TODO" in them
> # Use specific context
tai --context urbit "how do I commit my desk changes?"
# Skip context loading
tai --nocontext "what's the current time?"
# Create a context file
echo "# My Project Context..." > .context.tai
tai "deploy my application" # automatically uses local context# View all settings
tai config
# Set model globally
tai config model claude-3-opus --global
# Set temperature for current project
tai config temperature 0.8
# Add global contexts
tai config global_contexts "rust,docker,kubernetes"TAI supports multiple levels of context to make interactions more relevant:
Create .context.tai in your project directory:
# My Web App
- Built with Next.js and TypeScript
- Database: PostgreSQL with Prisma
- Deployed on Vercel
- Uses TailwindCSS for stylingStore reusable contexts in ~/.config/tai/context/:
# ~/.config/tai/context/docker.context.tai
# ~/.config/tai/context/kubernetes.context.tai
# ~/.config/tai/context/rust.context.taiConfigure contexts to load automatically:
tai config global_contexts "docker,rust"TAI uses a hierarchical configuration system:
- Environment variables (highest priority)
- Local config (
.config.taiin project/git root) - Global config (
~/.config/tai/config.tai)
| Key | Description | Example |
|---|---|---|
model |
AI model to use | claude-3-5-sonnet-latest |
temperature |
Response creativity (0.0-2.0) | 0.7 |
max_tokens |
Maximum response length | 1500 |
anthropic_api_key |
API key (fallback) | sk-ant-... |
global_contexts |
Always-loaded contexts | rust,docker |
# ~/.config/tai/config.tai
model = "claude-3-5-sonnet-latest"
temperature = 0.1
max_tokens = 2000
global_contexts = ["rust", "git", "docker"]When TAI suggests a command, you have three choices:
- Y - Execute the command
- n - Cancel execution
- c - Copy to clipboard
tai [OPTIONS] [MESSAGE...]
Options:
--context <NAME> Load specific context
--nocontext Skip context loading
--clear-history Clear conversation history
Subcommands:
config Manage configurationtai config # Show all settings
tai config <key> # Get specific value
tai config <key> <value> # Set locally
tai config <key> <value> --global # Set globally~/.config/tai/
βββ config.tai # Global configuration
βββ context/
βββ rust.context.tai # Rust development context
βββ docker.context.tai # Docker context
βββ urbit.context.tai # Urbit context
# In your project
.config.tai # Project configuration
.context.tai # Project context
We welcome contributions! Here are some ways to help:
- π Report bugs - Found an issue? Let us know!
- π‘ Suggest features - Have ideas for improvements?
- π Improve docs - Help make the documentation clearer
- π§ Submit PRs - Code contributions are greatly appreciated
git clone https://github.com/yourusername/tai
cd tai
cargo build
cargo testMIT License - see LICENSE for details.
- Built with rllm for AI provider abstraction
- Uses clap for elegant CLI parsing
- Clipboard functionality powered by arboard
β Star this repo if TAI helps you be more productive!
Made with β€οΈ for developers who love the terminal