rebase connect
Connect external services to the active workspace.
Synopsis
rebase connect list
rebase connect github
rebase connect github --repo rebase-energy/rebase-workspace
rebase connect github --create-repo
rebase connect gitlab group/project --token <token>
rebase connect huggingface
rebase connect huggingface --scope openid --scope write-repos
rebase connect claude
rebase connect claude --api-key -
rebase connect codex
rebase connect codex --loginSubcommands
| Subcommand | Description |
|---|---|
list | Show what is connected: GitHub and GitLab repos and the Claude / Codex credentials of the active workspace, and this machine's Hugging Face login. --json for scripts. |
github | Connect GitHub source backing by selecting or creating a repository, then installing the Rebase GitHub App. |
gitlab | Connect a GitLab repository with an access token. The token is validated against GitLab, stored in Secret Manager, and used for repo reads, starter workflows, and promotion merge requests. Reconnecting rotates the stored token. |
huggingface | Connect local Hugging Face auth for model publication through OAuth device-code login. |
claude | Store Claude Code credentials in the workspace so hosted hillclimb searches bill your Claude account. |
codex | Store Codex credentials in the workspace so hosted hillclimb searches bill your ChatGPT account. |
GitHub Options
| Option | Type | Description |
|---|---|---|
--profile | str | Named local credential profile. |
--api-url | str | Rebase API URL to use for this connection. Use this for local development with a port-forwarded API. |
--no-browser | bool | Print GitHub URLs instead of opening a browser. |
--repo | owner/name | GitHub repository full name to connect. |
--repo-path | str | Optional path inside the connected repository. |
--create-repo | bool | Open GitHub repository creation before installing the Rebase GitHub App. |
--github-installation-id | int | Existing GitHub App installation ID. |
--github-timeout | float | Seconds to wait for GitHub App installation. Defaults to 300. |
--poll-interval | float | Seconds between GitHub setup status checks. Defaults to 1.0. |
GitLab Options
| Option | Type | Description |
|---|---|---|
[REPO] | str | Project path with namespace, for example group/project. Defaults to the local git origin. |
--token, -t | str | GitLab access token. Falls back to $GITLAB_ACCESS_TOKEN, then a prompt. |
--host | str | GitLab host; self-managed instances are supported. Defaults to gitlab.com. |
--scope, -s | workspace or project | Connection scope. Defaults to workspace. |
--project, -p | str | Rebase project name, for --scope project. |
--repo-path, -r | str | Folder inside the repository, for example projects/x. |
--branch, -b | str | Default branch override. |
--json, -j | flag | Machine-readable output. |
See GitLab for the full guide.
Hugging Face Options
| Option | Type | Description |
|---|---|---|
--profile | str | Named local credential profile used to read setup configuration. |
--api-url | str | Rebase API URL to read setup configuration from. Use this for local development with a port-forwarded API. |
--client-id | str | Hugging Face public OAuth app client ID. Defaults to REBASE_HUGGINGFACE_OAUTH_CLIENT_ID, then the Rebase API's setup configuration. |
--scope | str | Hugging Face OAuth scope. Repeat to override the default openid profile email write-repos scopes. |
--no-browser | bool | Print the Hugging Face authorization URL instead of opening a browser. |
--timeout | float | Seconds to wait for Hugging Face authorization. Defaults to 900. |
--poll-interval | float | Seconds between Hugging Face token polls. |
--add-to-git-credential / --no-add-to-git-credential | bool | Also store the token in Git's credential helper for Hugging Face Git operations. Off by default. |
Claude Options
| Option | Type | Description |
|---|---|---|
--token, -t | str | A token from claude setup-token, or - to read it from stdin, instead of minting one here. |
--api-key, -k | str | Bill an Anthropic API key (ANTHROPIC_API_KEY), or - for stdin, instead of a subscription. |
--secret, -s | str | Workspace secret bundle to write. Defaults to hillclimb-claude. |
--json, -j | flag | Machine-readable output. |
Codex Options
| Option | Type | Description |
|---|---|---|
--api-key, -k | str | Bill an OpenAI API key (OPENAI_API_KEY), or - for stdin, instead of the ChatGPT login. |
--login, -l | flag | Run codex login again even when this machine already has a login. |
--secret, -s | str | Workspace secret bundle to write. Defaults to hillclimb-codex. |
--json, -j | flag | Machine-readable output. |
Flow
rebase connect github uses the active workspace profile saved by rebase setup. It connects at workspace scope, asks for the repository, opens GitHub App installation, verifies app access, then makes sure the current folder is a checkout of the repository, cloning it or adding origin when needed. Project-scoped connections are created through the API.
GitOps-protected environments depend on this connection. After rebase connect github, rebase deploy <file> --env prod can verify the local repository, require clean committed source, and create a GitOps deployment request instead of a direct deploy.
rebase connect huggingface starts Hugging Face OAuth device-code login, opens the Hugging Face authorization page, polls until authorization completes, then saves the token with huggingface_hub. Existing model publication code can then use HuggingFacePublishConfig(token=None).
Agent credentials for hosted searches
A hosted search (rebase hillclimb start) runs the
agent CLIs inside a platform job. rebase connect claude and rebase connect codex
put the credentials of the CLIs on your machine into workspace secrets so that job
bills your own account rather than the platform's.
rebase connect claude runs claude setup-token on your terminal (a browser login
that mints a long-lived subscription token), captures the token it prints, and stores
it as CLAUDE_CODE_OAUTH_TOKEN in the workspace secret hillclimb-claude. If the
token is not picked up automatically you are asked to paste it. Pass --api-key to
store an ANTHROPIC_API_KEY instead.
rebase connect codex reads the codex CLI's login ($CODEX_HOME/auth.json, default
~/.codex/auth.json), running codex login first when there is none, and stores the
file as CODEX_AUTH_JSON in the workspace secret hillclimb-codex. The hosted job
writes it back to the codex CLI's home before the search starts. Pass --api-key to
store an OPENAI_API_KEY instead. A ChatGPT login refreshes its tokens over time; if
hosted Codex searches start failing to authenticate, run rebase connect codex again.
Each connector owns its bundle and replaces it on every run. rebase hillclimb start
attaches every one of hillclimb, hillclimb-claude and hillclimb-codex that
exists; with only Codex connected it picks the codex backend by itself, otherwise
choose with --backend. Values go to Secret Manager and are never stored or shown by
Rebase; the CLIs' own config on the job is readable by the code the agents write, as it
is on your machine.

