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.
- ๐ฌ Interactive chat interface with Claude-3.5-Sonnet
- ๐ File system operations (create folders, files, read/write files)
- ๐ Web search capabilities using Tavily API
- ๐ Syntax highlighting for code snippets
- ๐๏ธ Project structure creation and management
- ๐ง Code analysis and improvement suggestions
- ๐ผ๏ธ Vision capabilities support via drag and drop of images in the terminal
- ๐ Automode for autonomous task completion
- ๐ Iteration tracking in automode
- ๐ Diff-based file editing for precise code modifications
-
Clone this repository:
git clone https://github.com/Doriandarko/claude-engineer.git cd claude-engineer
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up your API keys:
- Add your Anthropic and Tavily API keys at the start of the file:
client = Anthropic(api_key="YOUR API KEY") tavily = TavilyClient(api_key="YOUR API KEY")
- Add your Anthropic and Tavily API keys at the start of the file:
Run the main script to start the Claude Engineer interface:
python main.py
Once started, you can interact with Claude Engineer by typing your queries or commands. Some example interactions:
- "Create a new Python project structure for a web application"
- "Explain the code in file.py and suggest improvements"
- "Search for the latest best practices in React development"
- "Help me debug this error: [paste your error message]"
Special commands:
- Type 'exit' to end the conversation and close the application.
- Type 'image' to include an image in your message.
- Type 'automode' plus the max amount of iterations to enter Autonomous mode.
- Press Ctrl+C at any time to exit the automode to return to regular chat.
Automode allows Claude to work autonomously on complex tasks. When in automode:
- Claude sets clear, achievable goals based on your request.
- It works through these goals one by one, using available tools as needed.
- Claude provides regular updates on its progress.
- Automode continues until goals are completed or the maximum number of iterations is reached.
To use automode:
- Type 'automode' when prompted for input.
- Provide your request when prompted.
- Claude will work autonomously, providing updates after each iteration.
- Automode exits when the task is completed or after reaching the maximum number of iterations.
Claude Engineer now supports diff-based file editing, allowing for more precise and controlled modifications to existing files. When editing files, Claude will:
- Show a diff of the proposed changes, highlighting additions, removals, and unchanged lines.
- Focus on adding new code or modifying existing code without unnecessarily removing functionality.
- Provide explanations for any removed code, ensuring transparency in the editing process.
This feature enhances Claude's ability to make targeted improvements to your codebase while maintaining the integrity of existing functionality.
Note: Claude will only have access to the files in the root folders of the script or any folder path you provide it.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.