CLI
npm install -g instruction-mdOffline, no account needed
| Command | What it does |
|---|---|
instruction validate <file> | refuse or accept, with the specification's own messages; exit 1 on refusal |
instruction deliver <file> name=value | the exact bytes a model receives, for a context |
instruction fmt <file> --write | conservative formatting; never touches machinery bodies |
instruction digest <file> | the authored digest, excluding the signature line |
instruction render <file> --full | HTML for a static site |
instruction test <dir> | run a fixtures directory, for your own conformance suite |
Against the registry
| Command | What it does |
|---|---|
instruction login | device-flow sign-in; the token is stored in your config directory |
instruction list, get, pull | find and fetch |
instruction push <file> --publish | create or update a draft, and publish it |
instruction publish <id> --tag v2 --refs latest,stable | publish the current draft and move refs |
instruction refs <id> set stable <ver> | move a ref, which is how you roll back |
instruction diff <id> <from> <to> | unified and block-level diff |
instruction watch <uri> --out FILE | follow a ref, keeping the last good version |
instruction audit export <id> --format csv | the audit trail, never content |
instruction revoke <id> <ver> | withdraw a version; consumers hold |
In CI
Set INSTRUCTION_MD_TOKEN for a non-interactive token and use --json for machine-readable output. Exit codes: 1 error, 3 transport, 4 not found, 5 forbidden, 6 nothing applied.
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 22 }
- run: npm i -g instruction-md
- run: instruction validate RUNBOOK.md
- run: instruction push RUNBOOK.md --to ${{ vars.INSTRUCTION_ID }} --publish --message "${{ github.sha }}" --json
env:
INSTRUCTION_MD_URL: https://mcp.instruction.md/mcp
INSTRUCTION_MD_TOKEN: ${{ secrets.INSTRUCTION_MD_TOKEN }}Add --sign-with key.json to publish with your own key rather than the platform's. See signing and trust.