# Shiitake CLI commands and options

> Start and resume conversations, connect models, manage local Agents and permissions, run in a VM, and update the fungi terminal client.

For a headless coding agent CLI in scripts, use `fungi run` after configuring a
model in a terminal. Pass a prompt as an argument or pipe it to stdin. The
command waits for its accepted task's result and prints the final answer.

The `fungi` command starts a local Agent conversation, reopens saved work and
connects your machine to Team Computers. Start with
[Install Shiitake](/install/). A Session is a saved conversation and its work.
The terminal client connects to a shared Local service on your machine.

Run `fungi --help` for the command list or `fungi <command> --help` for one
command. `fungi --version` prints the installed version.

## Start and inspect work

| Command                                              | What it does                                                                            |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `fungi`                                              | Opens an interactive Session in the current project.                                    |
| `fungi new`                                          | Starts a new conversation in this folder without opening the saved-conversation picker. |
| `fungi resume`                                       | Opens the saved-Session picker for this project.                                        |
| `fungi resume --last`                                | Reopens this project's most recent Session.                                             |
| `fungi sessions list`                                | Lists saved Sessions, newest first.                                                     |
| `fungi sessions resume <number\|session-id\|prefix>` | Reopens a listed Session by number, full ID or unique prefix.                           |
| `fungi sessions resume --last`                       | Reopens the latest Session without the picker.                                          |
| `fungi sessions show <id>\|--last`                   | Prints a bounded view of saved messages.                                                |
| `fungi sessions status [id\|--last]`                 | Reads the owner's current Session state. With no selection, reads the latest.           |
| `fungi sessions watch <id>\|--last`                  | Follows live state and messages until you stop watching.                                |
| `fungi run [prompt]`                                 | Runs one prompt and prints its reply. Reads the prompt from stdin when omitted.         |
| `fungi stop`                                         | Stops the shared Local service. Saved Sessions remain.                                  |

Use `-C <folder>` or `--cd <folder>` to choose a project instead of the current
folder. Saved Sessions belong to that project. `show` and `watch` read at most
100 messages through the authenticated Local service. Add `--errors` to select
tool errors, or `--json` for structured output. `status` also accepts `--json`.
These views report owner state. A queued instruction is accepted work, not a
finished reply.

Illustrative: after installing Fungi and configuring a model provider, these
commands inspect your own project. Replace the folder with yours.

```sh
fungi sessions list -C ./garden
fungi sessions status --last -C ./garden --json
```

Closing the terminal leaves the shared service running. `fungi stop` affects
other clients using that service. Stopping `watch` only ends your observation.

## Agents and the board

| Command                                                         | What it does                                                                                                                                                                                         |
| --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fungi agents list [-C <folder>]`                               | Lists this folder's active Agents and their IDs.                                                                                                                                                     |
| `fungi agents list --archived [-C <folder>]`                    | Lists its archived Agents.                                                                                                                                                                           |
| `fungi agents archive <agent-id> [-C <folder>]`                 | Removes an Agent from the picker and delegation while keeping its conversations and files.                                                                                                           |
| `fungi agents unarchive <agent-id> [-C <folder>]`               | Restores an archived Agent.                                                                                                                                                                          |
| `fungi schedules list [-C <folder>]`                            | Lists every schedule of this folder's Agents, including Agents you have not opened, with its ref, state, cadence and next run. An Agent that could not be read is named, never shown as having none. |
| `fungi schedules pause <agent-id> <ref> [-C <folder>]`          | Stops future occurrences of one schedule from the list. Its conversation can resume it.                                                                                                              |
| `fungi schedules delete <agent-id> <ref> [--yes] [-C <folder>]` | Cancels future occurrences after asking (`--yes` skips the question). Work already accepted and its history stay.                                                                                    |
| `fungi board [-C <folder>] [--json]`                            | Shows what needs your attention, stuck Agents and configured shipping information for this folder.                                                                                                   |

Archiving is refused while an Agent has a running command. Cancel that command
first. An archived Agent cannot receive new work until you restore it.

The board reads saved Agent state without starting Agents. `--json` prints one
snapshot for scripts. Its shipping information comes from `board.shipping` in
your project or home `.fungi/settings.json`; without that setting, a Git project
shows its current branch. It does not infer that a release reached users.

## Login and diagnosis

| Command                                                                    | What it does                                                                                             |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `fungi login`                                                              | Opens a provider chooser in an interactive terminal; defaults to Fungi without one.                      |
| `fungi login --provider fungi`                                             | Opens Fungi sign-in and selects the Team that pays for hosted models.                                    |
| `fungi login --hub <origin>`                                               | Signs in to a different Fungi Hub origin.                                                                |
| `fungi login --device`                                                     | Prints a code to approve on the Hub's /device page from any signed-in browser.                           |
| `fungi login --provider <id> [--auth-type oauth\|api_key] [--method <id>]` | Selects a provider and optional supported login method.                                                  |
| `fungi status [--provider <id>]`                                           | Shows model logins and the saved Fungi MCP login.                                                        |
| `fungi logout [--provider <id>]`                                           | Logs out of the selected provider; Fungi also attempts Computer detach and login revocation.             |
| `fungi doctor [-C <folder>]`                                               | Reports platform/glibc, saved Fungi login, model configuration, HTTP reachability and installed version. |
| `fungi login --fungi-mcp <url>`                                            | Opens browser sign-in and approval for a Team MCP connection.                                            |
| `fungi logout --fungi-mcp <url>`                                           | Removes that origin's shared Fungi login and attempts Computer detach and Hub revocation.                |

Use `fungi login --provider fungi` to choose Fungi explicitly. In an interactive
terminal, bare `fungi login` offers a subscription, Fungi or an API key.

A Fungi login supplies one account credential for both hosted models and MCP.
The browser asks for sign-in and approval. With multiple Teams, choose the one
that pays for models. A single current Team is selected automatically.
`fungi login --fungi-mcp <url>` uses the shared account login. Run
`fungi mcp use <url>` to save the project's Computer endpoint. The billing Team
and Computer endpoint are separate choices. Changing one does not retarget the
other. Logging in to a different Fungi origin asks before replacing the saved
login.

Fungi logout removes local credentials even when remote cleanup fails. It
reports unconfirmed login revocation and names Computers that may still be
attached. Pending cleanup is retried after the next successful sign-in to the
same account and service. Follow
[Local sign-out recovery](/account/sign-in/#sign-out-of-local) to revoke a login
or detach a Computer manually.

Doctor does not make an inference request, verify Team credit or check for a
newer CLI release. It checks the project's saved MCP origin, or
`https://fungi.computer` when no endpoint is selected. Use `fungi status` to
inspect other providers; Doctor's model check is specific to Fungi.

Login does not change an existing Session's model. Use `/model` to select Fungi
and a hosted model such as Luna. Hosted inference uses the selected Team's
billing. Choosing a different provider uses its own key or subscription and
billing. Files, tools and Session storage remain local in either case.

A Fungi refusal tells you to sign in again, add credits to the named Team or
retry a paused/unreachable service. It does not switch to a supplier provider.

Choose models and thinking levels inside the conversation with `/model` and
`/thinking`. The interactive launcher does not accept `--model`, `--provider` or
`--reasoning` as Session options. `--provider` belongs to the auth commands
above.

## Fungi account and billing Team

These commands use your saved Fungi login. Hosted models need credit in the
selected Team; your own provider key or subscription has separate billing.

| Command                            | What it does                                                                  |
| ---------------------------------- | ----------------------------------------------------------------------------- |
| `fungi account [--json]`           | Shows your Fungi Hub and the Team selected for model billing.                 |
| `fungi account teams [--json]`     | Lists Teams where you are a current member.                                   |
| `fungi account use-team <team-id>` | Selects a billing Team from those memberships.                                |
| `fungi account balance [--json]`   | Reads the selected Team's credit when you have permission to see its billing. |

Selecting a Team does not change this project's Computer endpoint. Use
`fungi mcp show` to inspect that separate selection.

## ACP editors

| Command                           | What it does                                                         |
| --------------------------------- | -------------------------------------------------------------------- |
| `fungi acp [-C <folder>]`         | Serves a Local Agent over stdio for an editor.                       |
| `fungi acp login [login options]` | Runs the ordinary login flow for clients with terminal-auth support. |

Configure the editor to launch `fungi` with arguments `["acp"]`. It shares the
terminal's Local service, login and project Sessions. `-C` supplies the
discovery root when a client's history request omits the project directory. Keep
editor MCP servers and additional directories empty; Local accepts one project
root.

Select the editor's Session with `fungi sessions resume <session-id>` and use
`/model` in the terminal to choose its model. The ACP connection has no model
picker. Use the editor's cancel control to stop a turn; disconnecting alone can
leave work running. See
[Use Fungi in your editor](/guides/use-fungi-in-your-editor/) for Zed, Neovim
and other ACP clients, including saved-history recovery.

For clients connecting directly to a Team-hosted Agent with a Team key, request
`agent.manage` for Session lifecycle and configuration, bounded to the selected
Agent. Add `agent.read` for Session listing/history and `agent.send` for
prompts; `agent.manage` does not imply either grant. The local stdio setup above
uses the saved browser login; it does not require a Team key in editor settings.

## Team Computers and attached folders

Get your Team's MCP address from the Hub. Use it with
`fungi login --fungi-mcp <url>` before the Team commands below.

| Command                                                             | What it does                                                                               |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `fungi mcp show [-C <folder>]`                                      | Shows the project's saved Team MCP address.                                                |
| `fungi mcp use <url> [-C <folder>]`                                 | Saves an address for that project.                                                         |
| `fungi mcp forget [-C <folder>]`                                    | Removes the project's saved address.                                                       |
| `fungi computers [--fungi-mcp <url>]`                               | Lists the selected Team's Computers and their running, sleeping, queued or starting state. |
| `fungi computers start <name\|id> [--fungi-mcp <url>]`              | Starts an existing hosted Computer and watches its queue position until connected.         |
| `fungi computer attach <computer> <folder> --fungi-mcp <url>`       | Attaches this folder as an execution backend and keeps it connected.                       |
| `fungi computer status`                                             | Lists this machine's attachments.                                                          |
| `fungi computer detach <computer> --fungi-mcp <url>`                | Removes your attachment. The folder keeps its files.                                       |
| `fungi computer run [--size <size>] [--push <folder>] -- <command>` | Runs one command on a new Computer, then deletes that Computer.                            |

The project saves only an address. `fungi login` owns credentials. A running
Local service keeps its existing connection until `fungi stop`. Starting a
Computer waits up to 30 minutes. Ctrl-C stops waiting. A start already accepted
by the Hub can still finish.

`attach` shows an access notice before connecting. Commands routed to the folder
run as your OS user, and files sync both ways. The Computer's version wins when
offline edits conflict. Keep the command running, use Ctrl-C to disconnect, and
run it again to reconnect. Only the attaching member can detach.
`--host-label <label>` chooses the displayed machine name. `--yes` accepts the
access notice without a prompt.

`run` creates a Computer (`--size` is small, default or large), copies the
`--push` folder into `/workspace`, and runs the command there over SSH. Then it
deletes the Computer, even after a failure, Ctrl-C or a closed terminal, and
even when you stop it while the Computer is still being created. If the delete
fails, it names the Computer that is left so you can run
`fungi computer delete`. In a Git folder, only files Git keeps are copied, so
`.gitignore` applies, and a submodule arrives as an empty folder. A folder
outside Git sends every file in it, including secrets such as `.env` files. The
command's output goes to your terminal, and `run` exits with the command's exit
code. Afterwards it prints how long the Computer was up, its size and an
estimated cost. Your bill is metered separately. A failed step names the step
(create, start, push or run) and its cause. For example:
`fungi computer run --push . -- npm test`.

Read [Attach a local folder](/guides/attach-a-local-folder/) before connecting
one. Browser Shed is a separate interface to a [Computer](/concepts/computer/).

## Run in a local VM

`fungi vm` opens Shiitake in a Lima Linux VM with this project folder mounted.
It requires Lima on macOS or Linux. The project files are shared with your
computer; changes in the VM can change those files. Your home folder and SSH
keys are not mounted. See [Run Fungi in a VM](/guides/run-fungi-in-a-vm/) for
installation and the isolation limits.

| Command                                       | What it does                                                                                                        |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `fungi vm [--yolo\|--workspace\|--read-only]` | Creates or starts this project's VM and opens fungi inside it.                                                      |
| `fungi vm --port <number>`                    | Forwards that port to the same port on your computer; repeat for more ports. Stop a running VM before adding ports. |
| `fungi vm --template <file\|url>`             | Uses a different Lima template when creating a VM.                                                                  |
| `fungi vm login`                              | Shows the VM's logins and starts its own provider login flow.                                                       |
| `fungi vm stop`                               | Stops the VM, preserving its disk, tools and logins.                                                                |
| `fungi vm rm [--yes]`                         | Deletes a stopped VM and its disk. The mounted project folder remains. `--yes` skips confirmation.                  |

## Extensions and command approvals

Install extensions once for your user, then enable the parts you want in a
project or Agent. Extensions run trusted code as your OS user. Read
[Write an extension](/guides/write-an-extension/) for the extension contract.

| Command                                                                 | What it does                                                                    |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `fungi extension add <git-url\|npm-spec\|path> [--skills\|--no-skills]` | Installs an extension and offers to enable its skills for this folder's Agent.  |
| `fungi extension list`                                                  | Lists installed extensions.                                                     |
| `fungi extension remove <id>`                                           | Removes an installed extension.                                                 |
| `fungi extension enable project <id>`                                   | Enables its client part and Open pane programs in this project.                 |
| `fungi extension enable agent <id> [<agent-store>]`                     | Enables its declared tools and capabilities for one Agent, from its next start. |
| `fungi extension enable skills <id> [<agent-store>]`                    | Enables its skills for one Agent.                                               |
| `fungi extension enable logins <id>`                                    | Lets it fill a model sign-in slot Fungi does not provide, for you.              |
| `fungi extension disable project\|agent\|skills <id> [<agent-store>]`   | Disables the selected part.                                                     |
| `fungi extension disable logins <id>`                                   | Withdraws its model sign-in; saved credentials are kept.                        |
| `fungi permissions list [-C <folder>]`                                  | Lists this project's Always-allow command prefixes.                             |
| `fungi permissions remove '["git","push"]' [-C <folder>]`               | Removes that exact command-prefix rule, restoring its approval card.            |

When several Agents belong to a folder, name the Agent store for Agent or skill
activation. A Git extension is pinned to the commit it resolved; run `add` again
to update it. Removing an extension or disabling its Agent part also removes its
skills. Model sign-ins are enabled for you, not per project or Agent; see
[Add a model sign-in with an extension](/extensions/model-logins/).

Always-allow rules apply to every Agent in the project. Only a person's answer
on an approval card can create one; the command line can list or remove rules.
See [Agent sandbox and permissions](/guides/agent-sandbox-and-permissions/).

## Reload and update

| Command                      | What it does                                                                                                              |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `fungi reload [-C <folder>]` | Validates Team MCP connections, extension lists and your shell's PATH, then applies the configuration from the next turn. |
| `fungi update`               | Updates a global Spore installation to the latest published release using its npm, pnpm or Bun installation.              |
| `fungi help [command]`       | Prints the command list or one command's help.                                                                            |

Reload keeps the old configuration if validation fails. Turns already running
keep the configuration they started with. After changing an existing extension's
version or configuration, run `fungi stop` and reopen fungi.

Update preserves saved conversations. If installation or the new launcher's
version check fails, it attempts to restore the previous version. If the updated
service cannot restart, follow the reported recovery: `fungi stop`, then reopen
fungi. If Fungi cannot identify your package-manager installation, use the
manual reinstall command it prints. See [Update Fungi](/install/#update-fungi).

## Options and programmatic clients

`--fungi-mcp <url>` selects and remembers a project's Team endpoint for local
Sessions. `--extension <entry>` enables an installed client extension and can be
repeated. Bare `fungi --yes` skips setup prompts and continues locally. It does
not supply credentials. Use `fungi run` for unattended prompts.

`fungi serve --workers <file> --listen <url>` runs a foreground worker server
for programmatic clients using supplied worker definitions. It is separate from
the interactive terminal. See `fungi serve --help` for its options.

## Commands inside a conversation

`/help` shows the commands available in this Session. Extensions can add
commands, so that list is the source for your current conversation.

| Command                         | What it does                                                            |
| ------------------------------- | ----------------------------------------------------------------------- |
| `/keys`                         | Shows active key bindings.                                              |
| `/clear`                        | Clears the composer draft, not saved history.                           |
| `/account`, `/login`, `/logout` | Reads or changes provider logins, including the shared Fungi account.   |
| `/model`, `/thinking`           | Chooses the model or a supported thinking level.                        |
| `/session`                      | Reads the selected Session's state and queue count.                     |
| `/new`, `/resume`               | Starts or chooses a Local Session.                                      |
| `/fork`                         | Chooses a saved user message to fork from while the Session is idle.    |
| `/queue`, `/queue list`         | Lists accepted queued prompts and retained outcomes.                    |
| `/cancel`                       | Withdraws a waiting prompt or requests cancellation of the current run. |
| `/reconnect`                    | Reconnects Session observation.                                         |
| `/retry`                        | Retries the failed instruction.                                         |
| `/continue`                     | Deliberately continues after a stopped run.                             |
| `/details`                      | Toggles transcript details.                                             |
| `/exit`                         | Closes this terminal client.                                            |

Plain Up in a focused, empty composer recalls your newest pending message,
including its images and delivery intent. Recall is unavailable with attached
images, a pending paste, an open dialog or slash popup, or attention requiring
an answer. Modified or held-repeat Up does not recall. If the message already
started, the draft stays unchanged.

Enter submits. Shift-Enter or Alt-Enter inserts a newline. Tab submits a
follow-up while work is active. Esc closes an open dialog first. Otherwise, it
withdraws a waiting prompt or requests cancellation of active work. `/cancel`
invokes cancellation directly, without the keyboard's dialog-dismissal step.

Ctrl-C closes an open dialog first. Otherwise, it exits an idle client or one
with a waiting prompt, leaving that prompt queued. During active work, the first
Ctrl-C requests cancellation. A second Ctrl-C exits even if cancellation is
still pending. Ctrl-O toggles details. Ctrl-G toggles the focused tool group.

## Recover without losing context

Run `fungi doctor` if login, model selection or connectivity fails. Use
`fungi sessions show <id> --errors` to inspect tool failures. If the
conversation disconnects, `/reconnect` restores observation. It does not prove
the active work stopped. `/retry` resubmits a failed instruction, so review its
result before repeating work that changes files or external services.

An unknown or failed slash command stays in the composer with an error. It does
not silently become a prompt sent to the model. A client/service build mismatch
offers an upgrade after active turns finish, then reopens the Session.
