Skip to main content

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.

Create a repository in the current or specified organization.
const repo = await mesa.repos.create({ name: 'app' });

console.log(repo.name);
console.log(repo.head_change_id);
Create with an upstream Git remote:
const repo = await mesa.repos.create({
  name: 'app',
  default_bookmark: 'main',
  upstream: {
    url: 'https://github.com/acme/app.git',
    auth: { kind: 'token', token: 'github_pat_...', token_username: 'bot' },
  },
});

Options

org
string | undefined
Organization override.
name
string | undefined
Repository name. If omitted, the API generates a name.
default_bookmark
string | undefined
Default bookmark name. Defaults to main when omitted.
tags
Record<string, string> | undefined
String key-value repository metadata.
upstream
object | undefined
Optional upstream Git remote to attach at create time. On create, omitting auth and passing auth: null both create a public upstream. Pass token or username/password auth to store credentials.

Response

id
string
Stable repository ID. Use this for scoped API keys and webhook target filters.
org
string
Organization slug.
name
string
Repository name used in SDK calls and filesystem paths.
default_bookmark
string
Default bookmark for the repository.
head_change_id
string
Current change ID at the default bookmark tip. Empty repositories return Mesa’s virtual root change ID.
upstream
object | null
Upstream summary with url and auth_kind, or null when no upstream is configured. Secret auth payloads are never returned.
created_at
string
Creation timestamp.
tags
Record<string, string>
Repository tags.

Required scope

write