Skip to content

Claude Engineer is an interactive command-line interface (CLI) that leverages the power of Anthropic's Claude-3.5-Sonnet model to assist with software development tasks. This tool combines the capabilities of a large language model with practical file system operations and web search functionality.

Notifications You must be signed in to change notification settings

THEFIG06/claude-engineer

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Claude Engineer v3 πŸ€–

A powerful self-improving AI Assistant designed for creating and managing AI tools with Claude 3.5. This framework enables Claude to generate and manage its own tools, continuously expanding its capabilities through conversation. Available both as a CLI and a modern web interface!

History and Evolution

This project represents the third major iteration of Claude Engineer, building upon the success of Claude Engineer v2. Key improvements from previous versions include:

  • Upgraded to Claude 3.5 Sonnet model
  • Enhanced token management with Anthropic's new token counting API
  • Self-improving tool creation system
  • Streamlined conversation handling
  • More precise token usage tracking and visualization
  • Autonomous tool generation capabilities
  • No need for automode since Claude can intelligently decide when to run tools automatically and sequentially.

Description

Claude Engineer v3 is a sophisticated framework that allows Claude to expand its own capabilities through dynamic tool creation. During conversations, Claude can identify needs for new tools, design them, and implement them automatically. This self-improving architecture means the framework becomes more powerful the more you use it.

Installation

For the best possible experience install uv

macOS and Linux

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or using wget if curl is not available:
# wget -qO- https://astral.sh/uv/install.sh | sh

# Clone and setup
git clone https://github.com/Doriandarko/claude-engineer.git
cd claude-engineer
uv venv
source .venv/bin/activate

# Run web interface
uv run app.py

# Or run CLI
uv run ce3.py

Windows

# Install uv
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# Clone and setup
git clone https://github.com/Doriandarko/claude-engineer.git
cd claude-engineer
uv venv
.venv\Scripts\activate


# Run web interface
uv run app.py

# Or run CLI
uv run ce3.py

Interface Options

1. Web Interface 🌐

A sleek, modern web UI with features like:

  • Real-time token usage visualization
  • Image upload and analysis capabilities
  • Markdown rendering with syntax highlighting
  • Responsive design for all devices
  • Tool usage indicators
  • Clean, minimal interface

Claude Engineer v3 Web Interface

To run the web interface:

# Using uv (recommended)
uv run app.py

# Or using traditional Python
python app.py

# Then open your browser to:
http://localhost:5000

2. Command Line Interface (CLI) πŸ’»

A powerful terminal-based interface with:

  • Rich text formatting
  • Progress indicators
  • Token usage visualization
  • Direct tool interaction
  • Detailed debugging output

To run the CLI:

# Using uv (recommended)
uv run ce3.py

# Or using traditional Python
python ce3.py

Choose the interface that best suits your workflow:

  • Web UI: Great for visual work, image analysis, and a more modern experience
  • CLI: Perfect for developers, system integration, and terminal workflows

Self-Improvement Features

  • 🧠 Autonomous tool identification and creation
  • πŸ”„ Dynamic capability expansion during conversations
  • 🎯 Smart tool dependency management
  • πŸ“ˆ Learning from tool usage patterns
  • πŸ” Automatic identification of capability gaps
  • πŸ› οΈ Self-optimization of existing tools

Core Features

  • πŸ”¨ Dynamic tool creation and loading
  • πŸ”„ Hot-reload capability for new tools
  • 🎨 Rich console interface with progress indicators
  • 🧩 Tool abstraction framework with clean interfaces
  • πŸ“ Automated tool code generation
  • πŸ”Œ Easy integration with Claude 3.5 AI
  • πŸ’¬ Persistent conversation history with token management
  • πŸ› οΈ Real-time tool usage display
  • πŸ”„ Automatic tool chaining support
  • ⚑ Dynamic module importing system
  • πŸ“Š Advanced token tracking with Anthropic's token counting API
  • 🎯 Precise context window management
  • πŸ” Enhanced error handling and debugging
  • πŸ’Ύ Conversation state management

Project Structure

claude-engineer/
β”œβ”€β”€ app.py             # Web interface server
β”œβ”€β”€ ce3.py            # CLI interface
β”œβ”€β”€ config.py         # Configuration settings
β”œβ”€β”€ static/           # Web assets
β”‚   β”œβ”€β”€ css/         # Stylesheets
β”‚   └── js/          # JavaScript files
β”œβ”€β”€ templates/        # HTML templates
β”œβ”€β”€ tools/           # Tool implementations
β”‚   β”œβ”€β”€ base.py      # Base tool class
β”‚   └── ...         # Generated and custom tools
└── prompts/         # System prompts
    └── system_prompts.py

Features by Interface

Web Interface Features

  • πŸ–ΌοΈ Image upload and analysis with Claude Vision
  • πŸ“Š Visual token usage progress bar
  • 🎨 Clean, modern design with Tailwind CSS
  • πŸ“ Markdown rendering with syntax highlighting
  • πŸ”„ Real-time updates
  • πŸ“± Responsive design for all devices
  • πŸ–₯️ Tool usage indicators
  • ⌨️ Command/Ctrl + Enter to send messages

CLI Features

  • 🎨 Rich text formatting
  • πŸ“Š ASCII token usage bar
  • πŸ”„ Live progress indicators
  • πŸ› οΈ Direct tool interaction
  • πŸ“ Detailed debugging output
  • πŸ’» Terminal-optimized interface

Choose the interface that best matches your workflow and preferences. Both interfaces provide access to the same powerful Claude Engineer capabilities, just presented in different ways.

Key Components

Assistant Class

The core Assistant class provides:

  • Dynamic tool loading and management
  • Real-time conversation handling with token tracking
  • Automatic tool creation and validation
  • Tool execution and chaining
  • Rich console output with progress indicators
  • Token usage optimization

Configuration Options

The assistant supports various configuration options through the Config class:

  • MODEL: Claude 3.5 Sonnet model specification
  • MAX_TOKENS: Maximum tokens for individual responses
  • MAX_CONVERSATION_TOKENS: Total token limit for conversations
  • TOOLS_DIR: Directory for tool storage
  • SHOW_TOOL_USAGE: Toggle tool usage display
  • ENABLE_THINKING: Toggle thinking indicator
  • DEFAULT_TEMPERATURE: Model temperature setting

Requirements

  • Python 3.8+
  • Anthropic API Key (Claude 3.5 access)
  • Required packages in requirements.txt
  • Rich terminal support

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Acknowledgments

This project builds upon the foundations of Claude Engineer v2, enhancing its capabilities with self-improving tool generation and advanced token management.

Built-in Tools

Claude Engineer v3 comes with a comprehensive set of pre-built tools:

Core Tools

  • πŸ› οΈ Tool Creator (toolcreator): Creates new tools based on natural language descriptions, enabling the framework's self-improvement capabilities.

Development Tools

  • πŸ“¦ UV Package Manager (uvpackagemanager): Interface to the UV package manager for Python dependency management, supporting package installation, removal, updates, and virtual environment management.
  • 🐍 E2B Code Executor (e2bcodetool): Securely executes Python code in a sandboxed environment powered by E2B. This tool enables Claude to write and run Python code directly, making it capable of data analysis, visualization, and complex computations. Requires an E2B API key available at e2b.dev.
  • πŸ” Linting Tool (lintingtool): Runs the Ruff linter on Python files to detect and fix coding style or syntax issues, with support for automatic fixes and customizable rules.

File System Tools

  • πŸ“‚ Create Folders Tool (createfolderstool): Creates new directories and nested directory structures with proper error handling and path validation.
  • πŸ“ File Creator (filecreatortool): Creates new files with specified content, supporting both text and binary files.
  • πŸ“– File Content Reader (filecontentreadertool): Reads content from multiple files simultaneously, with smart filtering of binary and system files.
  • ✏️ File Edit (fileedittool): Advanced file editing with support for full content replacement and partial edits.
  • πŸ”„ Diff Editor (diffeditortool): Performs precise text replacements in files by matching exact substrings.

Web Tools

  • πŸ” DuckDuckGo (duckduckgotool): Performs web searches using DuckDuckGo.
  • 🌐 Web Scraper (webscrapertool): Intelligently extracts readable content from web pages while removing unnecessary elements.
  • 🌍 Browser (browsertool): Opens URLs in the system's default web browser.

Utility Tools

  • πŸ“Έ Screenshot Tool (screenshottool): Captures screenshots of the entire screen or specific regions, returning base64-encoded images ready for Claude's vision capabilities.

Each tool is designed to be:

  • Self-documenting with detailed descriptions
  • Error-resistant with comprehensive error handling
  • Composable for complex operations
  • Secure with proper input validation
  • Cross-platform compatible where applicable

The tools are dynamically loaded and can be extended during runtime through the Tool Creator, allowing the assistant to continuously expand its capabilities based on user needs.

API Keys Required

  1. Anthropic API Key: Required for Claude 3.5 access
  2. E2B API Key: Required for Python code execution capabilities. Get your key at e2b.dev

Add these to your .env file:

ANTHROPIC_API_KEY=your_anthropic_key
E2B_API_KEY=your_e2b_key

Star History

Star History Chart

About

Claude Engineer is an interactive command-line interface (CLI) that leverages the power of Anthropic's Claude-3.5-Sonnet model to assist with software development tasks. This tool combines the capabilities of a large language model with practical file system operations and web search functionality.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 91.8%
  • JavaScript 4.2%
  • HTML 2.5%
  • CSS 1.5%