OpenCode.Generated.Instance (opencode_sdk v0.1.64)

Copy Markdown View Source

Provides API endpoints related to instance

Summary

Types

app_skills_200_json_resp()

@type app_skills_200_json_resp() :: %{
  content: String.t(),
  description: String.t() | nil,
  location: String.t(),
  name: String.t()
}

vcs_apply_200_json_resp()

@type vcs_apply_200_json_resp() :: %{applied: boolean()}

Functions

app_agents(opts \\ [])

@spec app_agents(opts :: keyword()) :: {:ok, [OpenCode.Generated.Agent.t()]} | :error

List agents

Get a list of all available AI agents in the OpenCode system.

Options

  • directory
  • workspace

app_skills(opts \\ [])

@spec app_skills(opts :: keyword()) :: {:ok, [app_skills_200_json_resp()]} | :error

List skills

Get a list of all available skills in the OpenCode system.

Options

  • directory
  • workspace

command_list(opts \\ [])

@spec command_list(opts :: keyword()) ::
  {:ok, [OpenCode.Generated.Command.t()]} | :error

List commands

Get a list of all available commands in the OpenCode system.

Options

  • directory
  • workspace

formatter_status(opts \\ [])

@spec formatter_status(opts :: keyword()) ::
  {:ok, [OpenCode.Generated.FormatterStatus.t()]} | :error

Get formatter status

Get formatter status

Options

  • directory
  • workspace

instance_dispose(opts \\ [])

@spec instance_dispose(opts :: keyword()) :: {:ok, boolean()} | :error

Dispose instance

Clean up and dispose the current OpenCode instance, releasing all resources.

Options

  • directory
  • workspace

lsp_status(opts \\ [])

@spec lsp_status(opts :: keyword()) ::
  {:ok, [OpenCode.Generated.LSPStatus.t()]} | :error

Get LSP status

Get LSP server status

Options

  • directory
  • workspace

path_get(opts \\ [])

@spec path_get(opts :: keyword()) :: {:ok, OpenCode.Generated.Path.t()} | :error

Get paths

Retrieve the current working directory and related path information for the OpenCode instance.

Options

  • directory
  • workspace

vcs_apply(body, opts \\ [])

@spec vcs_apply(body :: map(), opts :: keyword()) ::
  {:ok, vcs_apply_200_json_resp()}
  | {:error, OpenCode.Generated.VcsApplyError.t()}

Apply VCS patch

Apply a raw patch to the current working tree.

Options

  • directory
  • workspace

Request Body

Content Types: application/json

vcs_diff(opts \\ [])

@spec vcs_diff(opts :: keyword()) ::
  {:ok, [OpenCode.Generated.VcsFileDiff.t()]} | :error

Get VCS diff

Retrieve the current git diff for the working tree or against the default branch.

Options

  • directory
  • workspace
  • mode

vcs_diff_raw(opts \\ [])

@spec vcs_diff_raw(opts :: keyword()) :: {:ok, String.t()} | :error

Get raw VCS diff

Retrieve a raw patch for current uncommitted changes.

Options

  • directory
  • workspace

vcs_get(opts \\ [])

@spec vcs_get(opts :: keyword()) :: {:ok, OpenCode.Generated.VcsInfo.t()} | :error

Get VCS info

Retrieve version control system (VCS) information for the current project, such as git branch.

Options

  • directory
  • workspace

vcs_status(opts \\ [])

@spec vcs_status(opts :: keyword()) ::
  {:ok, [OpenCode.Generated.VcsFileStatus.t()]} | :error

Get VCS status

Retrieve changed files in the current working tree without patches.

Options

  • directory
  • workspace