Skip to content

feat: add Pi agent support for hook installation#750

Open
zogzog26 wants to merge 1 commit intortk-ai:masterfrom
zogzog26:feat/pi-agent-support
Open

feat: add Pi agent support for hook installation#750
zogzog26 wants to merge 1 commit intortk-ai:masterfrom
zogzog26:feat/pi-agent-support

Conversation

@zogzog26
Copy link
Copy Markdown

Summary

This PR adds support for the Pi agent (oh-my-pi / omp) in RTK, following the same pattern as the existing Cursor agent support.

Changes

  • Add to the enum in
  • Create - a shell script hook that intercepts bash commands and rewrites them to use for token savings (similar to Cursor's approach)
  • Add installation logic in to install the hook to
  • Add flag support to the CLI
  • Update uninstall to support removing Pi hooks

Usage

The hook will be installed to where Pi should automatically detect it.

Testing

  • All 979 existing tests pass
  • Code compiles successfully
  • has been run

- Add 'pi' to AgentTarget enum
- Create pi-rtk-rewrite.sh hook script similar to Cursor
- Add installation logic in init.rs for Pi hooks (~/.omp/hooks/)
- Add --agent pi flag support to CLI
- Update uninstall to support Pi hooks
@zogzog26 zogzog26 closed this Mar 20, 2026
@zogzog26 zogzog26 reopened this Mar 20, 2026
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Philippe seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@pszymkowiak
Copy link
Copy Markdown
Collaborator

Hi! Two things needed before we can review:

  1. Retarget to develop — this PR targets master, but all PRs should target develop. You can change the base branch in the PR settings (right sidebar).
  2. Sign the CLA — if not already done, please sign at https://cla-assistant.io/rtk-ai/rtk

Thanks!

@aeppling
Copy link
Copy Markdown
Contributor

Hey

We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes src/ from a flat layout into subfolders.

No logic changes — only file moves and import path updates.

What you need to do

Rebase your branch on develop when receiving this comment:

git fetch origin && git rebase origin/develop

Git detects renames automatically. If you get import conflicts, update the paths:

use crate::git;        // now: use crate::cmds::git::git;
use crate::tracking;   // now: use crate::core::tracking;
use crate::config;     // now: use crate::core::config;
use crate::init;       // now: use crate::hooks::init;
use crate::gain;       // now: use crate::analytics::gain;

Need help rebasing? Tag @aeppling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants