# 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
- 💬 Interactive chat interface
- ⚙️ Configurable system prompts
- 🎯 Support for multiple AI providers (DeepSeek, Anthropic Claude, etc.)
## Installation
### Quick Install (Recommended)
#### Unix/Linux/macOS
```bash
#### Windows
```cmd
powershell -c "iwr https://raw.githubusercontent.com/your-username/tiny-trae/main/install.bat -OutFile install.bat && install.bat"
```
### Manual Installation
#### Prerequisites
- [Rust](https://rustup.rs/) (latest stable)
- [Git](https://git-scm.com/)
#### Steps
1. **Clone the repository:**
```bash
git clone https://github.com/your-username/tiny-trae.git
cd tiny-trae
```
2. **Install globally:**
```bash
make install
```
Or using cargo directly:
```bash
cargo install --path .
```
3. **Set up configuration:**
The installer will create a config file at `~/.config/tiny-trae/config.toml`.
Update your API key:
```toml
[anthropic]
api_key = "your-api-key-here"
```
### Alternative Installation Methods
#### From Source (Recommended)
```bash
git clone https://github.com/your-username/tiny-trae.git
cd tiny-trae
cargo install --path .
```
#### Development Installation
```bash
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
```toml
[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
```bash
tiny-trae
```
### With Custom Config
```bash
tiny-trae --config /path/to/config.toml
```
### Verbose Mode
```bash
tiny-trae --verbose
```
### Available Commands
Once running, you can use these commands:
- `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
```bash
make uninstall
```
Or using cargo:
```bash
cargo uninstall tiny-trae
```
Configuration files in `~/.config/tiny-trae/` are preserved.
## Development
### Building from Source
```bash
git clone https://github.com/your-username/tiny-trae.git
cd tiny-trae
cargo build --release
```
### Running Tests
```bash
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](LICENSE) file for details.
## Support
- 📖 Documentation: [GitHub Wiki](https://github.com/your-username/tiny-trae/wiki)
- 🐛 Bug Reports: [GitHub Issues](https://github.com/your-username/tiny-trae/issues)
- 💬 Discussions: [GitHub Discussions](https://github.com/your-username/tiny-trae/discussions)
## Changelog
See [CHANGELOG.md](CHANGELOG.md) for version history.