Skip to main content
These are programs, such as gh, slack and git, that an agent runs inside a workspace shell. Mirage implements them itself; no binary is installed. The mirage command you run on your own machine is a different thing: see the host mirage CLI.

Supported CLIs

hf and himalaya live in the Node package: import them from @struktoai/mirage-node. Each page lists the subset Mirage implements, its limits and its licenses; see compatibility and licenses.

Register a CLI

Account CLIs need credentials but do not need a service mount:
  • registerCli(name, spec, config) validates the config object with the spec’s schema. git, office, pdfinfo and pdftotext take no config; register them without the third argument.
  • Register the same CLI twice under different names for two accounts.
  • Only your code can register a CLI. An agent cannot install one from the shell.
The equivalent YAML entry is:
machine: in_process runs the CLI inside Mirage. YAML config fields use snake_case in both languages. Setup pages cover credentials and imports for every program.

Discover functionality

man and --help render the registered spec. Unknown commands are refused; wording and exit codes follow the program’s declared style. Use each reference for command-specific errors rather than assuming one exit code for all CLIs. which slack prints /usr/bin/slack. Running that path is the same as running slack. Changing PATH does not change which programs Mirage finds.

CLIs and mounts

A CLI and a mount are separate: neither installs nor finds the other, even when they share a token.
  • After a CLI changes its service, Mirage drops the cached listings and search results of every mount its client may reach, so later reads see the change. gh reaches only GitHub mounts on its API base.
  • A mount’s mode governs only writes into the mount. A read-only Slack mount does not stop slack send-message; refuse service actions with a command policy. The service’s own permissions still apply.

Add a custom CLI

Use the authoring guide to define a typed command tree, register multiple accounts, work with VFS paths, or run a script CLI. It also covers config validation, snapshots and the shared command grammar.