Skip to content

js/wurst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The wurst coding agent

The simplest example of a coding assistant that can read files, write files, and run shell commands to help you with your projects. Give it a prompt and it will use Claude AI to understand your request and perform the necessary actions.

Architecture

Calling it an "architecture" is a bit much, rather here are the files involved:

  • src/index.ts - Entry point that processes command-line arguments and starts the agent
  • src/loop.ts - Core agent loop that manages conversations with Claude AI and orchestrates tool execution
  • src/tools.ts - Tool registry system that manages available tools and their execution
  • src/tools/ - Individual tool implementations:
    • read-file.ts - File reading capability
    • write-file.ts - File writing capability
    • bash.ts - Shell command execution

The agent uses Anthropic's Claude Sonnet to process user prompts and autonomously decide which tools to use, creating a conversational loop until the task is complete.

Installation

bun install

Usage

bun run src/index.ts "your prompt here"

Example:

bun run src/index.ts "Create a simple Express.js server with a hello world route"

Requirements

  • Bun runtime
  • Anthropic API key (set in .env file as ANTHROPIC_API_KEY)

About

The worst coding agent in the world, or an example of a simple one

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors