nasiko github call them. They aren’t in the generated OpenAPI spec. CLI: Integration commands.
Before you start
The server operator must register a GitHub OAuth app and setGITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET. Without them, most routes return 503 with:
GET /api/auth/github/status, which needs no sign-in.
Authentication
Every route exceptGET /api/auth/github/status takes a session JWT in Authorization: Bearer <token> (from POST /api/auth/login) or the dashboard cookie. A missing or expired token returns 401.
Your GitHub token is stored encrypted, per user, and is never returned by any route. Error bodies are plain text unless a JSON body is shown.
Check whether GitHub is configured
GET /api/auth/github/status
Public. Tells a client whether to offer GitHub at all.
200 OK
Connect your GitHub account
GET /api/github/login
Returns the GitHub authorization URL for your account. Open it in a browser. Matches nasiko github connect.
200 OK
/api/auth/github/callback on your Nasiko server. Nasiko stores the token and redirects you back to the dashboard. The authorization URL is good for one use, within 10 minutes.
A GitHub account can be linked to only one Nasiko user. Connecting an account that’s already linked to someone else fails with 409 on the callback.
Errors
Check your connection
GET /api/github/user
Whether your account is connected, and whether GitHub still accepts the stored token. The dashboard uses it to show the connected account.
Response 200 OK
Check your token
GET /api/auth/github/token
The same check, in the shape nasiko github status reads. It never returns the token itself.
Response 200 OK when connected:
List repositories
GET /api/github/repositories
The repositories your GitHub account can access. Matches nasiko github repos.
200 OK
Clone and deploy a repository
POST /api/github/clone
Builds an agent from a repository and deploys it. Matches nasiko github clone and the dashboard’s Import from GitHub. The build runs in the background, so the request returns 202 right away.
If you already have an agent with the same name, it’s rebuilt and redeployed in place.
Request body
202 Accepted
success: true means the build was queued, not that it finished. upload_id is the build ID. Follow it with any of these:
GET /api/agents/deploys/{upload_id}/streamstreams status changes until the build succeeds or fails. The CLI and dashboard use this.GET /api/agents/uploads/{upload_id}returns the upload’s current status.GET /api/builds/{upload_id}andGET /api/builds/{upload_id}/logsreturn the build and its output.
A server can also refuse a new agent with its own status and body, for example when a plan’s agent limit is reached.
Disconnect your GitHub account
DELETE /api/github/logout
Deletes your stored GitHub token from Nasiko. Matches nasiko github disconnect. Agents you already built from GitHub keep running. To revoke the app’s access on GitHub’s side too, remove it in your GitHub settings.
Response 200 OK
200.