> ## Documentation Index
> Fetch the complete documentation index at: https://v2.opencode.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List projects

> List known projects.



## OpenAPI

````yaml /openapi.json get /api/project
openapi: 3.1.0
info:
  title: opencode HttpApi
  version: 0.0.1
  description: Experimental HttpApi surface for selected instance routes.
servers: []
security: []
tags:
  - name: health
  - name: server
  - name: location
  - name: agent
  - name: plugin
    description: Experimental plugin routes.
  - name: session
    description: Experimental session routes.
  - name: session
    description: Experimental message routes.
  - name: model
    description: Experimental model routes.
  - name: generate
    description: Experimental one-shot generation routes.
  - name: provider
    description: Experimental provider routes.
  - name: integration
    description: Integration discovery and authentication routes.
  - name: mcp
    description: MCP server and resource routes.
  - name: credential
  - name: project
    description: Location-scoped project routes.
  - name: form
    description: Session form routes.
  - name: permission
    description: Experimental permission routes.
  - name: filesystem
    description: Experimental location-scoped filesystem routes.
  - name: command
    description: Experimental command routes.
  - name: skill
    description: Experimental skill routes.
  - name: event
    description: Experimental event stream routes.
  - name: pty
    description: Experimental location-scoped PTY routes.
  - name: shell
    description: Experimental location-scoped shell command routes.
  - name: question
    description: Experimental session question routes.
  - name: reference
    description: Location-scoped project references.
  - name: projectCopy
    description: Project copy management routes.
  - name: vcs
    description: Location-scoped version control routes.
  - name: debug
paths:
  /api/project:
    get:
      tags:
        - project
      summary: List projects
      description: List known projects.
      operationId: v2.project.list
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Project'
        '400':
          description: InvalidRequestError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidRequestError'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security: []
components:
  schemas:
    Project:
      type: object
      properties:
        id:
          type: string
        worktree:
          type: string
        vcs:
          $ref: '#/components/schemas/Project.Vcs'
        name:
          type: string
        icon:
          $ref: '#/components/schemas/Project.Icon'
        commands:
          $ref: '#/components/schemas/Project.Commands'
        time:
          $ref: '#/components/schemas/Project.Time'
        sandboxes:
          type: array
          items:
            type: string
      required:
        - id
        - worktree
        - time
        - sandboxes
      additionalProperties: false
    InvalidRequestError:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - InvalidRequestError
        message:
          type: string
        kind:
          anyOf:
            - type: string
            - type: 'null'
        field:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - _tag
        - message
      additionalProperties: false
    UnauthorizedError:
      type: object
      properties:
        _tag:
          type: string
          enum:
            - UnauthorizedError
        message:
          type: string
      required:
        - _tag
        - message
      additionalProperties: false
    Project.Vcs:
      type: string
      enum:
        - git
        - hg
    Project.Icon:
      type: object
      properties:
        url:
          type: string
        override:
          type: string
        color:
          type: string
      additionalProperties: false
    Project.Commands:
      type: object
      properties:
        start:
          type: string
          description: Startup script to run when creating a new workspace (worktree)
      additionalProperties: false
    Project.Time:
      type: object
      properties:
        created:
          type: integer
          allOf:
            - minimum: 0
        updated:
          type: integer
          allOf:
            - minimum: 0
        initialized:
          type: integer
          allOf:
            - minimum: 0
      required:
        - created
        - updated
      additionalProperties: false

````