Skip to main content

Documentation Index

Fetch the complete documentation index at: https://onecli.sh/docs/llms.txt

Use this file to discover all available pages before exploring further.

OneCLI supports two ways to connect GitHub:
MethodBest forAccess scope
GitHub OAuthQuick personal setupAll repos the user can see
GitHub AppTeams and organizationsOnly selected repos
GitHub App connections give you repo-level access control and organizational visibility. Org admins can see which repos are connected and approve or revoke access at any time.

How it works

When you connect a GitHub App through OneCLI:
  1. You’re redirected to GitHub to install the app on your account or organization
  2. You choose exactly which repositories the app can access
  3. OneCLI receives a short-lived installation token (1 hour TTL) that’s automatically refreshed
  4. Your agents use this token to interact with GitHub APIs — scoped to only the repos you selected

Setup

1

Go to Connections

Open the OneCLI dashboard and navigate to ConnectionsGitHub App.
2

Configure credentials (self-hosted only)

If you’re using OneCLI Cloud, skip this step — platform credentials are pre-configured.For self-hosted, you need to create a GitHub App and enter your App ID, App Slug, and Private Key in the custom credentials form.Your GitHub App should have:
  • Setup URL: https://<your-onecli-url>/api/apps/github-app/callback
  • Redirect on update: Checked
  • Webhook: Inactive (not required)
3

Install the app

Click Connect GitHub App. You’ll be redirected to GitHub where you can:
  • Select the organization or personal account
  • Choose All repositories or Only select repositories
  • Review the permissions the app requests
Click Install to complete the connection.

Permissions

The GitHub App requests only the permissions your agents need:
PermissionAccessDescription
ContentsRead & writeCode, commits, and branches
IssuesRead & writeCreate and manage issues
Pull requestsRead & writeCreate, review, and merge PRs
MetadataRead-onlyRepository metadata (always granted)
ActionsRead-onlyView workflow runs
Permissions are set at the app level. To change them, update the app’s configuration in your GitHub App settings.

Managing access

After connecting, you can modify which repositories the app can access:
  1. Go to ConnectionsGitHub App in the OneCLI dashboard
  2. Click Manage on the connection
  3. You’ll be taken to GitHub’s installation settings where you can add or remove repositories

GitHub App vs OAuth App

GitHub AppOAuth App
Repo accessOnly selected reposAll repos the user can see
Token lifetime1 hour (auto-refreshed)Long-lived
Org visibilityVisible to org adminsInvisible
Org approvalRequiredNot required
Best forTeams, productionPersonal, quick start