Skip to main content
The debug command prints diagnostic information about your Copilot API installation. It shows the installed version, the Bun runtime version, the paths used for data storage and configuration, and the authentication status of registered accounts. No server is started and no requests are sent to Copilot.

Usage

npx @nick3/copilot-api@latest debug

Options

OptionDefaultDescription
--jsonfalseOutput all diagnostic information as JSON instead of human-readable text.
The global options (--api-home, --oauth-app, --enterprise-url) also apply.

What debug outputs

Running debug displays information in the following categories:
  • Version — The installed @nick3/copilot-api package version.
  • Runtime — The Bun version used to execute the CLI.
  • Paths — The resolved paths for the data directory (tokens, registry, config) and log files. These paths change when you set --api-home or COPILOT_API_HOME.
  • Authentication status — Whether each registered account has a valid stored token and whether it has been refreshed recently.

Examples

npx @nick3/copilot-api@latest debug

When to use debug

Use debug in the following situations:
  • Before opening a support issue. Share the --json output to give maintainers an accurate picture of your environment without manually collecting version numbers and paths.
  • After changing --api-home or COPILOT_API_HOME. Confirm that the correct data directory is being used.
  • When authentication is failing unexpectedly. The output shows whether tokens are present and whether accounts are in a valid state, which helps narrow down whether the problem is a missing token, wrong data path, or expired credential.
debug reads only from local storage — it does not make network requests to GitHub or the Copilot API. If you need to verify that a token is still accepted by GitHub, run auth ls -q instead.