Skip to main content

Global options

These options are accepted by every guild command. --mode is read from the full command line, so it can go before or after the subcommand, and --mode=json works as well as --mode json:
--json is a hidden backward-compatible alias for --mode json. It still works but does not appear in guild --help. Use --mode json in new scripts.

Event filtering

guild chat, guild workspace chat, guild agent test, and guild session events accept --events <types> to choose which session event types to show. The flag requires a value. Whatever you pass replaces the default entirely, so --events system hides user-facing events rather than adding to them. User events, shown by default: user_message, agent_notification_message, agent_notification_progress, agent_notification_error, container_log, credentials_request, agent_install_request, trigger_message, system_error System and debug events, hidden by default: agent_console, runtime_start, runtime_running, runtime_waiting, runtime_error, runtime_done, llm_start, llm_done These two groups mirror the Filter by type modal in the web UI.

auth

Manage authentication.
guild auth login stores your token in the OS keyring when one is available. On a headless host with no keyring, it falls back to a file named auth-token.json in the global config directory (GUILD_CONFIG_DIR, or ~/.guild when unset). The CLI writes the file with 0600 permissions and keys each entry by host, so several hosts can share one config directory. guild auth logout removes the token from both the keyring and the fallback file.On a headless host there is also no browser to launch. guild auth login prints the verification code and URL and keeps polling rather than failing, so the flow still completes from another machine. Pass --non-interactive to skip the browser launch outright.

agent

Build and manage agents.

Development workflow

Templates: LLM (default), AUTO_MANAGED_STATE, BLANK Agent types: GUILD_TYPESCRIPT, GUILD_NATIVE, GOOSE, OPENCLAW. Values are case-insensitive. Each type scaffolds a different entry point:
--agent-type appears only on accounts that have more than one agent type available. Omit the flag in a terminal and the CLI prompts you to choose from the types you have available. In non-interactive mode the flag is required, and omitting it exits with Error: --agent-type is required in non-interactive mode.
--template is only supported for GUILD_TYPESCRIPT. Passing it with any other agent type exits with Error: --template is not supported for agent type <agent-type>.
In non-interactive mode, --owner is required when your account belongs to one or more organizations. Use guild config set default_owner <name-or-id> to set a default and avoid passing --owner on every invocation. In interactive mode, the CLI always prompts for owner selection.
--publish implies --wait: it always waits for validation and publish to finish, then prints Version is now published and available in the catalog. Use --timeout <seconds> (default: 300) to bound that wait. The value must be a positive integer, otherwise the command prints Invalid --timeout value and exits with status 1. If validation is still running when the timeout elapses, the CLI tells you how to finish the job:

Forking

Fork a published agent version into a new independent agent with its own repository.
A fork inherits the source agent’s category, and its tags along with it. Pass --category to change it — the source tags are then dropped, and any --tags you pass are validated against the new category’s allowed set. Inherited tags exclude Guild’s own guild:-prefixed ones. Run guild agent categories <category> to see the allowed tags for a category. <identifier> is an agent ID or name. If omitted, the command reads guild.json in the current directory.
guild agent save -A/--all commits only modified tracked files. New files are untracked and are not saved — stage them with git add <file> (or git add .) first.

save

Commit your code and create a new version. Versions start as drafts until you publish them.
TypeScript agents derive their version from package.json. Goose agents (recipe.yaml) and Guild Native agents (PROMPT.md) do not use a package.json, so guild agent save skips the package.json version-bump checks for them. --bump and the default bump are no-ops for these agent types. When you run guild agent save --publish on a Goose or Guild Native agent without --version-number, the CLI derives the next version automatically as a patch increment of the latest published version, or 1.0.0 when no published version exists.

test

Test the agent in the current directory. guild agent test polls for the agent’s response and prints it. Use --timeout to override how long the CLI waits before the poll times out.
A poll timeout is recoverable: the session is not discarded when polling times out, so you can resume it. In --mode json, the error output includes the session ID and the resume hint guild agent test --resume <session-id>. In --mode jsonl, the timeout output includes the session ID and the same resume hint, and the command continues to the next input line.
guild agent test runs any agent the workspace already trusts — one your account owns, or one installed in the workspace, including a public or third-party agent you added from the Hub. See Agent-test session authorization.
Before it runs, the CLI checks that the files required for the agent’s type are present: agent.ts and package.json for Guild TypeScript, PROMPT.md for Guild Native, recipe.yaml for Goose, and AGENTS.md for OpenClaw. It resolves the type from guild.json or the Guild API and names the file missing for that type.

chat

Chat with the agent you’re developing from inside the agent directory. By default, guild agent chat creates an ephemeral build from your local files and starts a new session.
Ephemeral builds are the default. guild agent chat builds an agent version from your local files, and unchanged files reuse the cached ephemeral build.
Ephemeral builds include only files tracked by Git. guild agent test and guild agent chat upload files that are already committed or staged with git add. New untracked files are ignored until you stage them with git add. Modified tracked files still upload their working-tree content, so you can test uncommitted changes to existing files without committing them first.
--resume <session-id> works in all modes: interactive, --mode json, and --mode jsonl. Resuming a session skips version resolution and ephemeral builds entirely, because the resumed session already pins its agent version and workspace. --workspace and --agent-version are ignored when you resume. In --mode json and --mode jsonl, resuming appends your input to the specified session as a new user message instead of creating a new session. The CLI reports the resumed session’s ID, and response polling only considers events created after your message. If the session ID does not exist or you cannot access it, guild agent chat exits with code 1 without building the agent and prints:

Publishing

Version history

Render an agent’s version history as git-log-style blocks, each showing the commit SHA, version number, status, validation status, relative date, and summary.
The agent argument is optional and accepts an agent ID or a full name such as myorg~my-agent; omit it to use the agent in the current directory.

diff

Show what changed between your local files and a published version, as a colored unified diff.
The version argument is optional and defaults to the latest published version. Run this from inside an agent directory — the command requires a guild.json and compares the same git-tracked working-tree files that guild agent save uploads.

Discovery and management

Passing --workspace <id> to guild agent list lists the agents installed in that workspace rather than the platform-wide public roster. The agent argument is optional for both commands. It accepts an agent ID or a full name like myorg~my-agent, and defaults to the agent in guild.json in the current directory. See Disabling an agent for what archiving changes. When you pass --workspace, guild agent list returns the agents installed in that workspace, identified by ID or name. This set is specific to the workspace and excludes unrelated public agents.
The --published flag is ignored when combined with --workspace, because installed agents already reference committed versions.

capabilities

Show an agent’s resolved tools, grouped by their source unit — integrations, sub-agents, and built-in or legacy services. Each tool is marked read, write, or unknown. The unknown marker is shown separately from read because an unclassified tool may write.
The [identifier] argument is optional. It accepts an agent ID or a full name like myorg~my-agent, and defaults to the agent in the current directory. --version <id> overrides the default latest published version. --mode json emits the raw payload with version_id, tools, and access fields. The command requires authentication; run guild auth login first. Example output:
With --output json, the command emits a machine-readable payload instead:

tags

categories

Run guild agent categories without arguments to list every category. The list table does not include a TAGS column. To see a category’s allowed tags, pass its name:

Workspaces

Manage workspaces and their contents.
After a successful global workspace selection, guild workspace select prints to stderr: To clear the default, run: guild workspace clear. Pass --quiet to suppress it.

chat

Start a conversation with an agent.
To chat with the agent you’re currently developing, use guild agent chat from inside the agent directory.

Workspace agents

Workspace context

clear

Remove the default workspace setting from configuration.
Behavior depends on where you run the command:
  • In an agent directory (contains guild.json): removes workspace_id from guild.json and prints ✓ Cleared workspace setting for this agent.
  • Outside an agent directory: removes default_workspace and default_workspace_name from ~/.guild/config.json and prints ✓ Default workspace cleared.
If no default workspace is set, the command prints No default workspace was set. to stderr and exits successfully — it is not an error. Exit codes: 0 on success or no-op; 1 on filesystem error only.

chat

Open The Smith, Guild’s built-in support agent, in an interactive chat session.
To chat with the generic workspace assistant instead, use guild workspace chat.

session

Inspect sessions in a workspace.

api

Call any Guild REST API endpoint directly. guild api is an authenticated escape hatch that mirrors guild session get and acts as a CLI counterpart to the MCP data tools. Use it to reach endpoints that do not have a dedicated command yet.
The command validates your session token, checks the HTTP method, and parses any --data JSON before calling the Guild REST API. It prints the raw JSON response to stdout.

trigger

Automate agent execution. See Triggers for a full guide, or Event triggers, Schedule triggers, and API triggers for type-specific details.

integration

Build and manage custom integrations.

Discovery and management

Creating and updating

guild integration create also registers an initial draft version and prints its ID, so you can define operations without running guild integration version create first.
Publishing freezes the endpoint URL, and the OAuth authorization and token URLs with it. Until the integration’s first version is published, the owner can still change them — nothing is installed against the integration yet. Once a version is published, users install credentials against those URLs, so Guild refuses to let the owner repoint them at another server. The whole update is rejected with a 403, not just the URL field, so a request that changes a URL alongside other settings saves none of them. To serve a different endpoint, create a new integration.
Guild validates the --base-url, --install-url, and --token-url values to prevent server-side request forgery (SSRF). Private network ranges, loopback addresses (such as localhost or 127.0.0.1), and internal DNS names are blocked. For local development, expose your service using a tunneling tool such as ngrok or Localtunnel and use the public URL.

Connecting credentials

versions

Operations (endpoints)

Testing


container-image

Manage container images. An image is identified by its owner and name, both passed as flags — these commands take no positional arguments.

list

get

Shows an image, including its setup script. --owner and --name are both required.

create

--owner, --name, --image, and --tag are all required.

modify

--owner and --name identify the image; pass at least one of the remaining options.

runtime-environment

Manage runtime environments. A runtime environment pairs a base container image with an optional setup script. Like container-image, every command identifies its target with --owner and --name flags rather than a positional argument.

list

get

Shows an environment, including its setup script. --owner and --name are both required.

create

--owner and --name are required. Supply the base image with --image, or omit it in a terminal to pick from a searchable list.

modify

--owner and --name identify the environment; pass at least one of the remaining options.

test

Provisions a throwaway container from the environment, streams the setup script’s logs, and reports whether the container came up. Use it to check a setup script before an agent depends on it.
--image and -i, --interactive cannot be combined. --interactive needs a terminal and is rejected in machine-readable mode, so in a script or CI job pass --image explicitly. On modify, --setup and --clear-setup are likewise mutually exclusive.

skill

Create and manage reusable skill packages. See Skills for a full guide.

versions


llm

Manage LLM credentials and model policies from the CLI. See LLM settings for the full model gateway guide.

Credentials

List an account’s LLM credentials and the access each grants. Use it to find the credential ID that guild llm policy create binds to.
The output has one row per credential, ending with the credential UUID to pass to guild llm policy create --credential.

Policies

View and create model policies for a workspace, agent, or workspace-agent target. A policy binds a credential access to a target with an optional model allowlist.

config

Read and write global CLI configuration.
Keys: default_workspace, default_owner, debug, json, quiet, telemetry, auto_update The json key is the config-file equivalent of --mode json. Setting guild config set json true applies JSON output to every command without passing the flag each time.

Utilities

guild setup previews the files it will create, overwrite, or skip and asks for confirmation before making changes, then prompts you to choose a coding assistant — Claude Code, Codex, or Gemini. Pass --provider <claude|codex|gemini> to select one non-interactively, -y/--yes to accept the preview without confirming, and --force to overwrite existing skill files. Add --claude-md, --agents-md, or --gemini-md to also generate a project instructions template for the chosen assistant. Use the --simple flag with guild version to print only the bare version number followed by a newline, with no additional decoration. This makes the output easy to capture in scripts.