OpenTownie

OpenTownie is an AI-powered development assistant that lets you edit Val Town projects using Claude 3.7 Sonnet. It provides a seamless interface for discussing your code with Claude AI, which can directly view and modify files in your Val Town projects.

Features

It uses agentic tool-calling, taking manh read, write, and thinking steps autonomously when carrying out your instructions.

  • AI-Assisted Editing: Chat with Claude 3.7 Sonnet about your code and let it make changes directly to your project files
  • File Browser: Select specific files to include in the context window for more focused AI assistance
  • Branch Management: View, select, and create branches without leaving the app
  • Cost Tracking: See estimated API usage costs for each interaction
  • Sound Notifications: Get alerted when Claude finishes responding
  • Mobile-Friendly: Works on both desktop and mobile devices

How It Works

  1. Login: Authenticate with your Val Town API token and Anthropic API key
  2. Select a Project: Choose which Val Town project you want to work on
  3. Select Files: Browse your project files and select which ones to include in the context window
  4. Chat with Claude: Describe what you want to build or modify, and Claude will help implement it
  5. Branch Management: Create and switch between branches to organize your development work

Getting Started

Prerequisites

  • A Val Town account with API access
  • An Anthropic API key (Claude 3.7 Sonnet)

Setup

  1. Visit the OpenTownie app
  2. Enter your Val Town API token (with projects:write and users:read permissions)
  3. Enter your Anthropic API key
  4. Click "Login" to access your projects

Usage Tips

  • Be Specific: When asking Claude to make changes, be as specific as possible about what you want
  • Include Context: Select relevant files to give Claude the context it needs
  • Create Branches: Create a new branch before making significant changes to avoid affecting your main code
  • Review Changes: Always review Claude's changes before merging them into your main branch
  • Iterative Development: Break down complex tasks into smaller steps for better results

Technical Details

OpenTownie is built with:

  • React frontend with TypeScript
  • Hono API server backend
  • Tailwind CSS for styling
  • Web Audio API for sound notifications
  • AI SDK for Claude integration

The application proxies requests to the Anthropic API and Val Town API, allowing Claude to view and edit your project files directly.

Privacy & Security

  • Your Val Town API token and Anthropic API key are stored locally in your browser
  • No data is stored on our servers
  • All communication with the APIs is done directly from your browser