OneCLI supports two ways to connect GitHub: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.
| Method | Best for | Access scope |
|---|---|---|
| GitHub OAuth | Quick personal setup | All repos the user can see |
| GitHub App | Teams and organizations | Only selected repos |
How it works
When you connect a GitHub App through OneCLI:- You’re redirected to GitHub to install the app on your account or organization
- You choose exactly which repositories the app can access
- OneCLI receives a short-lived installation token (1 hour TTL) that’s automatically refreshed
- Your agents use this token to interact with GitHub APIs — scoped to only the repos you selected
Setup
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)
Permissions
The GitHub App requests only the permissions your agents need:| Permission | Access | Description |
|---|---|---|
| Contents | Read & write | Code, commits, and branches |
| Issues | Read & write | Create and manage issues |
| Pull requests | Read & write | Create, review, and merge PRs |
| Metadata | Read-only | Repository metadata (always granted) |
| Actions | Read-only | View workflow runs |
Managing access
After connecting, you can modify which repositories the app can access:- Go to Connections → GitHub App in the OneCLI dashboard
- Click Manage on the connection
- You’ll be taken to GitHub’s installation settings where you can add or remove repositories
GitHub App vs OAuth App
| GitHub App | OAuth App | |
|---|---|---|
| Repo access | Only selected repos | All repos the user can see |
| Token lifetime | 1 hour (auto-refreshed) | Long-lived |
| Org visibility | Visible to org admins | Invisible |
| Org approval | Required | Not required |
| Best for | Teams, production | Personal, quick start |