Skip to main content
The start command launches the Copilot API proxy server. It listens for incoming OpenAI-compatible and Anthropic-compatible requests, translates them into GitHub Copilot API calls, and streams responses back to your client. If you have not authenticated yet, start handles the GitHub OAuth device flow automatically before the server starts.

Usage

npx @nick3/copilot-api@latest start [options]

Options

Start command options

OptionAliasDefaultDescription
--port-p4141Port the proxy server listens on.
--verbose-vfalseEnable verbose logging to the console.
--account-type-aindividualGitHub Copilot plan: individual, business, or enterprise.
--manualfalsePause each request for manual approval in the terminal before forwarding.
--rate-limit-rnoneMinimum seconds between requests. Requests that arrive before the cooldown expires are rejected.
--wait-wfalseWhen combined with --rate-limit, hold requests in a queue until the cooldown expires instead of returning an error.
--github-token-gnoneProvide a GitHub token directly instead of running the interactive OAuth flow. The token must be generated via auth add.
--claude-code-cfalseAfter the server starts, display an interactive prompt to select models and generate a Claude Code launch command, which is copied to your clipboard.
--show-tokenfalsePrint the GitHub and Copilot tokens to the console whenever they are fetched or refreshed.
--proxy-envfalseInitialize HTTP/HTTPS proxy settings from the HTTP_PROXY and HTTPS_PROXY environment variables.

Global options

Pass global options before the subcommand using the --key=value form.
OptionDefaultDescription
--api-homenonePath to the data directory where tokens and config are stored. Sets COPILOT_API_HOME.
--oauth-appnoneOAuth app identifier. Use opencode to authenticate as the opencode app. Sets COPILOT_API_OAUTH_APP.
--enterprise-urlnoneGitHub Enterprise hostname (for example company.ghe.com). Sets COPILOT_API_ENTERPRISE_URL.
Global options must use --key=value syntax when placed before the subcommand. For example: npx @nick3/copilot-api@latest --oauth-app=opencode start.

Examples

npx @nick3/copilot-api@latest start
If you use OpenCode, start with --oauth-app=opencode. This uses OpenCode’s OAuth credentials rather than the default device flow, which is identical to OpenCode’s built-in Copilot provider and carries no additional Terms of Service risk.