MDK Logo

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

BucketSectionWhat it covers
Set upSet up a projectWire your IDE with init
DiscoverDiscover what to usesuggest, hooks, stores, find
ReadRead a component contractdocs, example
RecipesFollow a recipeblueprints, blueprint
ScaffoldScaffold and verifyadd page, check, sync
InspectInspect the UI CLI itself--json-help

All commands

CommandSummary
initBootstrap .mdk/context.md and IDE rules
suggestRanked shortlist from free-text intent
hooksList adapter hooks (optional --category)
storesList Zustand stores and query helpers
findFilter components by domain and capability
docsPrint a component's USAGE.md
examplePrint a runnable *.example.tsx
blueprintsList curated intent-to-component recipes
blueprintShow one recipe in detail
add pageScaffold a page with chosen components
checkType-check a file against real APIs
syncRefresh .mdk/context.md
--json-helpMachine-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.md

Discover 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 only

stores

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 table

find

Filters the component library by domain and capability:

mdk-ui find --domain mining-operations --capability hashrate-monitoring

Read a component contract

docs

Prints a component's usage notes:

mdk-ui docs LineChartCard

example

Prints a runnable example:

mdk-ui example LineChartCard

Follow 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 blueprints

blueprint

Shows one recipe in detail:

mdk-ui blueprint device-management

Scaffold and verify

add page

Scaffolds a page with the components you name:

mdk-ui add page Dashboard --component LineChartCard

check

Confirms a file compiles against the real component APIs:

mdk-ui check src/pages/Dashboard.tsx

sync

Keeps the .mdk/context.md agent-context file current as MDK updates:

mdk-ui sync

Inspect 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-help

Next steps

On this page