cardstack/boxel/boxel-api
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install cardstack/boxel/boxel-apiSKILL.md
Boxel API
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.
All examples below assume client is a BoxelCLIClient instance.
Federated search
Search across one or more realms via /_federated-search. Query syntax matches the Boxel realm search format.
CLI
--realm is repeatable. --query takes a JSON string. Append --json for raw output.
Programmatic
Returns { ok, status, data?, error? }. data is an array of card resources.
Query syntax
All top-level fields are optional. An empty query {} returns all cards in the targeted realms.
Filter by card type
Returns all cards that adopt from (or extend) the specified type. Wildcards (*) in module or name are not supported — always use a specific CodeRef.
Filter by field value (eq)
eq requires an on to scope the field to a card type:
Multiple fields in eq are ANDed. Use dot paths for nested fields (e.g. "author.firstName": "Carl"). Use null to match empty/missing fields.
Substring search (contains)
Case-insensitive substring match:
Scoped form same as eq (on + contains).
Range filters
Operators: gt, gte, lt, lte. Works on numeric, date, and string fields.
Boolean combinators
Sort
Add "direction": "desc" for descending.
Pagination
CodeRef field matching
CodeRef fields (e.g. ref on a Spec card) are matched against the full { module, name }:
Common mistakes
- Field names without `on`. Fields like
title,status, etc. are type-specific. The exceptions arecardTitleandcardDescription— those exist on the baseCardDef. - Relative or bare module identifiers. Always use absolute module identifiers in CodeRefs: a URL for workspace realms,
@cardstack/<realm>/…for well-known realms. - Slash separators in dotted paths. Use
author.firstName, notauthor/firstName. - Searching relationships that aren't rendered in an embedded/fitted template. The query engine indexes a linked field only if it appears in an embedded format. Otherwise the filter silently misses.
When to use what
| 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 |
What this skill is not for
- Card development patterns (
.gtsfield declarations, templates,linksTovscontains) — that'sboxel. - JSON:API document structure for card instances — that's
boxel-file-structure. - Sync / pull / track / watch CLI ergonomics — those have their own per-command skills (
boxel-sync,boxel-track,boxel-watch). - Host commands via the prerenderer (
/_run-command) — that's theboxel-commandskill. - Realm provisioning (
createRealm/boxel realm create) and readiness polling (client.waitForReady//_readiness-check) — orchestration concerns. The software-factory creates target realms infactory-target-realm.tsbefore the agent loop starts; consumers needing those APIs should readboxel-cli/src/api.tsdirectly or runboxel realm create --help.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/boxel-cli/plugin/skills/boxel-api/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cardstack/boxel/boxel-api)