Auth & Config
This page covers how authentication and local configuration work in the OpenCodeHub CLI.
Authentication
Section titled “Authentication”och auth login --url http://localhost:3000Options:
--url <url>: Instance URL (defaults tohttp://localhost:3000)--with-token: Prompt for a personal access token--token <token>: Non‑interactive token login
Tokens are validated via GET /api/user and are expected to start with the och_ prefix.
Status
Section titled “Status”och auth statusShows the authenticated user, server, and token preview.
Logout
Section titled “Logout”och auth logoutClears the stored token from your local config.
Configuration
Section titled “Configuration”The CLI persists settings locally. View the location at any time:
och config pathCommon keys
Section titled “Common keys”serverUrl: OpenCodeHub server URLtoken: Personal access tokendefaultBranch: Default base branch for PRs (default:main)editor: Editor for interactive inputpager: Pager for long output
List & edit
Section titled “List & edit”och config listoch config get serverUrloch config set serverUrl https://git.example.comoch config unset editorIdentity shortcut
Section titled “Identity shortcut”och whoamiA convenience command that validates your token and prints the username.
Shell completions
Section titled “Shell completions”och completion bashSupported shells: bash, zsh, fish.