# AI use cases for RTK (rtk-ai/rtk)

Repo: [rtk-ai/rtk](https://github.com/rtk-ai/rtk) | Use cases: 3 | Page: https://dedupedai.com/use-cases/rtk-ai-rtk/

RTK is a single Rust binary that filters and compresses the output of 100 plus common dev commands before it reaches an AI coding agent's context, with hooks for many agents and a savings dashboard.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Cut your coding agent's token use from command output: https://dedupedai.com/use-cases/rtk-ai-rtk/cut-agent-token-use-from-command-output/
- Set up RTK for Codex, Gemini CLI or Cursor: https://dedupedai.com/use-cases/rtk-ai-rtk/set-up-rtk-for-codex-gemini-cursor/
- Use the Apache-only edition for license-sensitive teams: https://dedupedai.com/use-cases/rtk-ai-rtk/choose-apache-only-rtk-edition/

## How to cut Claude Code token use with RTK

Repo: [rtk-ai/rtk](https://github.com/rtk-ai/rtk) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Install RTK and hook it into your agent so command output is compressed before it hits context.

**Who it is for:** A developer whose agent burns context on long test and git output.

**The problem:** Verbose command output fills the context window.

**The outcome:** Smaller command outputs and a dashboard of savings.

### Steps

1. Install with `brew install rtk` (or `winget install rtk-ai.rtk`)
2. Hook it into Claude Code with `rtk init -g`
3. Check with `rtk --version` and `rtk gain`
4. Work as usual and watch the savings

### Prompt to paste into your agent

```text
Install rtk-ai/rtk, run `rtk init -g` for Claude Code, do a session with tests and git commands, then report `rtk gain` savings.
```

### Caveat

The full and OSS editions install a binary with the same name, so install only one.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/rtk-ai-rtk/cut-agent-token-use-from-command-output/

## How to set up RTK for Codex, Gemini CLI or Cursor with RTK

Repo: [rtk-ai/rtk](https://github.com/rtk-ai/rtk) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Use the agent-specific init flags to add RTK hooks to other agents.

**Who it is for:** A developer who switches between several coding agents.

**The problem:** Each agent needs its own integration.

**The outcome:** RTK hooks configured for the agents you use.

### Steps

1. Install RTK
2. Run `rtk init -g --codex` for Codex
3. Run `rtk init -g --gemini` for Gemini CLI or `rtk init -g --agent cursor` for Cursor
4. Verify savings with `rtk gain`

### Prompt to paste into your agent

```text
Configure RTK for <agent> with the matching rtk init flag and confirm the hook is active by running a command and checking `rtk gain`.
```

### Caveat

Some agents use project-level hooks rather than global ones.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/rtk-ai-rtk/set-up-rtk-for-codex-gemini-cursor/

## How to use the Apache-only edition for license-sensitive teams with RTK

Repo: [rtk-ai/rtk](https://github.com/rtk-ai/rtk) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Pick rtk-oss for hooks and filters under Apache-2.0 only.

**Who it is for:** A team lead whose company restricts BUSL-licensed tools.

**The problem:** The full edition includes BUSL-1.1 components.

**The outcome:** RTK hooks and filters under an Apache-2.0-only build.

### Steps

1. Uninstall any existing RTK edition
2. Install the rtk-oss edition
3. Run your agent's RTK init command
4. Check `rtk --version`

### Prompt to paste into your agent

```text
Install the rtk-oss edition, configure it for <agent>, and confirm `rtk --version` reports the OSS build.
```

### Caveat

rtk-proxy, which compresses API traffic, is BUSL-1.1.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/rtk-ai-rtk/choose-apache-only-rtk-edition/
