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 --login

Subcommands

SubcommandDescription
listShow 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.
githubConnect GitHub source backing by selecting or creating a repository, then installing the Rebase GitHub App.
gitlabConnect 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.
huggingfaceConnect local Hugging Face auth for model publication through OAuth device-code login.
claudeStore Claude Code credentials in the workspace so hosted hillclimb searches bill your Claude account.
codexStore Codex credentials in the workspace so hosted hillclimb searches bill your ChatGPT account.

GitHub Options

OptionTypeDescription
--profilestrNamed local credential profile.
--api-urlstrRebase API URL to use for this connection. Use this for local development with a port-forwarded API.
--no-browserboolPrint GitHub URLs instead of opening a browser.
--repoowner/nameGitHub repository full name to connect.
--repo-pathstrOptional path inside the connected repository.
--create-repoboolOpen GitHub repository creation before installing the Rebase GitHub App.
--github-installation-idintExisting GitHub App installation ID.
--github-timeoutfloatSeconds to wait for GitHub App installation. Defaults to 300.
--poll-intervalfloatSeconds between GitHub setup status checks. Defaults to 1.0.

GitLab Options

OptionTypeDescription
[REPO]strProject path with namespace, for example group/project. Defaults to the local git origin.
--token, -tstrGitLab access token. Falls back to $GITLAB_ACCESS_TOKEN, then a prompt.
--hoststrGitLab host; self-managed instances are supported. Defaults to gitlab.com.
--scope, -sworkspace or projectConnection scope. Defaults to workspace.
--project, -pstrRebase project name, for --scope project.
--repo-path, -rstrFolder inside the repository, for example projects/x.
--branch, -bstrDefault branch override.
--json, -jflagMachine-readable output.

See GitLab for the full guide.

Hugging Face Options

OptionTypeDescription
--profilestrNamed local credential profile used to read setup configuration.
--api-urlstrRebase API URL to read setup configuration from. Use this for local development with a port-forwarded API.
--client-idstrHugging Face public OAuth app client ID. Defaults to REBASE_HUGGINGFACE_OAUTH_CLIENT_ID, then the Rebase API's setup configuration.
--scopestrHugging Face OAuth scope. Repeat to override the default openid profile email write-repos scopes.
--no-browserboolPrint the Hugging Face authorization URL instead of opening a browser.
--timeoutfloatSeconds to wait for Hugging Face authorization. Defaults to 900.
--poll-intervalfloatSeconds between Hugging Face token polls.
--add-to-git-credential / --no-add-to-git-credentialboolAlso store the token in Git's credential helper for Hugging Face Git operations. Off by default.

Claude Options

OptionTypeDescription
--token, -tstrA token from claude setup-token, or - to read it from stdin, instead of minting one here.
--api-key, -kstrBill an Anthropic API key (ANTHROPIC_API_KEY), or - for stdin, instead of a subscription.
--secret, -sstrWorkspace secret bundle to write. Defaults to hillclimb-claude.
--json, -jflagMachine-readable output.

Codex Options

OptionTypeDescription
--api-key, -kstrBill an OpenAI API key (OPENAI_API_KEY), or - for stdin, instead of the ChatGPT login.
--login, -lflagRun codex login again even when this machine already has a login.
--secret, -sstrWorkspace secret bundle to write. Defaults to hillclimb-codex.
--json, -jflagMachine-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.

On this page