Skip to content

Commit 6dd5e59

Browse files
authored
Merge pull request #134 from second-state/docs/claude-code-integration
Docs/claude code integration
2 parents 8fbfa81 + 4f14d0c commit 6dd5e59

4 files changed

Lines changed: 509 additions & 0 deletions

File tree

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
---
2+
slug: echokit-remote-control-claude-code
3+
title: "My Coding Assistant Lives in a Box Now | EchoKit"
4+
tags: [echokit, claude-code, remote-control, voice-ai]
5+
---
6+
7+
It was 2 AM. I was deep in a coding session, fingers flying across the keyboard, completely in the zone. Then I hit a bug. I needed to run the tests.
8+
9+
Which meant breaking my flow. Switching windows. Typing the command. Waiting. Switching back.
10+
11+
I thought: *What if I could just say it?*
12+
13+
**Not into my phone.** Not unlocking an app. Just speak—to a device sitting on my desk.
14+
15+
## A Small Device, Big Idea
16+
17+
That moment sparked an experiment. What if my AI coding assistant wasn't trapped in a terminal window, but lived in a small device on my desk? What if I could speak to it like a pair programmer sitting next to me?
18+
19+
Not voice typing—I hate that. But voice *commands*. Like having a junior developer who actually does things, not just suggests them.
20+
21+
So I built it.
22+
23+
Today, I'm excited to share how EchoKit became a voice remote control for Claude Code. And why this changes everything about how I work.
24+
25+
## It Started with a Problem
26+
27+
Claude Code is amazing. It writes code, fixes bugs, runs tests, explains errors.
28+
29+
**Yes, Claude Code now has an official Remote Control feature for mobile and web access.** But it's designed for phones and browsers—not for hands-free voice control or physical devices. You still need to look at a screen and tap buttons.
30+
31+
I wanted something different. Something that felt like... magic.
32+
33+
## The Missing Piece
34+
35+
I had EchoKit—my open-source voice AI device sitting on my desk. It can hear me, think, and respond. But it couldn't control my code editor.
36+
37+
I needed a bridge.
38+
39+
That bridge is called [echokit_pty](https://github.com/second-state/echokit_pty).
40+
41+
**What is echokit_pty?** It's the web version of Claude Code, but with a superpower: a WebSocket interface.
42+
43+
See, Claude Code was designed as a CLI tool. You run it in your terminal, type commands, get responses. That's great for terminal workflows. But for voice control? For remote access? For building *anything* on top of Claude Code?
44+
45+
You need something more.
46+
47+
echokit_pty is that "more."
48+
49+
## How echokit_pty Changed Everything
50+
51+
Here's what echokit_pty does: it takes Claude Code and exposes it through a WebSocket server. Suddenly, Claude Code isn't just a terminal app—it's a service that *anything* can talk to.
52+
53+
My EchoKit device can send commands. A web app could send commands. A mobile app. A game controller. Anything that speaks WebSocket.
54+
55+
But here's the beautiful part: it's still Claude Code. All the capabilities, all the intelligence, everything that makes Claude Code amazing—just accessible through a clean, simple interface.
56+
57+
## The Setup: Three Pieces, One Experience
58+
59+
Now my coding setup looks like this:
60+
61+
**1. echokit_pty runs on my machine** — Starts a WebSocket server (ws://localhost:3000/ws)
62+
63+
**2. EchoKit Server connects to it** — Handles speech recognition and text-to-speech
64+
65+
**3. EchoKit Device sits on my desk** — Listens for my voice, speaks back responses
66+
67+
```
68+
My Voice: "Run the tests"
69+
70+
EchoKit Device (hears me)
71+
72+
EchoKit Server (transcribes speech)
73+
74+
echokit_pty (WebSocket connection)
75+
76+
Claude Code (executes the command)
77+
78+
Tests run, results stream back
79+
80+
EchoKit speaks: "142 tests passed, 3 failed"
81+
```
82+
83+
All while I keep typing. No window switching. No flow breaking.
84+
85+
## A Day in the Life
86+
87+
Let me show you what this actually feels like.
88+
89+
**Morning:**
90+
I sit down with coffee. "EchoKit, run the full test suite." I start reading emails while tests run in the background. Five minutes later: "Tests complete. Two failures in the auth module."
91+
92+
**Afternoon:**
93+
I'm stuck on a bug. "EchoKit, why is the login failing?" It explains the issue while I'm looking at the code. "Can you fix it?" "Done. Want me to run the tests?" "Yes."
94+
95+
**Evening:**
96+
I'm tired, don't want to type. "EchoKit, create a new feature branch called dark-mode." "Deploy staging." "Check if the build passed." Each command happens while I'm leaning back in my chair.
97+
98+
It feels like having a coding companion. Not a tool—a teammate.
99+
100+
## Why This Matters
101+
102+
I know what you're thinking: *Voice control for coding? Sounds weird.* And doesn't Claude Code have Remote Control now?
103+
104+
You're right—it *is* weird at first. But here's the thing: **Claude Code's Remote Control is great for mobile access, but EchoKit isn't your phone.** It's a dedicated device that sits on your desk. Always on. Always listening. No unlocking, no apps, no picking it up.
105+
106+
Here's what I discovered:
107+
108+
**It's not about voice typing.** I'm not dictating code. That would be terrible.
109+
110+
**It's about having a physical device.** Think of it like a smart speaker for coding. It just sits there, ready to help. No screens to tap, no apps to open, no phone to find.
111+
112+
**The magic is the always-there presence.** The device lives on my desk. It's part of my workspace. I don't need to grab anything or unlock anything. I just speak.
113+
114+
**It keeps me in the flow.** That's the biggest one. I can stay focused on coding while EchoKit handles tasks in the background. It's like having a second pair of hands.
115+
116+
## The Tech Behind the Magic
117+
118+
If you're curious how echokit_pty works technically, here's the short version:
119+
120+
**PTY** stands for "pseudo-terminal"—a Unix concept that lets a program control a terminal as if a user were typing. echokit_pty uses this to create a bridge between:
121+
- **WebSocket clients** → send JSON commands
122+
- **Claude Code CLI** → executes the commands
123+
- **Response streaming** → sends results back
124+
125+
It's built with Rust, runs locally, and is completely open source. No cloud required. Your code never leaves your machine.
126+
127+
But here's what I care about: it just works.
128+
129+
## What You Can Do
130+
131+
So what does this actually look like in practice?
132+
133+
**"Create a web page for me"**
134+
→ Claude Code generates the HTML, EchoKit confirms when done
135+
136+
**"Run the tests"**
137+
→ Tests execute, EchoKit tells me the results
138+
139+
**"Explain this error"**
140+
→ Claude Code analyzes, EchoKit reads the explanation
141+
142+
**"Deploy to staging"**
143+
→ Deployment triggers, EchoKit confirms when complete
144+
145+
**"Create a new branch"**
146+
→ Git command executes, no typing required
147+
148+
I can speak from across the room. Keep my hands on the keyboard while EchoKit works in the background. Get voice feedback without breaking my flow.
149+
150+
## Building Your Own
151+
152+
This is the part I'm most excited about: everything here is open source.
153+
154+
- **EchoKit** — Open hardware, Rust firmware, fully customizable
155+
- **echokit_pty** — Open source WebSocket interface for Claude Code
156+
- **EchoKit Server** — Rust-based voice AI server
157+
158+
You can build this yourself. Or modify it. Or extend it.
159+
160+
Want to add custom voice commands? Go ahead.
161+
Want to integrate with other tools? echokit_pty makes it possible.
162+
Want to build a completely different interface? The WebSocket is waiting.
163+
164+
## The Future
165+
166+
This experiment showed me something: AI coding assistants can take many forms beyond screens and apps.
167+
168+
**Claude Code's Remote Control solved mobile access.** But what about specialized hardware? What about completely hands-free experiences? What about devices that do one thing perfectly?
169+
170+
echokit_pty is the bridge that makes these experiments possible. And EchoKit is just one example.
171+
172+
Imagine what else we could build:
173+
- Voice-controlled development environments
174+
- Specialized devices for specific workflows
175+
- Educational tools that feel like magic
176+
- Assistive technology for developers with disabilities
177+
178+
All built on top of echokit_pty's open WebSocket interface.
179+
180+
## Try It Yourself
181+
182+
Ready to turn your AI assistant into a physical device?
183+
184+
**Full Documentation:** [Remote Control Claude Code with Your Voice](https://echokit.dev/docs/use-cases/claude-code)
185+
186+
**EchoKit Hardware:**
187+
- [EchoKit Box](https://echokit.dev/echokit_box.html) — Pre-assembled device
188+
- [EchoKit DIY Kit](https://echokit.dev/echokit_diy.html) — Build it yourself
189+
190+
**echokit_pty Repository:** [github.com/second-state/echokit_pty](https://github.com/second-state/echokit_pty)
191+
192+
**Join the Community:** [EchoKit Discord](https://discord.gg/Fwe3zsT5g3)
193+
194+
Build something cool. Then tell me about it.
195+
196+
---
197+
198+
*PS: The first time I heard EchoKit say "Tests passed" while I was making coffee? That's when I knew this wasn't just a cool experiment. This was how I wanted to work from now on.*
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
---
2+
slug: echokit-pty-websocket-claude-code
3+
title: "echokit_pty: Giving Claude Code a Remote Control"
4+
tags: [echokit-pty, claude-code, websocket, developer-tools]
5+
---
6+
7+
Claude Code is amazing. It writes code, fixes bugs, runs tests, explains errors. But it lives in your terminal. To use it, you type commands, get responses. It's a CLI tool, designed for terminal workflows.
8+
9+
But what if you want to build something on top of Claude Code? What if you want a web app? A mobile interface? A physical device? Voice control?
10+
11+
That's why we built **echokit_pty**.
12+
13+
## What Is echokit_pty?
14+
15+
**echokit_pty** is the web version of Claude Code with a superpower: a WebSocket interface.
16+
17+
It handles Claude Code's input and output, turning its CLI into a WebSocket service. Suddenly, Claude Code isn't just a terminal app—it's a service that *any application* can talk to.
18+
19+
**What makes it special?**
20+
- Full Claude Code capabilities (file editing, command execution, tool use)
21+
- **Clean JSON API for integrations**. Check out the full API documentation [here](https://github.com/second-state/echokit_pty?tab=readme-ov-file#api).
22+
- **Open and extensible** - unlike Claude Code's official Remote Control, you have full control over the protocol and can customize every aspect
23+
- **No subscription required** - free and open source vs. Max-only Remote Control
24+
- Bidirectional streaming (real-time responses)
25+
- Runs locally
26+
- Built for developers building custom solutions
27+
28+
## The Problem: Claude Code Is Trapped in the Terminal
29+
30+
Claude Code was designed as a CLI tool. You run it in your terminal, type commands, get responses. This works great for terminal workflows.
31+
32+
But what if you want to:
33+
- Build a web app that uses Claude Code?
34+
- Create a physical device that talks to Claude Code?
35+
- Integrate Claude Code into another tool?
36+
- Build a custom application that needs programmatic access?
37+
38+
**Yes, Claude Code now has an official Remote Control feature** for mobile and web access. But it's designed as a user-facing feature, not a developer platform. It requires a Max subscription, uses a closed protocol, and can't be integrated into custom applications.
39+
40+
That's where echokit_pty comes in.
41+
42+
## The Solution: PTY + WebSocket
43+
44+
The bridge is **echokit_pty**.
45+
46+
**What does "pty" mean?**
47+
48+
PTY stands for "pseudo-terminal"—a Unix concept that allows a program to control a terminal as if a user were typing.
49+
50+
echokit_pty uses this technology to create a bridge between:
51+
- **WebSocket clients** → send JSON commands
52+
- **Claude Code CLI** → executes the commands
53+
- **Response streaming** → sends results back
54+
55+
## How It Works
56+
57+
echokit_pty is built with Rust. Here's the architecture:
58+
59+
```
60+
┌─────────────────┐ WebSocket ┌──────────────┐
61+
│ Any Client │ ◄─────────────────► │ echokit_pty │
62+
│ (Web, Mobile, │ (ws://localhost)│ (Rust) │
63+
│ Device, etc.) │ └──────┬───────┘
64+
└─────────────────┘ │
65+
│ PTY
66+
67+
┌──────────────┐
68+
│ Claude Code │
69+
│ CLI │
70+
└──────────────┘
71+
```
72+
73+
**The flow:**
74+
1. echokit_pty starts a WebSocket server (default: `ws://localhost:3000/ws`)
75+
2. Clients connect via WebSocket and send JSON commands
76+
3. echokit_pty forwards commands to Claude Code CLI through a pseudo-terminal
77+
4. Claude Code executes the command
78+
5. Results stream back through the WebSocket in real-time
79+
80+
**Example:**
81+
```json
82+
// Client sends
83+
{"type": "command", "content": "run the tests"}
84+
85+
// echokit_pty forwards to Claude Code
86+
87+
// Results stream back
88+
{"type": "response", "content": "Running tests...\n142 passed, 3 failed"}
89+
```
90+
91+
## Use Cases: What Can You Build?
92+
93+
The beauty of echokit_pty is that it turns Claude Code into a *platform*. Here's what you can build:
94+
95+
### Voice-Controlled Coding
96+
Speak commands, Claude Code executes, hear results. Perfect for hands-free workflows. This is what EchoKit + echokit_pty enables.
97+
98+
**Why echokit_pty for voice control?** While Claude Code's Remote Control works great for mobile/web access, it doesn't support voice interfaces or custom hardware. echokit_pty's open API lets you build exactly the voice experience you need—whether that's a custom device, specialized voice commands, or integration with other speech services.
99+
100+
But it's just one implementation. For more details, check out EchoKit's full integration [documentation](https://echokit.dev/docs/use-cases/claude-code).
101+
102+
### Web Apps
103+
Build a web interface for Claude Code. No terminal required. Just open a browser, connect to the WebSocket, and start coding. Great for presentations, teaching, or developers who prefer GUIs.
104+
105+
### Mobile Apps
106+
Control Claude Code from your phone. Run tests while walking. Check build status from the couch. Deploy from anywhere. Your coding environment fits in your pocket.
107+
108+
### Pair Programming Platforms
109+
Create a web app where multiple people can interact with Claude Code simultaneously. Real-time collaboration, shared context, better than screen sharing.
110+
111+
### Teaching & Demos
112+
Show Claude Code in presentations without terminal windows cluttering the screen. A clean web interface for live coding demos, tutorials, and workshops.
113+
114+
### Custom Developer Tools
115+
Build your own tools on top of Claude Code. Automations, dashboards, integrations—anything you can imagine. The WebSocket interface makes Claude Code a building block.
116+
117+
### IDE Integrations
118+
Embed Claude Code directly into your IDE. VS Code extension, JetBrains plugin, custom editor—give Claude Code a proper home in your development environment.
119+
120+
## Getting Started
121+
122+
**Installation:**
123+
124+
First, clone and build echokit_pty:
125+
126+
```bash
127+
git clone https://github.com/second-state/echokit_pty.git
128+
cd echokit_pty
129+
cargo build --release --bin echokit_cc
130+
```
131+
132+
**Running echokit_pty:**
133+
134+
Set your workspace directory and start the server:
135+
136+
```bash
137+
ECHOKIT_WORKING_PATH="/path/to/your/workspace" \
138+
./target/release/echokit_cc -c ./run_cc.sh -b "localhost:3000"
139+
```
140+
141+
The WebSocket server will start on `ws://localhost:3000/ws`.
142+
143+
![](./2026-02-25-echokit-pty.jpg)
144+
145+
## echokit_pty vs. Claude Code Remote Control
146+
147+
You might be wondering: *Should I use echokit_pty or Claude Code's official Remote Control?*
148+
149+
**Use Claude Code Remote Control if:**
150+
- You want to control Claude Code from your phone or browser
151+
- You have a Max subscription and don't need customization
152+
- You just need remote access, not programmatic control
153+
154+
**Use echokit_pty if:**
155+
- You're building a custom application or service
156+
- You need full control over the protocol and behavior
157+
- You want to integrate Claude Code into hardware (voice devices, custom interfaces)
158+
- You need a free, open-source solution
159+
- You're building something beyond simple remote control
160+
161+
**They're complementary, not competing.** Remote Control is perfect for individual developers who want mobile access. echokit_pty is for builders who want to create entirely new experiences on top of Claude Code.
162+
163+
## The Vision
164+
165+
Claude Code is the most capable AI coding assistant today. With Remote Control, it can now follow you beyond the terminal. But that's just the beginning.
166+
167+
echokit_pty is about turning Claude Code into a true **platform for innovation**.
168+
169+
Imagine what we can build:
170+
171+
- Voice-controlled coding assistants with custom hardware
172+
- Specialized interfaces for specific workflows
173+
- Custom developer tools and dashboards
174+
- AI-powered IDE integrations
175+
- Educational platforms with tailored experiences
176+
177+
All built on top of echokit_pty's open API.
178+
179+
**Claude Code as a platform for builders, not just a tool for users.**
180+
181+
---
182+
183+
**Ready to build something?**
184+
185+
Start with the [echokit_pty repository](https://github.com/second-state/echokit_pty). See EchoKit's full integration [documentation](https://echokit.dev/docs/use-cases/claude-code) for a complete example. Join our [Discord community](https://discord.gg/Fwe3zsT5g3) to share your ideas.

doc/dev/2026-02-25-echokit-pty.jpg

403 KB
Loading

0 commit comments

Comments
 (0)