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

# repos.list()

> List repositories in an organization.

List repositories using cursor pagination.

**Required scope: `read`**

```ts theme={null}
const repos = await mesa.repos.list({ limit: 50 });

for (const repo of repos.repos) {
  console.log(repo.name, repo.default_bookmark, repo.head_change_id);
}
```

## Options

<ParamField path="org" type="string | undefined">
  Organization override.
</ParamField>

<ParamField path="cursor" type="string | undefined">
  Opaque pagination cursor from a previous response.
</ParamField>

<ParamField path="limit" type="number | undefined">
  Maximum number of repositories to return. The server maximum is `100`.
</ParamField>

<ParamField path="tags" type="string | undefined">
  Comma-separated tag filter string such as `env:prod,team:agents`.
</ParamField>

## Response

<ResponseField name="next_cursor" type="string | null">
  Cursor for the next page, or null when no more results remain.
</ResponseField>

<ResponseField name="has_more" type="boolean">
  Whether another page of results is available.
</ResponseField>

<ResponseField name="repos" type="Repo[]">
  Repository objects.
</ResponseField>

### Repo

<ResponseField name="id" type="string">
  Repository ID.
</ResponseField>

<ResponseField name="org" type="string">
  Organization slug.
</ResponseField>

<ResponseField name="name" type="string">
  Repository name.
</ResponseField>

<ResponseField name="default_bookmark" type="string">
  Default bookmark name.
</ResponseField>

<ResponseField name="head_change_id" type="string">
  Current change ID at the default bookmark tip.
</ResponseField>

<ResponseField name="upstream" type="UpstreamConfig | null">
  Configured upstream remote, or null when no upstream is configured.
</ResponseField>

<ResponseField name="created_at" type="string">
  Creation time.
</ResponseField>

<ResponseField name="tags" type="Record<string, string>">
  Repository tags.
</ResponseField>

### UpstreamConfig

<ResponseField name="url" type="string">
  Upstream Git remote URL.
</ResponseField>

<ResponseField name="auth_kind" type="'token' | 'username_password' | null">
  Stored upstream authentication kind, or null when the upstream is public.
</ResponseField>
