§CLI

Shorter prompts,right in your terminal.

twc sits between you and Claude Code, Codex, or any terminal AI tool. It strips the filler from what you type before it's sent, so you spend fewer tokens without changing how you work.

Quick start

  1. 01

    Install

    Needs Node.js 18 or newer. This adds the twc and twc-live commands to your terminal.

    $ npm install -g terrawatch-cli
  2. 02

    Sign in (optional)

    Compression works without an account. Signing in puts your CLI savings on the same dashboard as the extension and raises deep AI rewrites (--deep) from 3 to 10 a day.

    $ twc login
  3. 03

    Start a session

    Launches Claude Code exactly as normal. Every message you type is compressed the moment you press Enter.

    $ twc-live claude

Two ways to use it

twc-live <tool>

Whole session

Wraps an interactive tool. Your keystrokes pass straight through so the tool looks and behaves the same; on Enter, the message is compressed on your machine and submitted. Short replies like “y” or “1”, slash commands like /compact, and pasted or multi-line text are sent untouched. Add --deep for AI rewrites.

$ twc-live claude
$ twc-live codex
$ twc-live --deep claude
twc <tool> "prompt"

One prompt

Compresses a single prompt, prints how many tokens it saved, then launches the tool with the shorter version. You can also pipe text in.

$ twc claude "help me write a function that validates emails"
$ cat task.md | twc claude

Make it automatic

On macOS or Linux, alias claude so every session is compressed without thinking about it. Use ~/.bashrc instead of ~/.zshrc if you use bash.

$ echo "alias claude='twc-live claude'" >> ~/.zshrc
$ source ~/.zshrc

Commands

twc-live <tool>Run <tool> with every message compressed
twc <tool> "prompt"Compress one prompt, then launch <tool> with it
twc statsTokens, money and CO₂ saved on this machine
twc config deep onMake AI rewrites the default
twc loginSign in through your browser
twc whoamiShow the signed-in account and plan
twc logoutSign out on this machine
twc helpShow usage

Good to know

Which tools does it work with?
Tested with Claude Code and the OpenAI Codex CLI. twc-live wraps any command, so Gemini CLI, Aider and others should work too, but they haven't been tested yet.
Does it count toward my daily limit?
Not by default. Normal compression runs on your machine and is unlimited. Only --deep uses deep AI rewrites, which count toward the free daily limit: 3 without an account, 10 with a free one. Past the limit it switches to local compression and nothing breaks. Pro is unlimited.
What if I'm not signed in or offline?
Local compression keeps working, since it needs neither. With --deep, those messages fall back to local compression. The CLI never blocks your session over TerraWatch.
Is my prompt stored?
No. By default your prompt never leaves your machine. With --deep it's sent to our server, rewritten by Anthropic's API, and returned without being stored. Only the savings stats are kept. See the privacy policy.
Known rough edges
Editing mid-line with the arrow keys before pressing Enter can confuse twc-live. In tools that redraw the whole screen, the “tokens saved” note may only show in your terminal's title bar.

Need an account first?

Create a free account