UI CLI reference
[⏱️ ~4 min] Drive or inspect the agent tooling by hand: init, suggest, find, docs, blueprints, scaffold, and verify
The UI CLI (mdk-ui, package @tetherto/mdk-ui-cli) is the command surface your AI agent uses to build with MDK. You usually never run it yourself, your agent does, after you wire your IDE. This page documents the commands for when you want to drive or inspect the tooling by hand.
Every command runs locally and prints JSON by default. Add --format table for human-readable output. There are no network or model calls: each command is a lookup against files MDK ships.
At a glance
| Bucket | Section | What it covers |
|---|---|---|
| Set up | Set up a project | Wire your IDE with init |
| Discover | Discover what to use | suggest, hooks, stores, find |
| Read | Read a component contract | docs, example |
| Recipes | Follow a recipe | blueprints, blueprint |
| Scaffold | Scaffold and verify | add page, check, sync |
| Inspect | Inspect the UI CLI itself | --json-help |
All commands
| Command | Summary |
|---|---|
init | Bootstrap .mdk/context.md and IDE rules |
suggest | Ranked shortlist from free-text intent |
hooks | List adapter hooks (optional --category) |
stores | List Zustand stores and query helpers |
find | Filter components by domain and capability |
docs | Print a component's USAGE.md |
example | Print a runnable *.example.tsx |
blueprints | List curated intent-to-component recipes |
blueprint | Show one recipe in detail |
add page | Scaffold a page with chosen components |
check | Type-check a file against real APIs |
sync | Refresh .mdk/context.md |
--json-help | Machine-readable CLI surface |
The agent's decision flow
Given an intent, the deterministic path a session follows is:
Set up a project
init
Bootstraps the current project with an agent-context file and an IDE rule so every AI session is wired automatically:
npx @tetherto/mdk-ui-cli init --ide cursor # .mdk/context.md + .cursor/rules/mdk.mdc
npx @tetherto/mdk-ui-cli init --ide claude # .mdk/context.md + CLAUDE.mdDiscover what to use
suggest
Turns free text into a ranked shortlist across components, hooks, blueprints, and stores:
mdk-ui suggest "show hashrate for a pool"hooks
Lists every hook exported from @tetherto/mdk-react-adapter, grouped by category (store, utility, permission, ui, external):
mdk-ui hooks --format table # all adapter hooks
mdk-ui hooks --category store --format table # store-binding hooks onlystores
Describes the Zustand stores and TanStack Query helpers from @tetherto/mdk-ui-core:
mdk-ui stores --format table # stores and query helpers
mdk-ui stores --category devices --format tablefind
Filters the component library by domain and capability:
mdk-ui find --domain mining-operations --capability hashrate-monitoringRead a component contract
docs
Prints a component's usage notes:
mdk-ui docs LineChartCardexample
Prints a runnable example:
mdk-ui example LineChartCardFollow a recipe
Blueprints are curated recipes that map a high-level intent to a concrete set of components and hooks.
blueprints
Lists available recipes:
mdk-ui blueprintsblueprint
Shows one recipe in detail:
mdk-ui blueprint device-managementScaffold and verify
add page
Scaffolds a page with the components you name:
mdk-ui add page Dashboard --component LineChartCardcheck
Confirms a file compiles against the real component APIs:
mdk-ui check src/pages/Dashboard.tsxsync
Keeps the .mdk/context.md agent-context file current as MDK updates:
mdk-ui syncInspect the UI CLI itself
json-help
--json-help prints the full command surface, useful for meta-tooling that wants to discover commands without running them:
mdk-ui --json-helpNext steps
- Build dashboards with your AI agent: the two-step flow most developers use
- UI Kit: the component library these commands draw from
- MDK repositories: source for the UI CLI and the agent-ready contract