Authenticate
Sign in with the browser device flow, or use an API token for headless and CI environments.
To publish skills or work with private registries, you need to sign in. SkillHub accounts are backed by GitHub, and the CLI supports two ways to authenticate: an interactive browser flow for your own machine, and a token flow for servers and CI.
On a machine with a browser, run:
skillhub loginThis starts a device flow: the CLI prints a short code and opens your
browser so you can confirm the login. Once you approve, the credential is stored
securely in your operating system's keychain. If no keychain is available, it
falls back to a 0600-permission file (readable only by you).
On a server or CI runner there's no browser to open, so authenticate with an API token instead:
skillhub login --token <api-token>Create the token ahead of time with the token command (see the CLI reference for
token create), and give it only the scopes it needs. As with interactive
login, the credential lands in the keychain or the 0600 file fallback.
For ephemeral CI environments where you don't want to persist a credential at
all, set the SKILLHUB_TOKEN environment variable instead of logging in.
When that variable is present, the CLI uses it directly. skillhub whoami will
report the environment as the token source.
Check your identity
Confirm who you're signed in as at any time:
skillhub whoamiThis reports your identity, where the token came from, and which registry URL is in effect.
Sign out
To remove the stored credential for the current registry:
skillhub logoutIf the SKILLHUB_TOKEN environment variable is still set after you log out,
the CLI tells you — that token remains in effect until you unset it.
What's next
With authentication sorted, pick your path: