Skip navigation
Extensions are one of Pi’s most loved features!
0:00 / 0:22

Extensions are one of Pi’s most loved features!

Pi

@pidotdev59K followers

Visit on X
482 likesDownloadOriginal post

34,270 views

Extensions are one of Pi’s most loved features! They are TypeScript modules that extend pi's behavior. Here’s an example of an extension that: - git commits a checkpoint before every turn - gives the model a run_tests tool - adds an /undo command to roll the session back

11 Comments

Comments from the original post on X (Twitter)

  • Peter Piekarczyk (🥧🚗🐥)'s profile picture

    @peterpme

    oh wow git commit a checkpoint at every turn is epic

    3 likes

  • basedcapital's profile picture

    @thebasedcapital

    the missing piece is log hygiene. checkpointing before every turn needs a cleanup policy, or git starts recording the conversation instead of code changes worth reviewing.

    1 like

  • james's profile picture

    @King0James0

    Is this similar to hooks?

    1 like

  • VastPlan's profile picture

    @yandt888

    把 git checkpoint、run_tests、/undo 做成 extension,比塞进系统提示稳得多。Pi 的扩展是 TypeScript 模块,能在每轮前落盘检查点,会话回滚就靠 /undo。

  • Nandan Priyadarshi's profile picture

    @nandanpri

    The checkpoint-before-every-turn + /undo combo is the thing I keep reinventing badly in Claude Code. I finally just wrote a tiny wrapper that git commits, runs tests, then only continues if green. Same shape as your extension, less heroics.

  • not tango uniform's profile picture

    @tangouninformed

    Anthropic "hooks 2.0" trying to "claw" back some of it's deficiencies by copying pi. Pun intended.

  • John Rood's profile picture

    @johnroodepic

    git can undo the repo. it can't undo a deploy, email, or API write. the extension boundary gets real when every external side effect has an execution receipt and a compensating action.

  • Chasen's profile picture

    @chasen_liao

    自由编写插件,我编写了一个自动compact的插件

  • Andrei Verdeș's profile picture

    @andreiverdesx

    Or this

  • Bessi's profile picture

    @LLMpsycho

    I've lost work to a bad agent turn. /undo is the extension I'd install first.

  • RusticStack's profile picture

    @RusticStack

    Checkpoint before every turn plus /undo is what turns an extension from a demo into something you keep on. run_tests as a tool is the other half.