Skip to content

feat: add Pi coding agent to supported tool configs#89

Open
vlamai wants to merge 1 commit into
mex-memory:mainfrom
vlamai:feat/add-pi-support
Open

feat: add Pi coding agent to supported tool configs#89
vlamai wants to merge 1 commit into
mex-memory:mainfrom
vlamai:feat/add-pi-support

Conversation

@vlamai

@vlamai vlamai commented Jul 12, 2026

Copy link
Copy Markdown

What

Add Pi coding agent to the list of supported AI tools in mex.

Why

Pi is an open-source coding agent that reads AGENTS.md at startup from the project root (same as Codex). Adding native support allows users to select Pi during mex setup and use mex sync with Pi CLI for auto-repair.

Changes

  • src/types.ts: Add "pi" to AiTool union, add AI_TOOLS.pi with cli: "pi", promptFlag: ["-p"]
  • src/config.ts: Add "pi" to VALID_AI_TOOLS
  • src/setup/index.ts: Pi as option 7 in menu (renumber Multiple→8, None→9)
  • src/sync/index.ts: Add "pi" to supported CLIs message
  • templates/.tool-configs/README.md: Add Pi to table and examples

How it works

  • mex setup → select "7) Pi" → copies CLAUDE.md as AGENTS.md to project root
  • Pi reads AGENTS.md at startup → loads routing table from ROUTER.md
  • mex sync → detects pi CLI → runs pi -p "<brief>" for auto-repair

How to test

  1. npm install && npm run build
  2. mkdir /tmp/test && cd /tmp/test && git init
  3. node dist/cli.js setup → select 7) Pi
  4. Verify AGENTS.md in project root
  5. Run pi → verify it reads AGENTS.md and ROUTER.md
  6. node dist/cli.js check → verify drift detection

Checklist

  • Tests pass (245/245)
  • Type check passes
  • Build succeeds
  • No breaking changes
  • Tested locally

- Add 'pi' to AiTool type union with cli: 'pi', promptFlag: ['-p']
- Add 'pi' to VALID_AI_TOOLS in config.ts
- Add Pi as option 7 in setup menu (renumber Multiple→8, None→9)
- Pi uses AGENTS.md (same as Codex) which pi reads automatically at startup
- Add Pi to tool-configs README table and setup examples
- Update sync fallback message to include pi in supported CLIs

Pi reads AGENTS.md from project root at startup, so integration
uses the same template as Claude Code/Codex. The -p flag enables
non-interactive mode for mex sync auto-repair.
@theDakshJaitly

Copy link
Copy Markdown
Collaborator

Hello @vlamai thanks for the PR, we are currently putting out a major update so I will review this PR once that is out. I hope you dont mind and once again thanks for the contribution!

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.

2 participants