27
README.md
27
README.md
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
[](https://github.com/davidbeesley/claude-chill/actions/workflows/ci.yml)
|
[](https://github.com/davidbeesley/claude-chill/actions/workflows/ci.yml)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](https://github.com/davidbeesley/claude-chill/stargazers)
|

|
||||||
[](https://github.com/davidbeesley/claude-chill/network)
|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
A PTY proxy that tames Claude Code's massive terminal updates.
|
A PTY proxy that tames Claude Code's massive terminal updates.
|
||||||
@@ -83,9 +83,28 @@ Keys: `[a]`-`[z]`, `[f1]`-`[f12]`, `[pageup]`, `[pagedown]`, `[home]`, `[end]`,
|
|||||||
|
|
||||||
`Ctrl+6` sends 0x1E, a control character not frequently used by terminals, signals, or shells. Avoid `Ctrl+letter` hotkeys - terminals can't distinguish `Ctrl+J` from `Ctrl+Shift+J`.
|
`Ctrl+6` sends 0x1E, a control character not frequently used by terminals, signals, or shells. Avoid `Ctrl+letter` hotkeys - terminals can't distinguish `Ctrl+J` from `Ctrl+Shift+J`.
|
||||||
|
|
||||||
|
## How It Works
|
||||||
|
|
||||||
|
claude-chill creates a pseudo-terminal (PTY) and spawns Claude Code as a child process. It then acts as a transparent proxy between your terminal and Claude:
|
||||||
|
|
||||||
|
```
|
||||||
|
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
||||||
|
│ Terminal │◄───►│ claude-chill │◄───►│ Claude Code │
|
||||||
|
│ (stdin/ │ │ (proxy) │ │ (child) │
|
||||||
|
│ stdout) │ │ │ │ │
|
||||||
|
└──────────────┘ └──────────────┘ └──────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
1. **Input handling**: Keystrokes pass through to Claude, except for the lookback key which toggles lookback mode
|
||||||
|
2. **Output processing**: Scans output for sync block markers. Non-sync output passes through directly
|
||||||
|
3. **Sync block buffering**: Accumulates sync block content until the end marker arrives
|
||||||
|
4. **Truncation decision**: If the sync block contains a full screen clear (`ESC[2J` + `ESC[H`), truncates to the last N lines. Otherwise passes through unchanged
|
||||||
|
5. **History tracking**: Maintains a rolling buffer of output for lookback mode
|
||||||
|
6. **Signal forwarding**: Window resize (SIGWINCH), interrupt (SIGINT), and terminate (SIGTERM) signals are forwarded to Claude
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
This tool was developed for personal convenience on Debian Linux. It works for me, but it hasn't been extensively tested across different terminals, operating systems, or edge cases. Don't use it to send anyone to space, perform surgery, or run critical infrastructure. If it breaks, you get to keep both pieces.
|
This tool was developed for personal convenience. It works for me on Linux and macOS, but it hasn't been extensively tested across different terminals or edge cases. Don't use it to send anyone to space, perform surgery, or run critical infrastructure. If it breaks, you get to keep both pieces.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
|||||||
@@ -353,6 +353,7 @@ impl Proxy {
|
|||||||
write_all(stdout_fd, &self.sync_buffer)?;
|
write_all(stdout_fd, &self.sync_buffer)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.sync_buffer.clear();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user