@xpang/lmx
v0.3.0
Published
LLM executables powered by Pi
Readme
lmx
LLM executables: Unix-style commands powered by Pi.
lmx lets you package prompts as normal command-line programs. The package also ships three built-ins: summarize, classify, and judge.
Install
npm install -g @xpang/lmx
lmx --helpRequirements:
- Node.js and npm
- Pi auth already configured on the machine
- Bash, including on Windows via Git Bash / Git for Windows
Quick Start
summarize "LMX turns prompts into normal command-line tools."
summarize < README.md
summarize @README.mdecho "The payment page crashes after submit" | classify --labels "bug,feature,question"summarize < README.md | judge "contains all the built-ins"
summarize < README.md | judge "contains npm install instructions"Built-ins default to openai-codex/gpt-5.5. Override the model when needed:
summarize --model openai-codex/gpt-5.5 "Summarize this."Built-In Commands
summarize
Summarize text from an argument or stdin.
summarize "Long text..."
summarize @article.txt
echo "Long text..." | summarize --instructions "one sentence"classify
Classify text into one of the labels you provide.
classify --labels "bug,feature,question" "Add dark mode"judge
Evaluate a candidate against a rubric. Output is MET or UNMET.
judge "The candidate must be concise." "Short and accurate."
echo "Short and accurate." | judge "The candidate must be concise."
summarize < README.md | judge "The summary must mention installation."CLI
lmx create <name>
lmx build <name|path>
lmx bench <name> [--model provider/id]
lmx bench --all [--model provider/id]
lmx run <program-dir> [args...]
lmx listMost users call installed programs directly, such as summarize, instead of calling lmx run.
String inputs and program parameters can use @file.txt to read UTF-8 text from a file relative to the current directory. Use @@file.txt when you need a literal leading @.
What Is an LMX Program?
An LMX program is a folder with a prompt and config:
my-tool/
LMX.md
config.yaml
bench/LMX.md contains the program instructions. config.yaml defines metadata, parameters, tools, and the default model. lmx build validates the program and generates npm-ready entrypoints.
Local Development
Clone the repo:
git clone https://github.com/xpang185/lmx.git
cd lmxInstall and build:
npm install
npm run buildRun the CLI from source:
npm run dev -- --help
npm run dev -- run built-ins/summarize "Text to summarize"Link the package locally:
npm link
lmx --help
summarize --helpOn Windows, lmx.cmd is available at the repo root after checkout, so lmx ... works from cmd.exe while your current directory is the repo root.
Validation
npm run check
npm run buildIf command behavior changes, also test the affected command manually.
Releases
Normal commits land on main. Release Please keeps a release PR open with the next npm version and changelog.
When you are ready to publish, merge the release PR. The GitHub release workflow then creates the tag/release and runs npm publish.
