grimoire
Original:🇺🇸 English
Translated
Core Grimoire CLI for compiling, validating, simulating, and executing .spell files. Use when you need to run any grimoire command.
3installs
Sourcefranalgaba/grimoire
Added on
NPX Install
npx skill4agent add franalgaba/grimoire grimoireTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Grimoire CLI Skill
The Grimoire CLI compiles, validates, simulates, and executes strategy files.
.spellWhen to use
- You want deterministic execution with adapters (,
simulate).cast - You need CLI-only workflows (compile, validate, history, logs, wallet).
VM vs deterministic
- VM mode runs inside an agent session and is best-effort. Use the skill for in-agent execution.
grimoire-vm - Deterministic runtime runs via the CLI. This skill covers that runtime.
For VM prototyping with snapshots, use the venue skills (, , , ) with .
grimoire-aavegrimoire-uniswapgrimoire-morpho-bluegrimoire-hyperliquid--format spellCommands
grimoire init
Initialize a new directory with config and examples.
.grimoirebash
grimoire init [--force] [--vm]Use to scaffold a VM quickstart spell and README.
--vmgrimoire compile
Compile a file to IR (intermediate representation).
.spellbash
grimoire compile <spell> [-o <file>] [--pretty]grimoire compile-all
Compile every file in a directory (default: ).
.spellspells/bash
grimoire compile-all [dir] [--fail-fast] [--json]grimoire validate
Validate a file without compiling.
.spellbash
grimoire validate <spell> [--strict]grimoire simulate
Simulate spell execution (dry run). State is loaded/saved between runs.
bash
grimoire simulate <spell> [-p <json>] [--vault <address>] [--chain <id>] [--state-dir <dir>] [--no-state]
[--advisor-skills-dir <dir>...]
[--advisory-pi] [--advisory-replay <runId>] [--advisory-provider <name>] [--advisory-model <id>]
[--advisory-thinking <level>] [--advisory-tools <mode>] [--pi-agent-dir <dir>]grimoire cast
Execute a spell onchain. Supports dry-run and live modes.
bash
grimoire cast <spell> [-p <json>] [--vault <address>] [--chain <id>] \
[--dry-run] [--key-env <name>] [--keystore <path>] [--password-env <name>] \
[--rpc-url <url>] [--gas-multiplier <n>] [--skip-confirm] [-v] [--json] \
[--advisor-skills-dir <dir>...] [--state-dir <dir>] [--no-state] \
[--advisory-pi] [--advisory-replay <runId>] [--advisory-provider <name>] [--advisory-model <id>] \
[--advisory-thinking <level>] [--advisory-tools <mode>] [--pi-agent-dir <dir>]grimoire venues
List available venue adapters and supported chains.
bash
grimoire venues [--json]grimoire venue
Proxy to venue metadata CLIs bundled in .
@grimoirelabs/venuesbash
grimoire venue <adapter> [args...]grimoire history
View execution history for spells.
bash
grimoire history # list all spells with state
grimoire history <spellId> # runs for a specific spell
grimoire history <spellId> --limit 5 --jsongrimoire log
View ledger events for a specific spell run.
bash
grimoire log <spellId> <runId> [--json] [--state-dir <dir>]grimoire wallet
Manage wallet operations.
bash
grimoire wallet generate # create new keystore
grimoire wallet address --keystore <path> --password-env <name>
grimoire wallet balance --keystore <path> --password-env <name> --chain <id> --rpc-url <url>
grimoire wallet import --private-key <hex>
grimoire wallet wrap --amount <n> --chain <id> --keystore <path> --password-env <name>
grimoire wallet unwrap --amount <n> --chain <id> --keystore <path> --password-env <name>Running Locally
All CLI commands can be invoked via:
bash
bun run packages/cli/src/index.ts <command> [args]Environment Variables
- - Wallet private key (default for
PRIVATE_KEY)--key-env - - Keystore password (default for
KEYSTORE_PASSWORD)--password-env - - JSON-RPC endpoint (fallback for
RPC_URL)--rpc-url
State Persistence
Simulate and cast automatically load/save spell state to (SQLite). Use to disable or to change the directory.
.grimoire/grimoire.db--no-state--state-dirAdvisor Skills
Use with or to resolve advisor skills from directories containing files. The runtime emits / metadata in advisory events for external orchestrators.
--advisor-skills-dir <dir>simulatecastSKILL.mdskillsallowedToolsAdvisory (Pi OAuth)
Advisory steps ( and ) call Pi when a model is configured (spell model, CLI model/provider, or Pi defaults). If no model is available, the runtime uses the spell fallback. Use to force Pi even if no model is configured.
**...**advise--advisory-piOAuth (OpenAI Codex) setup:
bash
pi
/login
# select OpenAI CodexIf the CLI is not installed globally, you can run instead. Credentials live under unless you pass .
pinpx @mariozechner/pi-coding-agent~/.pi/agent--pi-agent-dirExample:
bash
grimoire simulate spells/my-spell.spell \
--advisory-pi \
--advisory-provider openai-codex \
--advisory-model gpt-5.2 \
--advisory-tools noneRecord → replay (deterministic advisory outputs):
bash
grimoire simulate spells/my-spell.spell --advisory-pi
grimoire simulate spells/my-spell.spell --advisory-replay <runId>