Skip to content

Rohan-Singla/claude-code-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

progress-banner

Built as part of the CodeCrafters "Build Your Own Claude Code" Challenge.

Build Your Own Claude Code

A Rust CLI agent that takes a natural language prompt and uses an LLM to reason about and act on your codebase via an agent loop.

How It Works

The agent repeatedly calls the model, executes any tool calls it requests, and feeds results back — until the model returns a final text response.

Available tools:

Tool Description
Read Read a file from disk
Write Write content to a file
Bash Run a shell command and capture output

Usage

OPENROUTER_API_KEY=<your-api-key> cargo run -- --prompt "Explain what src/main.rs does"

OPENROUTER_BASE_URL defaults to https://openrouter.ai/api/v1 if not set.

Tech Stack

  • Rust (edition 2024)
  • tokio — async runtime
  • async-openai — OpenAI-compatible API client
  • clap — CLI argument parsing (builder API)
  • serde_json — JSON serialization

About

A Rust CLI agent that takes a natural language prompt and uses an LLM to reason about and act on your codebase via an agent loop.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages