Open source contribution · Rust · CLI · LLM Token Reduction

rtk-ai/rtk

Zero-dependency Rust CLI proxy that reduces AI token consumption by 60% to 90% on common dev commands (git, cargo, npm, testing).

  • 2 PRs under review
  • 5 commits to the project
  • +197 lines added
  • 83.2k GitHub stars

See every PR Repository on GitHub

The project

RTK is a high-performance CLI proxy written in Rust with zero runtime dependencies, designed to cut AI token consumption by 60% to 90% across standard developer commands.

It acts as a transparent proxy between developers or AI coding agents and commands like git, cargo, npm, pytest, and linters, compressing verbose output while preserving the essential context for LLMs.

How each PR was made

  • One problem per PR

    Each PR fixes a single thing with the smallest possible change. That keeps reviews simple, lowers the risk of side effects and lets one change be reverted without taking others with it.

  • The problem becomes a test

    Fixes come with automated tests that cover the case that used to fail, so the problem cannot come back unnoticed.

  • The project's own bar

    Formatting, static analysis and the full test suite run in the project's continuous integration, and a change only lands after the maintainer's review.

  • Written for the reviewer

    Each PR description explains the problem, the change and how it was tested, so the maintainer can decide with confidence.

Every PR, in business terms

These PRs are under review by the maintainers and have not been merged yet. Click one to see the problem, the proposal and the expected value.

  1. #4535opened Oct 12, 2026Under review Stdout and stderr write errors propagated cleanly instead of aborting In release builds, I/O errors during stdout or stderr writes in rtk read caused panics and abrupt SIGABRT aborts; the PR proposes clean error propagation with exit code 1.
    The problem
    In rtk read, general output was printed using the print! macro. Any I/O error during writing (such as ENOSPC, EDQUOT, or EPIPE) triggered a panic in std::io::stdio. Because release builds configure panic = "abort", the process crashed immediately with SIGABRT (exit code 134), preventing caller tools and scripts from identifying the root cause. Furthermore, reporting the error to stderr via eprintln! caused a secondary crash if stderr was also redirected or unwritable.
    What the PR proposes
    The PR introduces a fallible write_output helper that writes to locked stdout via writer.write_all() and cleanly returns a Result<()>, replacing the panic-prone print! macro. Error reporting in main and Commands::Read now guards stderr writes with non-panicking writeln!, preventing secondary aborts. Unit tests cover error bubbling, and Linux integration tests against /dev/full verify clean exit code 1 without crashing.
    Expected value
    Eliminates catastrophic SIGABRT process crashes in the CLI when standard streams run out of space or disconnect, allowing CI pipelines, AI agents, and automated scripts to handle failures deterministically.

Other PRs under review 1 PR

Not yet described in detail on this page; the title is the one on GitHub.

  • #4555 opened Oct 13, 2026 fix(task): resolve command and platform shell in task runner

Figures updated on Oct 13, 2026.

The same care in your system

The habits behind these PRs carry over to backends that move money: reproduce the problem before fixing it, prove the fix with a test and keep sensitive data from leaking.

Talk to Vinícius Home