Dialtone CLI

Search Dialtone APIs and documentation from the command line.

The Dialtone CLI searches components, design tokens, CSS utility classes, icons, and documentation from your terminal. Run it from your project to use available installed package data. Missing data falls back to the CLI's bundled data; documentation always uses bundled content. Check the source line to see which data each lookup uses.

Use the CLI for direct lookups, shell scripts, and compact context for coding agents. Use the Dialtone MCP Server when you want an AI assistant to search Dialtone through Model Context Protocol (MCP) tools.

Installation

For a repeatable project-local installation, run these commands in the application directory:

npm install --save-dev --save-exact @dialpad/dialtone-cli
npm exec --no -- dialtone --help

Commit the dependency manifest and lockfile. Use npm exec --no -- dialtone ... from that directory for the examples below. The runner can find hoisted workspace bins and declines a requested installation, but may still use an ancestor node_modules/.bin, npm's global bin or a cached package. Check npm ls @dialpad/dialtone-cli and the selected command/version. A package prefix selects an executable location; it does not make the CLI inspect that application's data from another working directory.

A global installation is optional:

npm install -g @dialpad/dialtone-cli
dialtone --help

The remaining examples use the shorter dialtone form and require a global installation. For a project-local install, replace bare dialtone with npm exec --no -- dialtone. A coding assistant's shell needs the same executable resolution and permission to run it; installing the package does not load assistant instructions.

For assistant use, add the use-dialtone skill to your project. The skill covers CLI-only access and unavailable-tool behavior. Preserve existing project guidance and permissions.

Run CLI commands from your project. The CLI prints one line on stderr naming the Dialtone data it uses:

Using local Dialtone data: @dialpad/dialtone@10.4.0 (icons: @dialpad/dialtone-icons@5.2.0, docs: bundled)

Without local Dialtone data, the line reads Using bundled Dialtone data (@dialpad/dialtone-cli@<version>).

Keeping lookup data current

Changes to the component, utility, token, icon and documentation sources bundled by the CLI are eligible for a CLI release through the normal release process. A source change or documentation-site deployment does not immediately update an installed CLI.

Update @dialpad/dialtone-cli in the same location where you installed it to receive newer bundled data. Documentation always comes from that bundle. When a lookup uses your project's installed Dialtone packages, their versions still determine the available API; updating the CLI does not update those packages. Check the reported source and version before using an answer.

Quick start

Search across Dialtone when you do not know which command to use:

dialtone search "button"

Then narrow the lookup to the relevant part of the system:

dialtone component button --props --describe
dialtone token "color foreground primary"
dialtone utility "padding 8px"
dialtone docs "how to choose button importance"

Add --format json when a script or coding agent needs structured output:

dialtone component button --format json

Commands

Command Use it to
dialtone search <query> Search components, documentation, tokens, utility classes, and icons.
dialtone component <name> Read props, events, slots, and qualified import hints.
dialtone token [query] Find design tokens by query or --name and inspect theme values.
dialtone utility <query> Find CSS utility classes by property or value.
dialtone docs <query> Search usage guidance, recipes, accessibility guidance, and patterns.
dialtone docs --id <id> Retrieve complete selected source examples and setup.
dialtone prompt <name> Generate compact component context for a coding agent.

Run dialtone <command> --help to see every option for a command.

Search across Dialtone

Use search for broad discovery. Results are grouped across all available Dialtone data, including icons and documentation.

dialtone search "button"
dialtone search "padding 8px"
dialtone search "notification"

Component and documentation discovery reuse curated page keywords. Try familiar interaction terms, then inspect a returned canonical component:

dialtone search "spinner"
dialtone search "add a loader to the settings page"
dialtone docs "text-field"
dialtone component DtLoader

spinner leads with DtLoader; blank slate finds DtEmptyState; text field, text-field, and textbox find DtInput; autocomplete and typeahead find the supported Combobox candidates. notification presents DtBanner, DtNotice, and DtToast as distinct choices. Canonical component name and family matches keep their existing priority. Longer requests recognize complete keyword phrases and public names, including regular plurals. Complete name, keyword and API-text matches lead before partial contextual candidates; separate keywords do not combine into a complete phrase. Text notes identify the matched keywords or names. Unrecognized context is not a supported feature claim. Documentation preserves named subjects and selects sections using their source evidence; keywords help discover pages.

In broad CLI search, matching token or utility facts appear before partial component hints. All candidates remain available with --limit 0.

Keywords are discovery terms. dialtone component spinner still exits with no selected component; component switch rejects the name and suggests DtToggle. Use the canonical result for API lookup.

Separate terms with | to search for any of them:

dialtone search "input|select|menu"

The CLI returns 20 results by default. Set a different limit, or use --limit 0 to return all matches:

dialtone search "button" --limit 5
dialtone search "button" --limit 0

The CLI does not have a separate icon command. Search by an icon's name, category, or keyword instead:

dialtone search "calendar" --format json

Broad searches share the 20-result limit across all result types. Include later icon matches with --limit 0; icon records in JSON have type: "icon":

dialtone search "notification" --limit 0 --format json

Inspect a component

Use component to inspect a component's public API. The name must match exactly, ignoring case, separators, and the Dt prefix, so button, dt-button, and DtButton all work. Other names exit with an error, listing close matches when available. A deprecated component still works by its full name, with a note naming its replacement.

Directive identifiers such as v-dt-tooltip or DtTooltipDirective are not component names and return no component match. Use docs for their imports, registration and behavior.

dialtone component button
dialtone component DtModal

Filter the output when you only need one part of the API:

dialtone component button --props
dialtone component button --props --describe
dialtone component button --prop kind
dialtone component button --events
dialtone component button --slots
dialtone component button --examples

--prop returns the prop type, description, and accepted values. If the prop does not exist, the CLI lists the available prop names.

--examples currently returns an import hint when a public export route is verified, followed by a minimal component tag. It does not supply a complete working example with required props, slots, state, or application setup. Where selected source examples are available, readable output also lists their IDs and fetch commands. With --format json, it returns component metadata rather than example code.

Find a design token

Use token to search by a token name, category, semantic purpose, or value:

dialtone token "color foreground primary"
dialtone token "spacing 400"

Use --name for a canonical CSS token identifier that begins with --. It takes precedence when both a name and a positional query are supplied:

dialtone token --name=--dt-spacing-100 --values

An exact legacy name remains available for migration inspection. The CLI reports the deprecation on stderr in every format, with the replacement for each context it applies to (spacing, layout, border, radius, or any use), so the token list and JSON output on stdout stay unchanged:

dialtone token --name=--dt-size-300
Note: --dt-size-300 is deprecated. Deprecated in Dialtone 10. The replacement depends on how the token is used.
Replacement by context (migration: size-to-layout):
  spacing → --dt-spacing-50
  layout → no token: no layout token at 4px
  border → --dt-size-border-300
  radius → --dt-size-radius-300
Guide: https://dialtone.dialpad.com/guides/migration/layout-and-spacing-tokens/

≈ marks a replacement that changes the value, with the change in parentheses. "manual" marks one the migration doesn't make for you, and "no token" a context with no replacement. Data installed from an older Dialtone has no per-context entries, so the note lists its flat alternatives instead.

Add --values to print the same advice on stdout with the theme values. Add --values --format json to include the metadata, with the per-context entries under metadata.replacementsByContext:

dialtone token --name=--dt-size-300 --values --format json

Use --values to show theme values for the first match:

dialtone token "color foreground primary" --values

HSL decomposition tokens are excluded by default. Include them with --all:

dialtone token "color foreground" --all

Find a utility class

Use utility to search by a CSS property, value, or both:

dialtone utility "padding 8px"
dialtone utility "display flex"
dialtone utility "margin auto"

Search results include the class name and its CSS declaration. General searches filter deprecated utilities; exact legacy names retain their contract and migration metadata in JSON output.

Search documentation

Use docs for questions about how or why to use Dialtone. It searches public guidance, component usage, accessibility guidance, and migration documentation.

dialtone docs "how to choose button importance"
dialtone docs "accessible tooltip labels"
dialtone docs "migrate physical properties to logical properties"
dialtone docs "v-dt-tooltip"

Documentation is bundled with the CLI rather than resolved from your project's installed Dialtone packages. Update the CLI to refresh this content.

Readable results from dialtone docs contain excerpts. dialtone docs "v-dt-tooltip" --format json returns the complete available documentation records, which can include directive code snippets. A complete record can still omit component examples or page-level scripts; neither format establishes that a snippet runs in your application.

Retrieve a selected example

dialtone docs --id examples/button-default
dialtone docs --id examples/button-disabled-tooltip --format json

Find related guidance without guessing section IDs:

dialtone docs --id examples/toggle-base-styles --context

This lists source/page sections, authored API subjects, explicit directives/utilities and documentation links. Follow the commands you need. Context uses --limit 1–50 (default 20) and --offset (default 0); follow its continuation. --context --format json returns a retrieval envelope; ordinary exact/search JSON remains an array. References do not establish installed compatibility, and page links describe the latest documentation.

Vue-app exact-ID output contains all five source-derived application files, dependency pins, imports, styling/theme setup and any directive registration. Static-HTML records contain the authored HTML fragment and CSS/theme prerequisites, without a Vue application scaffold. Follow the setup instructions in that record. JSON retains the documentation command's array shape. Unknown example IDs fail with a no-match diagnostic and a bounded list of available IDs.

Ready component-page live Vue examples are included automatically when public imports, supported source state and source API checks are complete. Their IDs use examples/docs/<doc-path>/<section>, where <doc-path> is the page path under docs/ without its extension, for example examples/docs/components/button/variants-critical. Source-authored keys append a final segment where needed. Existing Button, Loader, Toggle and Word Wrap IDs remain available. A source edit updates the fixture; a heading rename or removal retires its derived ID. Source delivery does not prove that the pinned packages support the fixture. Unverified records qualify their setup instructions; read the validation status before using them.

Included local state supports literal Boolean, string, null and string-array refs, including empty arrays. Computed values, application handlers, calls and object setup remain unresolved. This support adds 12 SegmentedControl source examples and one dynamic-mode ModeIsland example to lookup; their delivery does not establish consumer or accessibility qualification.

The controlled FilterPill hero, single-selection and multiple-selection starters and the six controlled Combinator presets use options/selected, which require @dialpad/dialtone 10.12.0 or later. The unavailable-choices-and-groups starter and its controlled unavailable choices preset also use the option disabled, description and group fields, which require 10.14.0 or later. Two controlled FilterPill sections keep owned lookup exclusions because they exceed bounded setup: Labels and counts needs application handlers, reactive options and computed counts; Closing before removal needs named handlers and component refs. Live documentation and Storybook demos remain available, as do the 11 legacy FilterPill source-example IDs and the original examples/presets/DtFilterPill/default record.

Vue applications pin the exact @dialpad/dialtone and @dialpad/dialtone-icons versions released with the tool, plus Vue 3.5.18. Before publication, each release builds every delivered example against those exact packages; other installations remain unverified. Source package/version, section and hash remain separate. Delivered-file or runtime/tooling tuple changes invalidate affected validation until rechecked; whole-page hashes identify source provenance.

Use dialtone docs "button with a tooltip" to discover the source section and available example IDs. Discovery shows at most three IDs and the total; exact source-section retrieval lists all its examples. Complete example records stay out of ordinary search rankings. Source-derived Vue records describe setup, whether local state is included and manual-review status. Read the source page's guidance for adoption responsibilities. Consumers must prevent disabled actions in their handlers and verify interaction/accessibility in their own application; a successful build establishes compilation only. The Toggle v-model example retains its authored local state; application actions and persistence remain consumer responsibilities. The Toggle Base Styles and Sizes fixtures omit a fieldset legend; provide an appropriate group label before adopting them. Check the record's browser, keyboard and screen-reader evidence separately.

Use dialtone utility d-ww-normal for the selected static utility hint, then dialtone docs --id examples/utility-word-wrap-normal. Read each record’s representation and validation status. Static subjects, referenced examples, MDX and richer state remain partial coverage.

Combinator’s curated registry drives preset examples through the same exact-ID route. The legacy FilterPill defer selection preset includes its authored popover-footer-class after clarifying the prop descriptions used by the existing dependency parser; prop_dependencies.js is unchanged. Generated legacy slot metadata uses the camelCase runtime names activeFilters, activeFilterList, activeFilterOverflow and pendingFilters; the runtime names are unchanged. For example, retrieve examples/presets/DtLoader/default or examples/presets/DtButton/start%20icon. Supported sources with complete assembly context appear without a second publishing list; unresolved, unsupported and deprecated sources remain excluded. Read each record’s consumer-build and manual-review status: source delivery alone does not establish compatibility or a working application. Source versions and bank hashes identify the preset separately from its consumer proof. A rename or removal retires the old ID. Curation changes reach installed tools through generation, package publication and updates; an MCP server also needs a restart.

Example data is generated by dialtone-docs:build, bundled through query-core into the CLI/MCP builds, then included in their packed packages. Documentation deployment alone does not refresh an installed CLI. Source changes need the existing release selection and package publication/update path; a local packed candidate is not a published release.

Generate context for a coding agent

Use prompt to produce a compact component summary with its props, slots, and events. It includes an import hint only when the CLI can verify a public export route for the component:

dialtone prompt button

Internal components show Import unavailable instead of an import. If the CLI cannot verify the installed package's exports, it shows Import unverified and advises upgrading component metadata or checking those exports. JSON output uses import: null when no verified route is available.

Copy the result to your clipboard on macOS:

dialtone prompt modal | pbcopy

Use JSON when the receiving tool needs structured data:

dialtone prompt tooltip --format json

Output formats

Every command accepts --format:

Format Output Use it for
minimal Compact plain text. This is the default. Terminal lookups and copying small results.
markdown Markdown-formatted text. Documentation and text-based prompts.
json Structured JSON. Scripts, editor tooling, and coding agents.

For programmatic use, prefer --format json instead of parsing the default terminal output.

Data sources

MCP uses explicit project configuration. Its environment settings do not configure CLI commands, which resolve from their working directory or use --bundled.

The CLI looks for installed packages the way Node does, in the node_modules folders in and above the directory you run it from:

  1. If a package.json at or above your directory, up to the repository root, depends on @dialpad/dialtone, the CLI uses that package's component, token, and utility data, and the icons package it depends on.
  2. Otherwise, it uses installed @dialpad/dialtone-vue, @dialpad/dialtone-css, and @dialpad/dialtone-icons packages, and fills any gaps from an installed @dialpad/dialtone.
  3. Anything it can't resolve comes from the data bundled with @dialpad/dialtone-cli. Documentation search always uses bundled content.

The source line lists any data that came from somewhere other than the main package. If package.json declares a caret, tilde, or exact version of @dialpad/dialtone (such as ^10.0.0) and the installed copy has a different major version, the CLI prints a warning. If package.json declares @dialpad/dialtone but the CLI can't find an installed copy, it warns and uses bundled data. Yarn Plug'n'Play installs have no node_modules, so the CLI uses bundled data there.

Import hints in component and prompt output appear only for verified public exports. Installed @dialpad/dialtone data uses its verified @dialpad/dialtone/vue route, or @dialpad/dialtone/vue3 for versions before 9.173 that expose that route. Installed @dialpad/dialtone-vue data and bundled component data use verified routes from @dialpad/dialtone-vue.

Curated component keywords also come from bundled documentation and join only to public components present in the selected component data. They are latest documentation references, not proof of installed API availability or behavior. An older or unverified component dataset can lack these associations.

Bundled import hints are verified against the bundled Vue source version. They do not establish that @dialpad/dialtone-vue is installed at that version or that the import is compatible with your project's dependencies.

Export verification checks the stated package entry. It does not establish that peer dependencies, application setup, or runtime behavior are correct. Validate code against your installed packages before using it.

Use --bundled when you want to ignore installed packages and query the CLI's bundled data:

dialtone --bundled search "button"

CLI or MCP Server

The CLI and MCP server use the same Dialtone search engine. Choose the interface that fits the task.

Task Recommended interface
Check the Dialtone version installed in a project CLI
Look up a prop, token, utility class, or icon from a terminal CLI
Use Dialtone data in a shell script CLI with --format json
Add compact component context to a coding prompt CLI with prompt
Let an MCP-compatible AI client choose and run searches MCP Server

You can install both. The CLI handles explicit terminal queries; the MCP server lets an AI client call Dialtone search tools directly.

Update the CLI

The CLI checks npm for a newer version in the background and gives up after three seconds. Update a project-local dependency from its application directory:

npm install --save-dev --save-exact @dialpad/dialtone-cli@latest

Review and commit the manifest/lockfile change. For a global installation, use npm install -g @dialpad/dialtone-cli@latest. If your CLI notice prints a global command, choose the update command matching your installation. The notice does not update packages automatically.

Updating refreshes bundled documentation, discovery keywords, and the fallback data used outside a Dialtone project. Docs-only keyword edits are eligible for a CLI release through the normal release process. They can reach the site before publication and a CLI update. Source merge and local builds do not update installed tools.

Troubleshooting

The command is not found

For a project dependency, run npm exec --no -- dialtone --help from the application directory and verify the dependency is installed. For a global installation, check that npm's global bin directory is on the terminal or client PATH. Restart the affected client after changing its environment.

Results do not match the project

Run the command from inside the project. The source line names the package and version each kind of data came from. --bundled intentionally selects the CLI's bundled data. Documentation is always bundled; for domains that support installed data, bundled without that option means installed data was not selected. A version warning means the installed packages don't match package.json; reinstall dependencies.

A search returns no useful results

Start with fewer keywords, then narrow the query. Use | when any of several terms is acceptable:

dialtone search "input|select|menu"

Use the focused component, token, utility, or docs command once you know which type of result you need.

Show the search engine's debug output

Set DIALTONE_DEBUG=1 to print the search engine's debug output to stderr, including the parsed query and how many results each step matched:

DIALTONE_DEBUG=1 dialtone component stack --prop gap

Resources

Dialtone CLI documentation last updated Wednesday, December 2, 2026