Build your own AI coding assistant in Go that can read files and run shell commands
Learn how tool-calling works in AI agents by adding features one step at a time
Understand how tools like Cursor and Cline work under the hood
Create a local code search agent powered by ripgrep and the Claude API
Requires Go 1.24.2 or later and an Anthropic API key.
This repository is a hands-on workshop that walks you through building a coding assistant similar to tools like Cursor or Cline. You start with a basic chatbot that talks to the Claude API, then add capabilities one step at a time until you have a local assistant that can read files, list directories, run shell commands, edit code, and search a codebase by pattern. The workshop is written in Go. The project is structured as six separate programs, each building on the last. The first is a minimal chatbot that accepts your text and sends it to Claude. The second adds a tool that lets the assistant read a file you name. Each subsequent program adds one more tool until the final version can run arbitrary shell commands and search code with ripgrep. All six programs share the same basic loop. The program waits for your input, sends it to Claude, and inspects the response. If Claude wants to use a tool, such as reading a file or running a command, the program executes that tool, sends the result back to Claude, and asks Claude for a final answer. This cycle repeats until Claude responds with plain text rather than a tool request. Tools are defined as Go structs with a name, a description, and a function. The schema describing what inputs a tool needs is generated automatically from the struct definition, which keeps the tool definitions short and consistent. This pattern is the same one real coding agents use. Running the workshop requires Go 1.24.2 or later and an Anthropic API key. Each program is run directly with the Go command, and a verbose flag is available to show the full exchange between your code and the Claude API.
← ghuntley on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.