AgentKit
DocsKitsCLI ReferenceDesktop App
BetaYou are reading docs for the beta channel (2.13.0-beta.20). Features may change before the next stable release.Switch to stable →

ak commands

ak commands search

Search the merged local command-template inventory by flat name, slash name, description, and tags.

Use ak commands search to find a local Claude-style command template when you know a keyword or slash fragment but not its canonical flattened ref.

Usage

ak commands search <query>

One or more positional tokens are joined with spaces. A missing argument uses the current Cobra argument-count error path; a supplied whitespace-only query is rejected as empty.

There are no command-specific flags. The command is read-only, never prompts, and performs no remote or runtime lookup.

Search and ranking

Search uses the merged inventory from ak commands list, where installed records replace matching available records. The query is lowercased and split on whitespace. Each token adds:

Match fieldScore
Flattened command name3
Slash name2
Each matching tag2
Description1

A record is included when at least one token scores. Results sort by total score descending, then canonical <kit>/<flat-name> ascending.

ak commands search email
ak commands search 'write good' --json

Installed records have already lost their source nesting, so their searchable slash name is the flat installed name. Search does not inspect the Markdown body, argument hint, or kit name as separate fields.

Output

Human output is the same table as list. No matches is a successful empty state.

JSON success shares kind: assets.list with list and returns data.commands[] with kit, name, slash_name, rel_path, description, tags, installed, and optional argument_hint.

No NDJSON or secondary status stream is emitted. Errors use stderr; JSON execution errors use the shared error envelope.

Exit behavior

ExitMeaning
0Search completed, including no matches.
1Inventory discovery failed, or no positional query argument was supplied.
2The supplied query was whitespace-only or a flag could not be parsed.