A sophisticated Deno-based CLI tool that provides AI-powered file editing and bash command execution capabilities using Claude API with configurable model selection.
- Dual Mode Operation:
- Editor mode for AI-assisted text file manipulation
- Bash mode for intelligent command execution
- Hybrid mode for combined capabilities
- Configurable AI Models:
- Support for multiple Claude models (3.5 Sonnet, 3.7 Sonnet, 4 Sonnet, 4 Opus)
- Smart planner model selection based on main model choice
- Model-specific cost tracking and pricing
- Dynamic tool version selection based on selected model
- Automatic beta header configuration for optimal compatibility
- Easy model switching via settings commands
- Enhanced Export System:
- Prompt ID-based export functionality
- Dedicated export paths
- Rich session data export
- Comprehensive session logging
- Improved User Management:
- Streamlined settings management
- Enhanced session handling
- Efficient tool configuration
- Memory Management
- Comprehensive Logging
- Text response content tracking
- Debug logging for history entries
- Multi-model token usage tracking
- Advanced Cost Calculation
- Model-specific pricing
- Per-model cost breakdown
- Cost warnings for expensive models
- History Management with database integration
- Clipboard Management with cross-platform support
- Tool Configuration Management
- User Settings Management
- Jina API Integration for enhanced search capabilities
ComputerUseDemo.mp4
This is a trimmed demo, Watch full demo on Youtube
- Deno installed
- Anthropic API Key
- Clone the repository:
git clone <repository-url>
cd ComputerUseAgent- Set up your environment:
# Set your Anthropic API key
export ANTHROPIC_API_KEY="your-api-key"- Build the project:
deno task build# Editor mode
deno run -A src/main.ts --mode=editor "your prompt"
# Bash mode
deno run -A src/main.ts --mode=bash "your command"
# Bash mode with mock execution
deno run -A src/main.ts --mode=bash --no-agi "your command"# After building
./build/ComputerUseAgent --mode=editor "your prompt"
./build/ComputerUseAgent --mode=bash "your command"
./build/ComputerUseAgent --export "prompt-id" # Export session dataConfigure which Claude model to use for AI operations:
# Set model to Claude 4 Sonnet
deno run -A src/main.ts settings --set-model "4-sonnet"
# List available models
deno run -A src/main.ts settings --list-models
# View current settings including selected model
deno run -A src/main.ts settings --listAvailable Models:
3.5-sonnet- Claude 3.5 Sonnet (Default, most cost-effective)3.7-sonnet- Claude 3.7 Sonnet (Enhanced reasoning capabilities)4-sonnet- Claude 4 Sonnet (Latest generation)4-opus- Claude 4 Opus (Most capable, higher cost)
Smart Features:
- Automatic planner model selection based on your chosen model
- Model-specific cost tracking and warnings
- Thinking capabilities automatically enabled for supported models
- Dynamic tool version selection ensuring compatibility with each model
- Automatic beta header configuration for optimal API compatibility
src/: Source code directoryconfig/: Configuration filesmodules/: Core functionality modulesbash/: Bash command executioneditor/: Text editor operationsmemory/: Memory management
types/: TypeScript interfacesutils/: Utility functions
Key configuration files:
src/config/constants.ts: System-wide constants and API settingssrc/config/logging.ts: Logging configurationsrc/config/tool_config.ts: Tool configurationdeno.json: Deno project configuration
- See CHANGELOG.md for detailed version history and latest changes
- CONVENTIONS.md for development patterns and best practices
# Run in development mode with file watching
deno task dev
# Build for local use
deno task buildLocalLogs are stored in app.log with both console and file output. The logging
system tracks:
- User inputs
- API usage
- Command execution
- Errors
- Token usage and costs
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
See LICENSE file.
You can download pre-built binaries for your platform from:
- Latest stable release: Releases page
- Nightly builds: Nightly Release
Binaries are automatically built for Windows, Linux, and macOS.