A powerful AI coding assistant powered by DeepSeek's reasoning models, featuring a beautiful terminal UI built with Bubble Tea.
- π Chain-of-Thought Reasoning - Watch the AI think through problems step-by-step
- π File Operations - Read, create, and edit files directly through function calls
- π¨ Beautiful TUI - Built with Charm's Bubble Tea framework
- π Smart Context Management - Add files and directories to conversation context
- π Streaming Responses - Real-time streaming of AI responses
- π‘οΈ Security Features - Path validation and file size limits
- π° Token Usage Tracking - Real-time cost estimation based on DeepSeek pricing
- π― Extensible Architecture - Well-structured codebase for easy modifications
- Go 1.22 or higher
- A DeepSeek API key (get one at platform.deepseek.com)
git clone https://github.com/alchemy-labs-co/riptide.git
cd riptide
make buildgo install github.com/alchemy-labs-co/riptide@latestSet your DeepSeek API key:
export DEEPSEEK_API_KEY=your_api_key_hereCreate a config.json file (optional):
{
"api": {
"base_url": "https://api.deepseek.com/v1",
"model": "deepseek-reasoner",
"max_completion_tokens": 8192,
"timeout_seconds": 300
},
"ui": {
"enable_emoji": true,
"theme": "default",
"max_history_messages": 15
},
"file_operations": {
"max_file_size": 1048576,
"allowed_extensions": [".go", ".py", ".js", ".ts", ".json", ".md", ".txt"]
},
"scanner": {
"exclude_patterns": [
"node_modules",
".git",
"__pycache__",
"*.pyc",
".env"
]
}
}./riptide/add <path>- Add a file or directory to the conversation context/clear- Clear the conversation history/config- Open configuration menu to adjust settings/help- Show help informationquit- Exit the applicationCtrl+C- Cancel streaming or force quitPgUp/PgDown- Scroll conversation historyβ/β- Navigate autocomplete suggestions (when typing commands)
-
Start the application:
./riptide
-
Add files to context:
/add main.go /add src/ -
Ask questions or request changes:
Can you help me optimize the database queries in this code? -
The AI can directly read and modify files:
Please add error handling to the fetchUser function
Riptide can perform the following file operations:
- read_file - Read a single file's content
- read_multiple_files - Read multiple files at once
- create_file - Create new files or overwrite existing ones
- create_multiple_files - Create multiple files in one operation
- edit_file - Make precise edits using find-and-replace
riptide/
βββ main.go # Entry point
βββ internal/
β βββ api/ # DeepSeek API client
β β βββ client.go # API client implementation
β β βββ types.go # API type definitions
β βββ config/ # Configuration management
β β βββ config.go # Config loading and validation
β βββ conversation/ # Conversation history
β β βββ history.go # Token tracking and history management
β βββ functions/ # File operations
β β βββ file_ops.go # File read/write operations
β β βββ scanner.go # Directory scanning utilities
β β βββ security.go # Path validation and security
β βββ ui/ # Terminal UI components
β βββ model.go # Core state management (MVC pattern)
β βββ render.go # UI rendering logic
β βββ styles.go # Centralized styling definitions
β βββ stream.go # Stream handling and updates
β βββ commands.go # Command definitions and autocomplete
β βββ config_menu.go # Configuration menu implementation
βββ docs/ # Documentation
β βββ DEVELOPMENT_NOTES.md # Architectural decisions and lessons
β βββ TASKS.md # Feature and bug tracking
βββ .riptide/ # Riptide specific settings
β βββ settings.json # Project settings
β βββ AGENTS.md # Agent definitions
β βββ projects/ # Sub-project configurations
βββ config.json # Configuration file (optional)
βββ go.mod # Go module definition
βββ go.sum # Go dependencies lock file
βββ Makefile # Build automation
- Streaming responses for real-time interaction
- Efficient file scanning with pattern matching
- Concurrent file operations
- Minimal memory footprint
- Real-time token usage and cost tracking
- Path traversal protection
- File size limits
- Configurable file extension filtering
- No execution of arbitrary commands
- Binary file detection and exclusion
This Go implementation maintains complete feature parity with the original Python version:
- DeepSeek API integration with streaming
- Chain-of-thought reasoning display
- All 5 file operation functions
-
/addcommand for context management -
/clearcommand -
/helpcommand - Conversation history management
- File security and validation
- Real-time streaming display
- Colored output and formatting
- Emoji support (configurable)
- Scrollable conversation view
- Status indicators (Ready/Seeking/Processing)
- Token and cost tracking
- Single binary distribution - No Python/dependencies needed
- Better performance - Compiled language advantages
- Type safety - Compile-time error checking
- Concurrent operations - Leverages Go's goroutines
- Modern TUI - Reactive UI with Bubble Tea
- Command Autocomplete - Smart command suggestions with dropdown
- Configuration Menu - Interactive settings adjustment via
/config - Off-Peak Pricing - Automatic cost calculation with 75% discount during off-peak hours
# Build for current platform
make build
# Build for all platforms
make build-all
# Run tests
make test
# Clean build artifacts
make clean-
API Key Not Found
export DEEPSEEK_API_KEY=your_api_key_here -
Connection Errors
- Check your internet connection
- Verify API endpoint in config.json
- Ensure your API key is valid
-
UI Display Issues
- Ensure terminal supports Unicode
- Try resizing terminal window
- Disable emoji in config if needed
MIT License - see LICENSE file for details.
ββ
- DeepSeek for the amazing reasoning models
- Charm for the beautiful TUI libraries
- sashabaranov/go-openai for the OpenAI client
- Original deepseek-engineer Python implementation