Skip to content

Subagents

Stop scanning a registered subagent source.

Flags

  • -i, --id <value> — Id the source was registered under. (required)

Global

  • --json — the raw API payload, for scripts and agents.

Removes the source from ~/.gemini/agents-registry.json. Its subagents stop appearing as available to install. Subagents already installed from it stay installed, because an installed subagent is a copy; uninstall them too if you want them gone. Naming an id that is not registered is an error.

Examples

Terminal window
simply gemini agents deregister --id my-team

Install subagents from your registered subagent sources.

Flags

  • -a, --agent <value> — Name of a subagent to install. Repeat the flag for more than one. (repeatable)
  • -f, --force — Replace subagents that are already installed.

Copies each subagent file to ~/.gemini/agents/.md, where the Gemini CLI loads it from. The name is the name: field of the file’s front matter, or the file name without .md.

It is a copy, not a link, so changing the source does not change the installed subagent; run install again with —force to pick up a change. With no —agent, lists every subagent not yet installed, grouped by category, and asks which to install. Naming one that is already installed is reported and skipped unless —force is given. Naming one no registered source provides fails before anything is installed.

Examples

Pick from a list of every subagent not yet installed:

Terminal window
simply gemini agents install

Install two subagents without being asked:

Terminal window
simply gemini agents install --agent code-reviewer --agent test-writer

Reinstall a subagent after its source changed:

Terminal window
simply gemini agents install --agent code-reviewer --force

List subagents from your registered sources, and what is installed.

Flags

  • --installed — List only installed subagents.
  • --available — List only subagents that are not yet installed.
  • --outdated — List only installed subagents whose source file has changed since they were installed.

Shows every subagent the registered sources provide, and every subagent installed under ~/.gemini/agents — including one copied there some other way, which is listed with no source. When two sources provide a subagent with the same name, the source registered first wins, because Gemini loads a subagent by its name and can hold only one of them.

An installed subagent is a copy of its source file. INSTALLED reads “outdated” when the source file has changed since it was installed; install --force updates it.

Examples

Terminal window
simply gemini agents list
Terminal window
simply gemini agents list --available
Terminal window
simply gemini agents list --outdated
Terminal window
simply gemini agents list --installed --json

Register a directory of subagents as a subagent source.

Flags

  • -i, --id <value> — Unique id for the source. Used to deregister it, and shown as SOURCE in list. (required)
  • -p, --path <value> — Directory holding the subagents. A relative path is resolved against the current directory. (required)
  • -d, --description <value> — Short description of the source.
  • --install-defaults — Install the subagents the source lists as defaults.

A subagent source is any directory holding subagent definitions: Markdown files other than README.md, either directly (source/code-reviewer.md) or one level down in a category folder (source/apex/apex-doc-writer.md). Once registered, its subagents appear in list and can be installed with install.

Sources are recorded in ~/.gemini/agents-registry.json, the same file the Salesforce sf gemini agents commands use, so a source registered with either tool is visible to both. Registering an id or a directory that is already registered replaces the earlier entry.

A source can list subagents everyone should have in a gemini-source.json at its root ({“defaults”: [“subagent-name”, …]}). Those are installed straight after registering; one that is already installed is left as it is, even if its source has changed. Pass —no-install-defaults to skip them.

Examples

Terminal window
simply gemini agents register --id my-team --path ./agents
Terminal window
simply gemini agents register --id @my-org/gemini-agents --path ~/src/gemini-agents --description "Shared team subagents"

Register a source without installing the subagents it lists as defaults:

Terminal window
simply gemini agents register --id my-team --path ./agents --no-install-defaults

Uninstall Gemini subagents.

Flags

  • -a, --agent <value> — Name of a subagent to uninstall. Repeat the flag for more than one. (repeatable)

Deletes ~/.gemini/agents/.md for each subagent.

Any subagent there can be uninstalled, including one no registered source provides. With no —agent, lists every installed subagent and asks which to remove. Naming one a registered source provides but that is not installed is reported and skipped; naming one that is neither installed nor available fails before anything is removed.

Examples

Pick from a list of every installed subagent:

Terminal window
simply gemini agents uninstall

Uninstall one subagent without being asked:

Terminal window
simply gemini agents uninstall --agent code-reviewer