View on GitHub

claude-chat-code

claude-chat-code

claude-chat-code

A Windows TUI that monitors for zip file downloads from Claude chat, then automatically builds and launches the code. Written in Rust.


Installation

Rust is required.

cargo install --force --git https://github.com/cat2151/claude-chat-code

After installation, you can launch it from any terminal.

claude-chat-code

To display the built-in help, run:

claude-chat-code --help

To update an installed binary, run:

claude-chat-code update

Challenges and Solutions

Traditional Challenges

When generating or modifying code with Claude chat, the following steps were traditionally required every time:

  1. Download the zip from Claude chat.
  2. Back up the working directory.
  3. Delete old files (to prevent build errors caused by leftover files).
  4. Unzip the archive.
  5. Run cargo run.
  6. If there are build errors, paste them into Claude chat and instruct it to fix them.
  7. Go back to step 1.

Repeating this cycle many times, manual operations disrupt concentration. Diverting mental resources to “managing files” reduces the quality of “designing specifications.”

This Application’s Solution

Simply by pressing the download button in Claude chat, all of the following happen automatically:

  1. Detects the zip file.
  2. Backs up the project.
  3. Deletes the existing project/src/ (to prevent leftover old files).
  4. Unzips the archive.
  5. Launches cargo run in a separate window.

After that, you can focus on interacting with Claude chat and the build results.


Usage

Instruct Claude chat to code, then download the result as a zip
        ↓
claude-chat-code automatically detects the zip, builds, and launches the app
        ↓
If there's an error, paste build results into Claude chat; if the app launches successfully, test the UX and instruct for feature additions or improvements
        ↓
Repeat

Configuration

A configuration file is automatically generated on first launch.

%LOCALAPPDATA%\claude-chat-code\config.toml
# watch_dir: Directory to monitor. If commented out, Windows Desktop is monitored.
# watch_dir = "C:\Users\<your name>\Desktop"

# watch_interval: Monitoring check interval. Default is 500ms if commented out.
# watch_interval = "500ms"

Keybindings

Key Action
q Exit
c Copy log to clipboard
F5 Rerun cargo run
y / N Respond to startup ZIP confirmation dialog

Environment


Tech Stack

Technology Purpose
Rust Language
ratatui TUI framework
crossterm Terminal control & keyboard input
tokio Asynchronous runtime (monitoring, pipeline separation)
zip ZIP extraction, automatic stripping of single top-level directory
reqwest Update check via GitHub API
arboard Clipboard operations
serde + toml Reading/writing config.toml
chrono Timestamp / Elapsed time display
walkdir Recursive traversal under src/
filetime Updating file mtime (touch)

Assumptions

Intended Use Cases

What claude-chat-code Aims For

What it Does Not Aim For (Out of Scope)

Disclaimer