pi-moonbit
Pi extension for MoonBit language. Brings moonbit tool chain goodies like peek-def and docs as harness tools.
Package details
Install pi-moonbit from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-moonbit- Package
pi-moonbit- Version
0.1.0- Published
- Sep 19, 2026
- Downloads
- 274/mo · 274/wk
- Author
- kaashyapan
- License
- BSD-3-Clause
- Types
- extension
- Size
- 67.4 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
MoonBit Pi extension
Wraps moon ide subcommands (plus check, test, and the fmt+info
handoff) as discrete Pi tools, so the model reaches for compiler-aware
navigation instead of grepping .mbt source.
https://www.npmjs.com/package/pi-moonbit
Install
One of
pi install npm:pi-moonbit
pi install git:git@github.com:kaashyapan/pi-moonbit.git
pi install https://github.com/kaashyapan/pi-moonbit.git
Tools registered
Navigation / IDE
moon_peek_def— resolve a definition, with source contextmoon_find_references— find usages across dependentsmoon_type_info— type and docs at a position (wrapsmoon ide hover)moon_outline— structure of a file or package (positional path)moon_rename— compute rename edits (dry run unlessapply: true)moon_analyze— public API usage countsmoon_doc— search exported APIs/docsmoon_error_explain- Explain an error codemoon_workspace_symbols- Search top-level symbols (functions, types, enums, traits, methods) across every package
Build / quality
moon_check— static analysis viamoon check --output-json, summarizedmoon_test— run tests (-p,--target, optional--update)moon_fmt_info—moon fmtthenmoon info(handoff sequence)
Caveat
- The extension defaults to run its tools on the wasm-gc target for speed.
- The LLM can override with the supported_target.
- If the LLM fails to do that, the tools may not work.
- If you encounter problems raise an issue
Why these tools - Token efficiency
- Calling dedicated tools that return json instead of streaming to and from bash is more token efficient.
- Keeping in
pispirit with minimal prompting, the package includes a tersely written system prompt describing the tools. - Some QOL improvements, like moon check does not return diagnostic messages from dependencies.
- The error explain tool will placed to save a lot of tokens, where the model only needs to look up the error code necessary instead of running an explain on the entire project.
- Better tool reliability. Higher chances that the model will use the tool for the purpose. Higher chances of the model picking moon ide over grep on the entire codebase. Verify with tool-stats.
Important
- The package injects a system prompt that includes the necessary instructions to use the tool chain
- It is important that your skills and AGENTS.md and other prompt files DO NOT mention moon check, moon ide, moon test etc.. It will only confuse the model. Refer to this project's AGENTS.md for a sample.
- The package blocks running these commands over bash. Giving these instructions will most likely confuse the model.