# Mobile · Git & GitHub

The git toolbar behind the mobile review panel — status, diff, commits, branches, stage, commit, push and pull — plus the GitHub side: repos, branches, imports, Actions runs and the device OAuth flow.

Playground

Send these requests to your own running server. Values stay in this browser.

Not connected

Base URL  Directory _optional_  Bearer token _optional_ 

 

How this works

Start a server with `nikcli serve --hostname 127.0.0.1 --port 4096`. Requests go straight from this page to that address — the browser allows it because loopback counts as a secure origin, and the server allows it because `nikcli-ai.dev` is in its CORS allowlist.

To try things without touching your real sessions or config, start the server with `NIKCLI_TEST_HOME` pointed at a throwaway directory — see [the guided tour](/docs/guides/api-tour).

## Operations

27 endpoints, generated from the server's own [OpenAPI document](/docs/api). Every path also accepts the `directory` and `workspace` query parameters that select which instance handles the request.

<table class="api-index not-prose"><tbody><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-github-repos">/mobile/github/repos</a></td><td class="api-index-id">mobile.github.repos</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-github-repos-owner-repo-branches">/mobile/github/repos/{owner}/{repo}/branches</a></td><td class="api-index-id">mobile.github.branches</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-github-repos-owner-repo-actions-workflows">/mobile/github/repos/{owner}/{repo}/actions/workflows</a></td><td class="api-index-id">mobile.github.actions.workflows</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-github-repos-owner-repo-actions-runs">/mobile/github/repos/{owner}/{repo}/actions/runs</a></td><td class="api-index-id">mobile.github.actions.runs</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-github-repos-owner-repo-actions-runs-runID-jobs">/mobile/github/repos/{owner}/{repo}/actions/runs/{runID}/jobs</a></td><td class="api-index-id">mobile.github.actions.run.jobs</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-github-repos-owner-repo-actions-runs-runID-rerun">/mobile/github/repos/{owner}/{repo}/actions/runs/{runID}/rerun</a></td><td class="api-index-id">mobile.github.actions.run.rerun</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-github-repos-owner-repo-actions-runs-runID-cancel">/mobile/github/repos/{owner}/{repo}/actions/runs/{runID}/cancel</a></td><td class="api-index-id">mobile.github.actions.run.cancel</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-github-repos-owner-repo-actions-workflows-workflowID-dispatch">/mobile/github/repos/{owner}/{repo}/actions/workflows/{workflowID}/dispatch</a></td><td class="api-index-id">mobile.github.actions.workflow.dispatch</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-github-imports">/mobile/github/imports</a></td><td class="api-index-id">mobile.github.imports</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-github-oauth-client">/mobile/github/oauth/client</a></td><td class="api-index-id">mobile.github.oauth.clientId.set</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-github-oauth-device">/mobile/github/oauth/device</a></td><td class="api-index-id">mobile.github.oauth.device.start</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-github-oauth-device-poll">/mobile/github/oauth/device/poll</a></td><td class="api-index-id">mobile.github.oauth.device.poll</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-github-auth">/mobile/github/auth</a></td><td class="api-index-id">mobile.github.auth.set</td></tr><tr><td class="api-index-method"><span class="api-method api-method-delete">delete</span></td><td><a href="#op-delete-mobile-github-auth">/mobile/github/auth</a></td><td class="api-index-id">mobile.github.auth.remove</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-github-import">/mobile/github/import</a></td><td class="api-index-id">mobile.github.import</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-github-session">/mobile/github/session</a></td><td class="api-index-id">mobile.github.session.create</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-git-status">/mobile/git/status</a></td><td class="api-index-id">mobile.git.status</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-git-diff">/mobile/git/diff</a></td><td class="api-index-id">mobile.git.diff</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-git-commits">/mobile/git/commits</a></td><td class="api-index-id">mobile.git.commits</td></tr><tr><td class="api-index-method"><span class="api-method api-method-get">get</span></td><td><a href="#op-get-mobile-git-branches">/mobile/git/branches</a></td><td class="api-index-id">mobile.git.branches</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-git-commit">/mobile/git/commit</a></td><td class="api-index-id">mobile.git.commit</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-git-checkout">/mobile/git/checkout</a></td><td class="api-index-id">mobile.git.checkout</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-git-stage">/mobile/git/stage</a></td><td class="api-index-id">mobile.git.stage</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-git-unstage">/mobile/git/unstage</a></td><td class="api-index-id">mobile.git.unstage</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-git-discard">/mobile/git/discard</a></td><td class="api-index-id">mobile.git.discard</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-git-push">/mobile/git/push</a></td><td class="api-index-id">mobile.git.push</td></tr><tr><td class="api-index-method"><span class="api-method api-method-post">post</span></td><td><a href="#op-post-mobile-git-pull">/mobile/git/pull</a></td><td class="api-index-id">mobile.git.pull</td></tr></tbody></table>

### Repos

get /mobile/github/repos [#](#op-get-mobile-github-repos) `mobile.github.repos`

Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| directory | query | string | optional |
| workspace | query | string | optional |

Responses

200 Success application/json

unknown\[\]

400 MobileBadRequest application/json

{
  name: "BadRequest"
  error: string
}

401 MobileUnauthorized application/json

{
  name: "Unauthorized"
  error: string
}

Example response from schema

\[\]

Generated from the response schema — field values are placeholders, the shape is real.

SDK example

mobile.github.repos

ts 

1

2

3

4

5

6

```
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"

const client = createNikcliClient()
await client.mobile.github.repos({
  ...
})
```

Try it

directory _query_  workspace _query_

---

Source: https://nikcli-ai.dev/docs/api/mobile-git
