marcin / coding_agent

A prototype coding agent in Ruby, implemented as an exercise accompanying a blog post.

Repository from Github https://github.commarcin/coding_agentRepository from Github https://github.commarcin/coding_agent

This is a simple coding agent implemented in Ruby, as an experiment accompanying my blog post: "Coding agent in 94 lines of Ruby".

Usage

Whatever method you use, first copy the .env.example file to .env and add your Anthropic API key. If you want to use a different provider, modify the run.rb file and set the key for the other provider. Check RubyLLM configuration documentation for details.

With docker

If you have docker the usage is really simple. Just run the run_in_docker.sh script.

The directory from which you run the script will be mounted into the container as /workspace and will be the directory in which the coding agent will operate.

Without docker

If you're running it without docker you'll need Ruby and bundler installed.

Navigate to the root of the directory, run bundle install.

After that, call ruby /path/to/run.rb from the directory you want to operate on.

Running tests

Execute test/run_all.sh from the root of the project.

About

A prototype coding agent in Ruby, implemented as an exercise accompanying a blog post.

License:MIT License


Languages

Language:Ruby 95.2%Language:Shell 2.9%Language:Dockerfile 1.9%