Skip to main content
Version: Next

amctl context

View and manage CLI context — configured instances, the active organization, and per-directory project links.

amctl context [command]

Subcommands

CommandPurpose
showShow how scope resolves in the current directory
linkLink the current directory to an org, project, and optional agent
unlinkRemove the link for the current directory
instance listList configured instances
instance useSwitch the active instance
instance removeRemove a configured instance
org listList organizations on the active instance
org useSet the active organization

Options inherited from parent commands

NameDescription
--orgOverride the active organization.
--jsonOutput as JSON envelopes.

amctl context show

Show the current context: active instance, current org, linked project, linked agent, and resolved environment.

amctl context show

Example

amctl context show

Link the current working directory to an org, project, and optionally an agent. Once linked, commands run from this directory (or any subdirectory) use this context automatically and operate in the default environment.

amctl link is a hidden top-level alias for this command.

amctl context link [flags]

Examples

# Link to a project; pick the agent later via positional arg
amctl context link --project checkout

# Link to a specific agent inside the project
amctl context link --project checkout --agent api

# Equivalent shorthand
amctl link --project checkout --agent api

Options

NameTypeDefaultDescription
--projectstringrequiredProject to link the directory to.
--agentstring(none)Optional agent to link as well.

Remove the project link for the current working directory.

amctl unlink is a hidden top-level alias for this command.

amctl context unlink

Example

amctl unlink

amctl context instance list

List the Agent Manager instances configured in ~/.amctl/config.yaml. The active instance is marked.

amctl context instance list

amctl context instance use

Switch the active instance. Subsequent commands use the new instance's URL, credentials, and current org.

amctl context instance use <name>

Arguments

NameDescription
<name>Configured instance name.

Example

amctl context instance use dev

amctl context instance remove

Remove an instance entry from ~/.amctl/config.yaml. Project links that referenced the removed instance are cleared.

amctl context instance remove <name> [flags]

Arguments

NameDescription
<name>Configured instance name to remove.

Options

NameShortTypeDefaultDescription
--yes-yboolfalseSkip the confirmation prompt.

amctl context org list

List organizations available on the active instance.

amctl context org list

amctl context org use

Set the current organization on the active instance. Persists to ~/.amctl/config.yaml.

amctl context org use <name>

Arguments

NameDescription
<name>Organization name.

Example

amctl context org use acme

See Also