Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

Get current project

Resolve the project for the requested location.

GET/api/project/current
Query parameters
locationobject | any
Responses
200Project.Current
idstringrequired
directorystringrequired
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/project/current"
Response
{
  "id": "string",
  "directory": "string"
}