§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

    Opens your browser to sign in with your TerraWatch account, then links the CLI to it. Your savings show up on the same dashboard as the extension.

    $ 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 and submitted. Short replies like “y” or “1” are sent untouched.

$ twc-live claude
$ twc-live codex
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 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?
Yes. The CLI uses deep AI rewrites, so on the free plan each compressed message counts toward the 10 a day. When you hit the limit, prompts are sent as-is and nothing breaks. Pro is unlimited.
What if I'm not signed in or offline?
Your prompt is sent exactly as you typed it. The CLI never blocks or delays your session over TerraWatch.
Is my prompt stored?
No. 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