
When we built a command-line tool and a VS Code extension for publishing project docs to our Console, we needed a way for them to sign in. The obvious route, reusing the browser login, was the wrong one. A terminal is a place where credentials leak: shell history, screen shares, a stray .env file.
So we gave the tools their own door, and made it narrow.
Each staff member creates a personal access token in Settings. A few decisions shaped it:
The key idea is that a token is accepted by name, on a short list of routes: reading who you are and your projects, reading and writing a project's README and changelog, uploading pictures and source, and announcing a push. Anything else answers with a clear TOKEN_SCOPE error.
We chose an allowlist because blocklists fail quietly. Add a new endpoint next month and a blocklist exposes it by default. An allowlist keeps it closed until someone decides otherwise. A leaked token can never reach billing, people, chat or token management.
A token acts as its owner, so the usual permission checks still run. A viewer cannot push. A project on hold cannot be changed. The token narrows what is reachable and never widens what the person may do.
None of this is exotic. It is the discipline of deciding, before shipping, what the smallest useful key looks like.