Grim Usage
Grimoire (binary: grim) is a package manager for AI-agent configuration.
It distributes five artifact kinds — skills, rules, agents,
MCP servers, and bundles — through any standard OCI registry (GHCR,
Docker Hub, a private Distribution), with lockfile-pinned installs into a
growing fleet of AI clients plus a vendor-neutral agents target. The
current names are listed in
references/registries.md; the
set grows every minor release, so read it there rather than assuming. An
MCP server artifact installs by registering an entry in each client's
native MCP config file (never as a file of its own); uninstall removes
only that entry, never the file.
Not every client can host every kind: a skill is the one kind every
client hosts, but a rule needs a per-file scoping surface, an agent needs a
shipped file format, and an MCP server needs a config file grim can splice —
and many clients lack one or more of those. Where a client cannot faithfully
host a kind, grim warns and skips it, writing zero files. Most of the fleet
declines rules and agents, and the skills-only clients write no MCP config
at all. The authoritative per-client support matrix is the Client
Compatibility docs page — trust it over this summary, and check it
rather than assuming.
Two consequences of that shape are worth knowing before your first
install. When nothing is detected, grim targets the generic agents
client — one copy into the shared .agents/skills pool — rather than
writing a directory for every client it knows about; a lock holding only
rules, agents, or MCP servers then has nowhere to go and exits 78. And
a client that reads that shared pool can be moved into it deliberately with
options.vendors.<name>.shared_skills. Both in
references/registries.md.
Verify Before Acting
Before composing any non-trivial grim command:
- Run
grim --version. This guide tracks the release it ships beside; on
a different minor, treat every flag mentioned here as a hypothesis.
- Run
grim <command> --help before using flags you have not verified
this session — it is the authoritative, always-current flag list.
- On any conflict between this skill and live
--help output, trust
--help. It ships with the binary; this guide can lag.
These pages teach workflows and semantics, never exhaustive flags. The
full reference is --help plus the docs site linked below.
Command Map
| Command |
Purpose |
Details |
grim init |
Create a fresh grimoire.toml |
consume |
grim config |
Read/write grimoire.toml settings and registries |
registries |
grim add |
Declare an artifact and pin it in the lock |
consume |
grim lock |
Resolve floating tags to digests |
consume |
grim install |
Materialize the lock into AI clients |
consume |
grim update |
Re-resolve, re-materialize, prune |
consume |
grim status |
Report each declared artifact's state |
consume |
grim context |
Report the resolved scope, paths, clients, registries |
consume |
grim fetch |
Print an artifact's content without installing |
consume |
grim describe |
Report an artifact's metadata (kind, annotations, tags) without downloading content |
consume |
grim remove / uninstall |
Undeclare vs full inverse of install |
consume |
grim search / tui |
Browse your declared registries' catalogs |
registries |
grim rate |
Vote on an artifact through the index's rating forge |
registries |
grim mcp |
Run a local STDIO MCP server for AI agent integration |
registries |
grim build |
Validate and pack locally, no push |
publish |
grim release |
Validate, pack, push with cascade tags |
publish |
grim publish |
Batch-release packages from a publish.toml manifest |
publish |
grim login / logout |
Manage registry credentials |
publish |
grim schema |
Emit the JSON Schema for grimoire.toml / publish.toml / grimoire.lock / the MCP descriptor |
publish |
grim completions <shell> |
Print a shell completion script (bash, elvish, fish, powershell, zsh) to stdout; redirect it into your shell's completion dir |
grim completions --help |
Deprecation: a publisher can retire a package without
unpublishing it; add and status flag it as deprecated (an add of a
deprecated reference still succeeds). search and tui hide
deprecated artifacts by default unless they are installed — reveal them
with grim search --show-deprecated, the TUI h key, or by setting
options.show_deprecated = true (grim config set options.show_deprecated true). A replaced-by successor reference, when the publisher named
one, surfaces in grim search / grim describe. See Publishing.
Build provenance: build, release, and publish embed the
publishing commit and its date as OCI annotations by default (never a
wall-clock time, so re-release stays idempotent). --git additionally
requires them and discloses the origin remote and commit author;
--no-git suppresses every derived annotation. Confirm with
grim release --help.
Global flags apply to every subcommand — --format, --global,
--config, --registry, --offline, --log-level, and --color <auto|always|never> (default auto colorizes clap's help/error output
and --format json only when stdout is a terminal; --color always
colorizes unconditionally, so never pass it into a pipeline that parses
the document. The JSON error document is never colorized in any mode).
Confirm the set with grim --help.
Reference Syntax
An artifact is named registry/repository:tag (a floating tag — :1
follows the newest 1.x release) or registry/repository@sha256:… (an
immutable digest). A bare reference defaults to :latest.
A third form skips the registry: a local path — ./skills/x,
../shared/rule.md, or an absolute path — names a directory or file on
disk directly. The discriminant is used everywhere a reference is accepted
(grim add, grim install, a [skills]/[rules]/[agents]/[mcp]/[bundles]
value): a value starting with ./ or ../, or an absolute path, is a
local path source; anything else is an OCI reference. See
references/consume.md for how it is
declared and installed.
A short reference with no registry resolves against the default registry —
--registry flag, then GRIM_DEFAULT_REGISTRY, then config, then the
built-in fallback registry ghcr.io/grimoire-rs; full
precedence in references/registries.md. Browsing
with nothing configured (grim search, grim tui, grim mcp) falls back
to the public package index at https://index.grimoire.rs instead — see
references/registries.md.
When a config declares [[registries]] with aliases, a qualified
reference alias/repo[:tag] expands the alias to its configured URL —
for example acme/code-review:1 becomes ghcr.io/acme/code-review:1
when acme is aliased to ghcr.io/acme. This only works for an
oci-type alias. An index-type alias fails with exit 65. Full details
and the multi-registry browse behavior in
references/registries.md.
Routing Table
| Read... |
...when |
| references/consume.md |
Installing, updating, or removing artifacts in a project |
| references/publish.md |
Building, releasing, tagging, or logging in to publish |
| references/registries.md |
Resolving registries, scopes, client targets, offline mode, searching, or rating |
| references/troubleshooting.md |
A grim command failed — exit codes, integrity gates, common causes |
| references/updating.md |
Maintaining this skill itself against newer grim releases |
Further Reading
Verified against the grim release this package ships beside.
1---2name: grim-usage3description: Drive the grim CLI — the OCI package manager for AI skills, rules, agents, and bundles. Use when installing, updating, searching, rating, or publishing AI-config artifacts with grim; when composing grim init, config, add, lock, install, update, status, context, fetch, describe, search, rate, tui, mcp, build, release, publish, login, logout, or completions commands; when configuring settings, multiple registries, or qualified alias/repo references; or when resolving registries, project vs global scope, client targets, or offline mode.4license: Apache-2.05---67# Grim Usage89Grimoire (binary: `grim`) is a package manager for AI-agent configuration.10It distributes five artifact kinds — **skills**, **rules**, **agents**,11**MCP servers**, and **bundles** — through any standard OCI registry (GHCR,12Docker Hub, a private Distribution), with lockfile-pinned installs into a13growing fleet of AI clients plus a vendor-neutral `agents` target. The14current names are listed in15[references/registries.md](references/registries.md#client-targets); the16set grows every minor release, so read it there rather than assuming. An17MCP server artifact installs by registering an entry in each client's18native MCP config file (never as a file of its own); uninstall removes19only that entry, never the file.2021Not every client can host every kind: a **skill** is the one kind every22client hosts, but a rule needs a per-file scoping surface, an agent needs a23shipped file format, and an MCP server needs a config file grim can splice —24and many clients lack one or more of those. Where a client cannot faithfully25host a kind, grim warns and skips it, writing zero files. Most of the fleet26declines rules and agents, and the skills-only clients write no MCP config27at all. The authoritative per-client support matrix is the [Client28Compatibility][clients] docs page — trust it over this summary, and check it29rather than assuming.3031Two consequences of that shape are worth knowing before your first32install. When **nothing** is detected, grim targets the generic `agents`33client — one copy into the shared `.agents/skills` pool — rather than34writing a directory for every client it knows about; a lock holding only35rules, agents, or MCP servers then has nowhere to go and exits **78**. And36a client that reads that shared pool can be moved into it deliberately with37`options.vendors.<name>.shared_skills`. Both in38[references/registries.md](references/registries.md#client-targets).3940## Verify Before Acting4142Before composing any non-trivial grim command:43441. Run `grim --version`. This guide tracks the release it ships beside; on45 a different minor, treat every flag mentioned here as a hypothesis.462. Run `grim <command> --help` before using flags you have not verified47 this session — it is the authoritative, always-current flag list.483. On any conflict between this skill and live `--help` output, **trust49 `--help`**. It ships with the binary; this guide can lag.5051These pages teach workflows and semantics, never exhaustive flags. The52full reference is `--help` plus the docs site linked below.5354## Command Map5556| Command | Purpose | Details |57|---|---|---|58| `grim init` | Create a fresh `grimoire.toml` | [consume](references/consume.md) |59| `grim config` | Read/write `grimoire.toml` settings and registries | [registries](references/registries.md) |60| `grim add` | Declare an artifact and pin it in the lock | [consume](references/consume.md) |61| `grim lock` | Resolve floating tags to digests | [consume](references/consume.md) |62| `grim install` | Materialize the lock into AI clients | [consume](references/consume.md) |63| `grim update` | Re-resolve, re-materialize, prune | [consume](references/consume.md) |64| `grim status` | Report each declared artifact's state | [consume](references/consume.md) |65| `grim context` | Report the resolved scope, paths, clients, registries | [consume](references/consume.md) |66| `grim fetch` | Print an artifact's content without installing | [consume](references/consume.md) |67| `grim describe` | Report an artifact's metadata (kind, annotations, tags) without downloading content | [consume](references/consume.md) |68| `grim remove` / `uninstall` | Undeclare vs full inverse of install | [consume](references/consume.md) |69| `grim search` / `tui` | Browse your declared registries' catalogs | [registries](references/registries.md) |70| `grim rate` | Vote on an artifact through the index's rating forge | [registries](references/registries.md) |71| `grim mcp` | Run a local STDIO MCP server for AI agent integration | [registries](references/registries.md) |72| `grim build` | Validate and pack locally, no push | [publish](references/publish.md) |73| `grim release` | Validate, pack, push with cascade tags | [publish](references/publish.md) |74| `grim publish` | Batch-release packages from a `publish.toml` manifest | [publish](references/publish.md) |75| `grim login` / `logout` | Manage registry credentials | [publish](references/publish.md) |76| `grim schema` | Emit the JSON Schema for `grimoire.toml` / `publish.toml` / `grimoire.lock` / the MCP descriptor | [publish](references/publish.md) |77| `grim completions <shell>` | Print a shell completion script (bash, elvish, fish, powershell, zsh) to stdout; redirect it into your shell's completion dir | `grim completions --help` |7879> **Deprecation:** a publisher can retire a package without80> unpublishing it; `add` and `status` flag it as deprecated (an `add` of a81> deprecated reference still succeeds). `search` and `tui` **hide**82> deprecated artifacts by default unless they are installed — reveal them83> with `grim search --show-deprecated`, the TUI `h` key, or by setting84> `options.show_deprecated = true` (`grim config set options.show_deprecated85> true`). A `replaced-by` successor reference, when the publisher named86> one, surfaces in `grim search` / `grim describe`. See [Publishing][publishing].87>88> **Build provenance:** `build`, `release`, and `publish` embed the89> publishing commit and its date as OCI annotations **by default** (never a90> wall-clock time, so re-release stays idempotent). `--git` additionally91> requires them and discloses the `origin` remote and commit author;92> `--no-git` suppresses every derived annotation. Confirm with93> `grim release --help`.94>95> **Global flags** apply to every subcommand — `--format`, `--global`,96> `--config`, `--registry`, `--offline`, `--log-level`, and `--color97> <auto|always|never>` (default `auto` colorizes clap's help/error output98> and `--format json` only when stdout is a terminal; `--color always`99> colorizes unconditionally, so never pass it into a pipeline that parses100> the document. The JSON error document is never colorized in any mode).101> Confirm the set with `grim --help`.102103## Reference Syntax104105An artifact is named `registry/repository:tag` (a floating tag — `:1`106follows the newest `1.x` release) or `registry/repository@sha256:…` (an107immutable digest). A bare reference defaults to `:latest`.108109A third form skips the registry: a **local path** — `./skills/x`,110`../shared/rule.md`, or an absolute path — names a directory or file on111disk directly. The discriminant is used everywhere a reference is accepted112(`grim add`, `grim install`, a `[skills]`/`[rules]`/`[agents]`/`[mcp]`/`[bundles]`113value): a value starting with `./` or `../`, or an absolute path, is a114local path source; anything else is an OCI reference. See115[references/consume.md](references/consume.md#declaring) for how it is116declared and installed.117118A short reference with no registry resolves against the default registry —119`--registry` flag, then `GRIM_DEFAULT_REGISTRY`, then config, then the120built-in fallback registry `ghcr.io/grimoire-rs`; full121precedence in [references/registries.md](references/registries.md). Browsing122with nothing configured (`grim search`, `grim tui`, `grim mcp`) falls back123to the public package index at `https://index.grimoire.rs` instead — see124[references/registries.md](references/registries.md#multiple-registries).125126When a config declares `[[registries]]` with aliases, a **qualified127reference** `alias/repo[:tag]` expands the alias to its configured URL —128for example `acme/code-review:1` becomes `ghcr.io/acme/code-review:1`129when `acme` is aliased to `ghcr.io/acme`. This only works for an130`oci`-type alias. An index-type alias fails with exit 65. Full details131and the multi-registry browse behavior in132[references/registries.md](references/registries.md#qualified-references).133134## Routing Table135136| Read... | ...when |137|---|---|138| [references/consume.md](references/consume.md) | Installing, updating, or removing artifacts in a project |139| [references/publish.md](references/publish.md) | Building, releasing, tagging, or logging in to publish |140| [references/registries.md](references/registries.md) | Resolving registries, scopes, client targets, offline mode, searching, or rating |141| [references/troubleshooting.md](references/troubleshooting.md) | A grim command failed — exit codes, integrity gates, common causes |142| [references/updating.md](references/updating.md) | Maintaining this skill itself against newer grim releases |143144## Further Reading145146- [Command reference][commands] — every command with current flags.147- [Concepts][concepts] — kinds, references, the lock, bundles, scopes,148 clients.149- [Configuration][config] — `grimoire.toml`, `grimoire.lock`, environment150 variables.151- [Publishing][publishing] — the author-to-release workflow.152- [Authentication][auth] — credential store, login/logout, CI recipes.153154[commands]: https://grimoire.rs/commands.html155[concepts]: https://grimoire.rs/concepts.html156[config]: https://grimoire.rs/configuration.html157[publishing]: https://grimoire.rs/publishing.html158[auth]: https://grimoire.rs/authentication.html159[clients]: https://grimoire.rs/clients.html160161---162163Verified against the grim release this package ships beside.