A local agent for code development using Cerebras API
Project description
Cerebras Coding Agent
██████╗ ██████╗ ██████╗ ███████╗██████╗
██╔════╝██╔═══██╗██╔══██╗██╔════╝██╔══██╗
██║ ██║ ██║██║ ██║█████╗ ██████╔╝
██║ ██║ ██║██║ ██║██╔══╝ ██╔══██╗
╚██████╗╚██████╔╝██████╔╝███████╗██║ ██║
╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝
Cerebras Agent - Your AI coding assistant
A local agent for code development using the Cerebras API. This tool allows you to interact with your codebase through natural language, helping you understand, modify, and extend your code more efficiently.
Features
- Code generation and modification based on natural language instructions
- Repository analysis and question answering
- Interactive command-line interface
- Automatic error detection and fixing
- Support for multiple programming languages and frameworks
- Proper handling of project file structures
Installation
From PyPI (Recommended)
pip install cerebras-agent
From Source
# Clone the repository
git clone https://github.com/jio-gl/cerebras-coding-agent.git
cd cerebras-coding-agent
# Option 1: Use the installation script
./install.sh
# Option 2: Use the installation script with virtual environment
./install.sh --venv
# Option 3: Manual installation
pip install -e .
Configuration
-
Get a Cerebras API key from Cerebras Cloud
-
Create a
.envfile in your project root:
CEREBRAS_API_KEY=your_api_key_here
- Alternatively, set your API key as an environment variable:
export CEREBRAS_API_KEY=your_api_key_here
Usage
Command Line Interface
# Start the agent in interactive mode
cerebras-agent
# Ask a specific question about the repository without making changes
cerebras-agent --ask "How does this codebase handle authentication?"
cerebras-agent -a "How does this codebase handle authentication?"
# Prompt the agent to perform changes in the repository
cerebras-agent --agent "Add error handling to all database functions"
cerebras-agent -g "Add error handling to all database functions"
# Specify a repository path (default: current directory)
cerebras-agent --repo /path/to/your/repo
cerebras-agent -r /path/to/your/repo
Interactive Commands
Once in the interactive mode, you can use the following commands:
<prompt>: Enter any natural language prompt to generate code changesask <question>: Ask a question about the repository without making changescheckpoint: Show current checkpoint and change historyrevert <number>: Revert to a specific checkpoint numberhelp: Show available commandsexit: Exit the program
Development
- Clone the repository:
git clone https://github.com/jio-gl/cerebras-coding-agent.git
cd cerebras-coding-agent
- Install development dependencies:
pip install -e ".[dev]"
- Run tests:
./run_tests.sh
- Run integration tests (requires API key):
export CEREBRAS_API_KEY=your_api_key_here
./run_integration_tests.sh
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cerebras_agent-0.1.0.tar.gz.
File metadata
- Download URL: cerebras_agent-0.1.0.tar.gz
- Upload date:
- Size: 38.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
483d0a41e3bd3c57eeca95ffbe86f773e522cb1a262747f38aa60d61f28b2dd7
|
|
| MD5 |
5483ca325a83dd1e141104fc4c031e26
|
|
| BLAKE2b-256 |
56b4a0ef07ba363932e4e8c54320a5b514b9d34490259760a3481886241c3f54
|
Provenance
The following attestation bundles were made for cerebras_agent-0.1.0.tar.gz:
Publisher:
python-publish.yml on jio-gl/cerebras-coding-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cerebras_agent-0.1.0.tar.gz -
Subject digest:
483d0a41e3bd3c57eeca95ffbe86f773e522cb1a262747f38aa60d61f28b2dd7 - Sigstore transparency entry: 217920935
- Sigstore integration time:
-
Permalink:
jio-gl/cerebras-coding-agent@cc74aa5f82d4b9b713e599748a1fa13e1b3039b6 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/jio-gl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cc74aa5f82d4b9b713e599748a1fa13e1b3039b6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cerebras_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cerebras_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
088604d31269475568168db5f0dd964cfad638be00a216a03888d8689b0ff1a5
|
|
| MD5 |
c8174c7dc50443f96fac0a700b13e70a
|
|
| BLAKE2b-256 |
4112ecb1517bcd16a764b0aab71dcdaf354f28e5cb8de3f9c32951c0a95538d5
|
Provenance
The following attestation bundles were made for cerebras_agent-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on jio-gl/cerebras-coding-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cerebras_agent-0.1.0-py3-none-any.whl -
Subject digest:
088604d31269475568168db5f0dd964cfad638be00a216a03888d8689b0ff1a5 - Sigstore transparency entry: 217920942
- Sigstore integration time:
-
Permalink:
jio-gl/cerebras-coding-agent@cc74aa5f82d4b9b713e599748a1fa13e1b3039b6 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/jio-gl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@cc74aa5f82d4b9b713e599748a1fa13e1b3039b6 -
Trigger Event:
release
-
Statement type: