Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Tiny Coding Agent

A command-line interface tool that lets you interact with Claude AI in your terminal, with file system access capabilities.

Overview

This project provides a simple Go-based CLI that connects to Anthropic's Claude API, allowing you to chat with Claude directly from your terminal. What makes this agent special is that it enables Claude to:

  • Read files from your local filesystem
  • List directory contents
  • Edit text files or create new ones

Features

  • Interactive terminal-based chat with Claude (Claude 3.7 Sonnet model)
  • File system tools for Claude:
    • read_file: Read contents of a file
    • list_files: List files in a directory
    • edit_file: Make changes to existing files or create new files

Requirements

  • Go 1.24.2 or later
  • Anthropic API key (set as an environment variable)

Installation

  1. Clone this repository
  2. Ensure you have Go installed
  3. Set your Anthropic API key:
    export ANTHROPIC_API_KEY=your_api_key_here
    
  4. Run the application:
    go run main.go
    

Usage

Once the application is running, you can chat with Claude directly in your terminal. Claude can access your file system through the provided tools when you ask it to:

Chat with Claude (use ctrl-c to quit)
You: Can you list the files in the current directory?
Claude: I'll list the files in the current directory for you.

[lists files]

You: Can you read the contents of main.go?
Claude: Here are the contents of main.go:

[displays file content]

How It Works

The application creates a chat interface with Claude using the Anthropic Go SDK. It provides Claude with three tool definitions:

  • Read files
  • List directories
  • Edit or create files

When Claude needs to use one of these tools, the application handles the file system operations and returns the results back to Claude.