Skip to content
Reference

CLI reference

Commands, options and recovery for the Fungi terminal.

The fungi command starts a local Agent conversation, reopens saved work and connects your machine to Team Computers. Start with Install Fungi. 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.

Command What it does
fungi Opens an interactive Session in the current project.
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.

TERMINAL
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.

Command What it does
fungi login Chooses a model provider and its login method.
fungi login --provider fungi Opens Fungi sign-in and selects the Team that pays for hosted models.
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>] Checks saved auth, model availability, connectivity 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.

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 to revoke a login or detach a Computer manually.

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.

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.

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.

Read Attach a local folder before connecting one. Browser Shed is a separate interface to a Computer.

--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.

/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.
/queue edit-last Withdraws the last pending follow-up into an empty composer. Refuses if it has started or the queue view is incomplete.
/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.

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.

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.