Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

List commands

Retrieve currently registered commands.

GET/api/command
Query parameters
locationobject | any
Responses
200Success
locationLocation.Inforequired
Show properties
directorystringrequired
workspaceIDobject
Show properties
object
projectobjectrequired
Show properties
idstringrequired
directorystringrequired
dataCommand.Info[]required
Show properties
Array of Command.Info
namestringrequired
templatestringrequired
descriptionstring
agentstring
modelModel.Ref
Show properties
idstringrequired
providerIDstringrequired
variantstring
subtaskboolean
400InvalidRequestError
_tagstringrequired
Allowed:InvalidRequestError
messagestringrequired
kindstring | any
Show properties
Any of:
string
string
any
any
fieldstring | any
Show properties
Any of:
string
string
any
any
401UnauthorizedError
_tagstringrequired
Allowed:UnauthorizedError
messagestringrequired
Request
curl -X GET "/api/command"
Response
{
  "location": {
    "directory": "string",
    "workspaceID": {},
    "project": {
      "id": "string",
      "directory": "string"
    }
  },
  "data": [
    {
      "name": "string",
      "template": "string",
      "description": "string",
      "agent": "string",
      "model": {
        "id": "string",
        "providerID": "string",
        "variant": "string"
      },
      "subtask": true
    }
  ]
}