Provides API endpoints related to experimental
Summary
Functions
Get active Console provider metadata
List switchable Console orgs
Switch active Console org
Get MCP resources
List sessions
List tool IDs
List tools
Create worktree
List worktrees
Remove worktree
Reset worktree
Types
@type experimental_console_list_orgs_200_json_resp() :: %{ orgs: [experimental_console_list_orgs_200_json_resp_orgs()] }
Functions
@spec experimental_console_get(opts :: keyword()) :: {:ok, OpenCode.Generated.ConsoleState.t()} | :error
Get active Console provider metadata
Get the active Console org name and the set of provider IDs managed by that Console org.
Options
directoryworkspace
@spec experimental_console_list_orgs(opts :: keyword()) :: {:ok, experimental_console_list_orgs_200_json_resp()} | :error
List switchable Console orgs
Get the available Console orgs across logged-in accounts, including the current active org.
Options
directoryworkspace
@spec experimental_console_switch_org(body :: map(), opts :: keyword()) :: {:ok, boolean()} | :error
Switch active Console org
Persist a new active Console account/org selection for the current local OpenCode state.
Options
directoryworkspace
Request Body
Content Types: application/json
Get MCP resources
Get all available MCP resources from connected servers. Optionally filter by name.
Options
directoryworkspace
@spec experimental_session_list(opts :: keyword()) :: {:ok, [OpenCode.Generated.GlobalSession.t()]} | :error
List sessions
Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.
Options
directoryworkspacerootsstartcursorsearchlimitarchived
@spec tool_ids(opts :: keyword()) :: {:ok, [String.t()]} | {:error, OpenCode.Generated.BadRequestError.t()}
List tool IDs
Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.
Options
directoryworkspace
@spec tool_list(opts :: keyword()) :: {:ok, [OpenCode.Generated.ToolListItem.t()]} | {:error, OpenCode.Generated.BadRequestError.t()}
List tools
Get a list of available tools with their JSON schema parameters for a specific provider and model combination.
Options
directoryworkspaceprovidermodel
@spec worktree_create( body :: OpenCode.Generated.WorktreeCreateInput.t(), opts :: keyword() ) :: {:ok, OpenCode.Generated.Worktree.t()} | {:error, OpenCode.Generated.BadRequestError.t()}
Create worktree
Create a new git worktree for the current project and run any configured startup scripts.
Options
directoryworkspace
Request Body
Content Types: application/json
List worktrees
List all sandbox worktrees for the current project.
Options
directoryworkspace
@spec worktree_remove( body :: OpenCode.Generated.WorktreeRemoveInput.t(), opts :: keyword() ) :: {:ok, boolean()} | {:error, OpenCode.Generated.BadRequestError.t()}
Remove worktree
Remove a git worktree and delete its branch.
Options
directoryworkspace
Request Body
Content Types: application/json
@spec worktree_reset( body :: OpenCode.Generated.WorktreeResetInput.t(), opts :: keyword() ) :: {:ok, boolean()} | {:error, OpenCode.Generated.BadRequestError.t()}
Reset worktree
Reset a worktree branch to the primary default branch.
Options
directoryworkspace
Request Body
Content Types: application/json