Loaded through the root pi-ext package.
See ../../README.md.
Requires rtk >= 0.23.0 on PATH.
If missing or old, the extension prints one warning and stays idle.
Commands / tools / settings
Pi commands:
none.
Pi tools:
none.
Pi hooks:
tool_call:
watches builtin bash calls and may replace input.command with rtk rewrite output.
Pi settings:
none.
Env vars:
RTK_DISABLED=1
Prefix one command with RTK_DISABLED=1 to bypass rewriting.
UI
The bash tool widget is the command indicator.
When RTK applies, Pi shows the rewritten rtk ... command.
After session start, Pi checks RTK in the background and warns whether find rewrites are disabled or the compatibility guard can be removed.
The first bash call waits for that shared check when it is still running.
Behavior
rtk does one thing:
registers the bash hook without blocking extension load
probes rtk --version after session start, or on the first bash call
warns once and leaves commands unchanged if rtk is missing or too old
probes rtk find -path against a temporary nested marker and warns with the result
ignores non-bash tools
ignores empty, already-rtk, and disabled commands
calls rtk rewrite <command> with a 2s timeout
applies exit 0 and 3 rewrites
rejects every rtk find rewrite while the path probe fails
locally maps missing journalctl, systemctl status, hyprctl clients, and ps filters to rtk summary
leaves other exit 1, exit 2, timeouts, errors, and empty output untouched
No prompt injection.
No status widget.
No command gating.
No output compaction.
No shell-specific helpers.
Markdown source
# rtkRewrites Pi `bash` tool calls through RTK.
## Install / loadLoaded through the root `pi-ext` package.
See [../../README.md](../../README.md).
Requires `rtk >= 0.23.0` on `PATH`.
If missing or old, the extension prints one warning and stays idle.
## Commands / tools / settingsPi commands:
none.
Pi tools:
none.
Pi hooks:
- `tool_call`:
watches builtin `bash` calls and may replace `input.command` with `rtk rewrite` output.
Pi settings:
none.
Env vars:
```textRTK_DISABLED=1
```
Prefix one command with `RTK_DISABLED=1` to bypass rewriting.
## UIThe bash tool widget is the command indicator.
When RTK applies, Pi shows the rewritten `rtk ...` command.
After session start, Pi checks RTK in the background and warns whether `find` rewrites are disabled or the compatibility guard can be removed.
The first `bash` call waits for that shared check when it is still running.
## Behavior`rtk` does one thing:
1. registers the `bash` hook without blocking extension load
2. probes `rtk --version` after session start, or on the first `bash` call
3. warns once and leaves commands unchanged if `rtk` is missing or too old
4. probes `rtk find -path` against a temporary nested marker and warns with the result
5. ignores non-bash tools
6. ignores empty, already-`rtk`, and disabled commands
7. calls `rtk rewrite <command>` with a 2s timeout
8. applies exit `0` and `3` rewrites
9. rejects every `rtk find` rewrite while the path probe fails
10. locally maps missing `journalctl`, `systemctl status`, `hyprctl clients`, and `ps` filters to `rtk summary`
11. leaves other exit `1`, exit `2`, timeouts, errors, and empty output untouched
No prompt injection.
No status widget.
No command gating.
No output compaction.
No shell-specific helpers.