Skip to content

benmyrgorod/carbon-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Carbon CLI

Carbon CLI is an experimental vibe coding agent CLI to be used with GitHub. It uses Open AI and AWS S3 under the good. It is supposed to be called by GitHub Actions. Please see Carbon Actions repository for actions templates and set up instructions.

Commands

Command Parameters Description
create issue CARBON_ISSUE_ID
CARBON_REQUEST
Creates a new thread for an issue, uploads the specified file, and runs the initial request through the AI.
map pr CARBON_ISSUE_ID
CARBON_PR_ID
Maps an existing issue thread to a pull request for continued conversation.
update issue CARBON_ISSUE_ID
CARBON_REQUEST
Updates an existing issue thread with a new request and runs it through the AI.
update pr CARBON_PR_ID
CARBON_REQUEST
Updates an existing pull request thread with a new request and runs it through the AI.
retrieve issue CARBON_ISSUE_ID Retrieves and displays all messages from an issue's thread.
retrieve pr CARBON_PR_ID Retrieves and displays all messages from a pull request's thread.
delete issue CARBON_ISSUE_ID Deletes issue's data.
delete pr CARBON_PR_ID Deletes PR's datas.

Setup

  1. Clone this project into carbon directory:

    git clone [email protected]:dealancer/carbon.git .
    cd carbon
  2. Install dependencies

    pipenv install
  3. Activate pipenv shell:

    pipenv shell
  4. Clone a project you would like to work with into work directory:

    git clone [email protected]:dealancer/flask-docker-boilerplate.git work/flask-docker-boilerplate
  5. Prepare .env file by copying one from template:

    cp .env.example .env

    Then fill in the required values for AWS, OpenAI and Carbon settings in the .env file.

Usage

Create an issue

  1. Zip flask-docker-boilerplate removing extra directories:

    zip -r work/flask-docker-boilerplate.zip work/flask-docker-boilerplate -x '*.git*' -x '*__pycache__*'
  2. Run carbon:

    CARBON_ISSUE_ID=2 \
    CARBON_REQUEST="Add new route /example to output 'Hello World!' message." \
    python src/run.py create issue
  3. Unzip flask-docker-boilerplate.zip:

    unzip -o work/flask-docker-boilerplate.zip
    
  4. Check out changes:

    git -C work/flask-docker-boilerplate diff
    
  5. Check out commit message:

    cat work/output.json
    

Update an issue

  1. Run carbon:

    CARBON_ISSUE_ID=2 \
    CARBON_REQUEST="Also add another route /name/{name} and output 'Hello {name}!'. Keep in mind that {name} is a parameter." \
    python src/run.py update issue
  2. Unzip flask-docker-boilerplate.zip:

    unzip -o work/flask-docker-boilerplate.zip
    
  3. Check out changes:

    git -C work/flask-docker-boilerplate diff
    
  4. Check out commit message:

    cat work/output.json
    

Asssociate an issue with a PR

  1. Run carbon:
    CARBON_ISSUE_ID=2 \
    CARBON_PR_ID=123 \
    python src/run.py map pr

Update a PR

  1. Run carbon:

    CARBON_PR_ID=123 \
    CARBON_REQUEST="Add another route /name/{age} and output 'Are you {age} years old?'. Keep in mind that {age} is a parameter." \
    python src/run.py update pr
  2. Unzip flask-docker-boilerplate.zip:

    unzip -o work/flask-docker-boilerplate.zip
    
  3. Check out changes:

    git -C work/flask-docker-boilerplate diff
    
  4. Check out commit message:

    cat work/output.json
    

Delete an issue

Run carbon:

CARBON_ISSUE_ID=2 \
python src/run.py delete issue

Delete a PR

Run carbon:

CARBON_PR_ID=123 \
python src/run.py delete pr

Testing

Run:

pytest

About

Experimental AI vibe coding CLI agent

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages