tiny-trae-ai

Crates.iotiny-trae-ai
lib.rstiny-trae-ai
version0.1.0
created_at2025-07-13 13:10:57.153029+00
updated_at2025-07-13 13:10:57.153029+00
descriptionA modern AI coding assistant with TUI interface, tool integration, and Unicode support
homepage
repository
max_upload_size
id1750496
size897,368
miracle9312 (miracle9312)

documentation

README

Tiny Trae AI Coding Assistant

An AI coding assistant with tool integration that helps with software development tasks including writing code, debugging, refactoring, and explaining code.

Features

  • 🤖 AI-powered coding assistance
  • 🔧 Integrated development tools (file operations, search, shell commands)
  • 📁 Project-aware file management
  • 🔍 Advanced code search capabilities
  • 🎨 Modern TUI interface with rich visual feedback (default)
  • 📝 Classic CLI interface (optional with --cli flag)
  • ⚙️ Configurable system prompts
  • 🎯 Support for multiple AI providers (DeepSeek, Anthropic Claude, etc.)

Installation

Quick Install (Recommended)

Unix/Linux/macOS

curl -sSf https://raw.githubusercontent.com/your-username/tiny-trae/main/install.sh | bash

Windows

powershell -c "iwr https://raw.githubusercontent.com/your-username/tiny-trae/main/install.bat -OutFile install.bat && install.bat"

Manual Installation

Prerequisites

Steps

  1. Clone the repository:

    git clone https://github.com/your-username/tiny-trae.git
    cd tiny-trae
    
  2. Install globally:

    make install
    

    Or using cargo directly:

    cargo install --path .
    
  3. Set up configuration: The installer will create a config file at ~/.config/tiny-trae/config.toml. Update your API key:

    [anthropic]
    api_key = "your-api-key-here"
    

Alternative Installation Methods

From crates.io (Recommended)

cargo install tiny-trae-ai

From Source (Development)

git clone https://github.com/your-username/tiny-trae.git
cd tiny-trae
cargo install --path .

Development Installation

git clone https://github.com/your-username/tiny-trae.git
cd tiny-trae
make install-dev

Note: tiny-trae is not yet published to crates.io, so installation must be done from source.

Configuration

Tiny Trae looks for configuration in the following order:

  1. Custom config file (if specified with -c flag)
  2. Global config: ~/.config/tiny-trae/config.toml
  3. Local config: ./config.toml

Configuration Options

[anthropic]
api_key = "your-api-key"
base_url = "https://api.deepseek.com"  # or https://api.anthropic.com

[model]
version = "deepseek-coder"  # or claude-3-5-sonnet-20241022
max_tokens = 4096
temperature = 0.7

[workspace]
root_path = "."
ignore_patterns = [".git", "target", "node_modules"]

[system]
prompt = "Your custom system prompt here"

Usage

Basic Usage (Modern TUI Interface)

tiny-trae

The modern TUI interface provides:

  • 🎨 Beautiful visual layout with title bar, message area, status bar, and input area
  • 💬 Rich message display with user/assistant differentiation
  • 🔧 Real-time tool execution feedback with visual indicators
  • Instant loading states: User messages appear immediately, followed by AI thinking animation
  • 📊 System status and help dialogs
  • ⌨️ Intuitive keyboard navigation (↑↓ to scroll, Enter to send, Ctrl+C to exit)
  • 🌍 Full Unicode support including Chinese, Japanese, Korean, and emoji input

Classic CLI Interface

tiny-trae --cli

With Custom Config

tiny-trae --config /path/to/config.toml

Verbose Mode

tiny-trae --verbose

Available Commands

In the TUI interface:

  • Type help - Show available commands and keyboard shortcuts
  • Type history - Show conversation history
  • Type clear - Clear conversation history
  • Type status - Show system status
  • Type exit - Exit the application
  • Press Esc - Close dialogs and popups
  • Use ↑↓ - Scroll through messages
  • Use Page Up/Down - Fast scroll

In the CLI interface:

  • help - Show available commands and tools
  • history - Show conversation history
  • clear - Clear conversation history
  • status - Show system status
  • tools - List available tools
  • exit - Exit the application

Available Tools

  • read_file - Read file contents
  • list_files - List files in directories
  • edit_file - Edit file contents
  • search_text - Search for text patterns
  • ripgrep - Fast text searching with ripgrep
  • bash - Execute shell commands

Examples

Code Analysis

> Can you analyze the main.rs file and suggest improvements?

File Operations

> Read the README.md file and summarize its contents

Code Generation

> Create a new Rust function to parse JSON configuration files

Debugging

> Help me debug this error in my code [paste error]

Uninstallation

cargo uninstall tiny-trae-ai

Configuration files in ~/.config/tiny-trae/ are preserved.

Development

Building from Source

git clone https://github.com/your-username/tiny-trae.git
cd tiny-trae
cargo build --release

Running Tests

cargo test

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

Changelog

See CHANGELOG.md for version history.

Commit count: 0

cargo fmt