/boxel-cli:boxel-apifrom boxel-cli
Use when calling Boxel realm-server APIs from code — primarily federated search across realms. Documents the boxel-cli programmatic surface (`BoxelCLIClient`) and the matching CLI commands. Read this whenever you need to query a realm's index.
Ships in boxel-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Canonical home for Boxel platform API knowledge.
Architectural principle: boxel-cli owns the entire Boxel API surface. Any code that talks to the realm server or Matrix lives in boxel-cli; consumers (the software-factory, custom scripts, hand-written tools) import BoxelCLIClient from @cardstack/boxel-cli/api and call its methods. Auth (tokens, refresh, retries) is fully internal — if you're holding a JWT or calling fetch against a realm URL directly, you're in the wrong layer.
import { BoxelCLIClient } from '@cardstack/boxel-cli/api';
let client = new BoxelCLIClient(); // reads the active Boxel profile
All examples below assume client is a BoxelCLIClient instance.
Search across one or more realms via /_federated-search. Query syntax matches the Boxel realm search format.
boxel search --realm <realm-url> [--realm <realm-url>...] --query '<json>'
--realm is repeatable. --query takes a JSON string. Append --json for raw output.
let result = await client.search(realmUrl, query); // single realm
let result = await client.search([realmA, realmB], query); // federated
Returns { ok, status, data?, error? }. data is an array of card resources.
{
"filter": { ... },
"sort": [ ... ],
"page": { "size": 10 }
}
All top-level fields are optional. An empty query {} returns all cards in the targeted realms.
{
"filter": {
"type": {
"module": "http://localhost:4201/software-factory/darkfactory",
"name": "Project"
}
}
}
Returns all cards that adopt from (or extend) the specified type. Wildcards (*) in module or name are not supported — always use a specific CodeRef.
eq)eq requires an on to scope the field to a card type:
{
"filter": {
"on": { "module": "...", "name": "Issue" },
"eq": { "status": "in_progress" }
}
}
Multiple fields in eq are ANDed. Use dot paths for nested fields (e.g. "author.firstName": "Carl"). Use null to match empty/missing fields.
contains)Case-insensitive substring match:
{ "filter": { "contains": { "cardTitle": "sticky" } } }
Scoped form same as eq (on + contains).
{
"filter": {
"on": { "module": "...", "name": "Post" },
"range": { "views": { "lte": 10, "gt": 5 } }
}
}
Operators: gt, gte, lt, lte. Works on numeric, date, and string fields.
// AND
{ "filter": { "on": {...}, "every": [ {...}, {...} ] } }
// OR
{ "filter": { "any": [ {...}, {...} ] } }
// NOT
{ "filter": { "on": {...}, "not": { "eq": { ... } } } }
{
"sort": [
{ "by": "author.lastName", "on": { "module": "...", "name": "Article" } }
],
"filter": { "type": { "module": "...", "name": "Article" } }
}
Add "direction": "desc" for descending.
{ "filter": {...}, "page": { "size": 10 } }
CodeRef fields (e.g. ref on a Spec card) are matched against the full { module, name }:
{
"filter": {
"on": { "module": "https://cardstack.com/base/spec", "name": "Spec" },
"eq": {
"ref": {
"module": "http://localhost:4201/my-realm/sticky-note",
"name": "StickyNote"
}
}
}
}
on. Fields like title, status, etc. are type-specific. The exceptions are cardTitle and cardDescription — those exist on the base CardDef.author.firstName, not author/firstName.| Goal | Use |
|---|---|
| Find cards in your local synced workspace | Native grep / find — files are already on disk |
| Find cards by type / field across one or more realms | boxel search / client.search |
| Read a single card's source from a realm | client.read(realmUrl, path) / boxel file read |
Read the transpiled (browser) version of a .gts module | client.readTranspiled(...) / boxel read-transpiled |
| List files in a realm | client.listFiles(realmUrl) / boxel file list |
| Push local changes to a realm | client.sync(realmUrl, dir, { preferLocal: true }) / boxel sync |
| Pull a realm's state to a local dir | client.pull(realmUrl, dir) / boxel pull |
| Run a host command (prerendered) | See the boxel-command skill |
.gts field declarations, templates, linksTo vs contains) — that's boxel-development.boxel-file-structure.boxel-sync, boxel-track, boxel-watch)./_run-command) — that's the boxel-command skill.createRealm / boxel realm create) and readiness polling (client.waitForReady / /_readiness-check) — orchestration concerns. The software-factory creates target realms in factory-target-realm.ts before the agent loop starts; consumers needing those APIs should read boxel-cli/src/api.ts directly or run boxel realm create --help.What SKILL.md sets; muted values are Claude Code's defaults
15 skills in this plugin
/boxel-commandUse when running a Boxel host command via the realm server's prerenderer — invoking commands like `get-card-type-schema`, `evaluate-module`, `instantiate-card`, or any other module exposed at `@cardstack/boxel-host/commands/.../default`. Documents `boxel run-command` and the matching `client.runCommand()` method./boxel-designBoxel UI design discovery. Use when designing or redesigning a Boxel app, choosing a visual direction, or pushing past default look-and-feel before generating code./boxel-developmentAuthoring Boxel cards. Use when creating or editing .gts card definitions, .json card instances, or answering questions about CardDef / FieldDef / templates / Boxel patterns. Covers the full .gts authoring surface — imports, fields, formats (isolated/embedded/fitted/atom/edit), styling, and common pitfalls./boxel-file-structureBoxel File Structure RulesFile and directory layout rules for Boxel workspaces. Use when placing .gts definitions or .json instances on disk, choosing module paths in adoptsFrom, or wiring linksTo / linksToMany relationships in JSON. Covers naming conventions, relative module paths, and the linksTo-vs-contains cardinal rule./boxel-ui-guidelinesEnsures boxel-ui components are used in templates and theming guidelines are followed/catalog-listingcatalog-listingOther plugins' skills for the same job
npx claudepluginhub review-bench/cardstack_boxel --plugin boxel-cli