{"id":16475962,"url":"https://github.com/softprops/octopat","last_synced_at":"2025-10-27T16:31:27.384Z","repository":{"id":57648243,"uuid":"265742598","full_name":"softprops/octopat","owner":"softprops","description":":octocat: :key: GitHub personal access token dispenser","archived":false,"fork":false,"pushed_at":"2020-05-25T23:20:38.000Z","size":377,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-18T00:10:19.004Z","etag":null,"topics":["cli","github-api","oauth2"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softprops.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-21T03:11:10.000Z","updated_at":"2023-04-20T18:26:45.000Z","dependencies_parsed_at":"2022-09-08T00:02:01.035Z","dependency_job_id":null,"html_url":"https://github.com/softprops/octopat","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Foctopat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Foctopat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Foctopat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softprops%2Foctopat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softprops","download_url":"https://codeload.github.com/softprops/octopat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219861024,"owners_count":16556007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","github-api","oauth2"],"created_at":"2024-10-11T12:41:04.134Z","updated_at":"2025-10-27T16:31:22.005Z","avatar_url":"https://github.com/softprops.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  :octocat: :key:\n  \u003cbr/\u003e\n  octopat\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n   An interactive GitHub personal access token command line dispenser ✨\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/softprops/octopat/actions\"\u003e\n\t\t\u003cimg src=\"https://github.com/softprops/octopat/workflows/Main/badge.svg\"/\u003e\n\t\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"demo.png\"/\u003e\n\u003c/div\u003e\n\n## Why\n\nI often find myself needing to [generate personal access tokens](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line#using-a-token-on-the-command-line) for GitHub integrations and API access. I'm often working from the command line. Pausing to navigate though GitHub settings pages interrupts my flow.\n\nOctopat is designed as a command line interface to work with my command line flow, not against it.\n\n## Install\n\n### Homebrew (on osx)\n\n```sh\n$ brew install softprops/tools/octopat\n```\n\nIf you want to upgrade to newer versions, use `brew upgrade`. This will install the latest version.\n\n```sh\n$ brew upgrade softprops/tools/octopat\n```\n\n### Cargo install (rust users)\n\n```sh\n$ cargo install octopat\n```\n\n### GitHub Releases\n\nYou can download and install install precompiled binaries from a [GitHub Releases](https://github.com/softprops/octopat/releases) page.\n\nYou can programmatically install these using curl as well\n\n```sh\n$ cd $HOME/bin\n$ curl -L \"https://github.com/softprops/octopat/releases/download/v0.1.0/octopat-$(uname -s)-$(uname -m).tar.gz\" \\\n  | tar -xz -C ~/bin\n```\n\n## How it works\n\nIn a nutshell, octopat is an embedded oauth application that copies access tokens to your clipboard.\n\n1. When running octopat for the first time, you will be prompted for a set of GitHub app credentials. If you do not have a GitHub app go ahead an [create one here](https://developer.github.com/apps/building-oauth-apps/creating-an-oauth-app/). You will be asked for a for a few pieces of information when creating an app, a name and an Authorization URL.  \n  \n\u003e It's name doesn't matter but you may want to use \"octopat\" for clarity.  \n  \nYou will also be asked for Authorization callback URL. Set this to \"http://localhost:4567/\" which will be the url of the embedded octopat application running on your local host.  \n  \n\u003e If you wish to use a different port, do so but provide it with the `-p` flag on the command line.  \n  \nOctopat will store these credentials securely on your local keychain so that you won't have to remember them on each run.\n\n2. GitHub access tokens are scoped to specific capabilities. You'll be presented with a list of scopes to select from then be taken to GitHub to authorize access (to your own GitHub app).  \n\nGitHub will then redirect your browser to a server embedded within the cli that will receive the authorization information and exchange it for an access token before copying it to your clipboard.\n\nAt no point is secret information stored insecurely or printed out.\n\n## Revoking tokens\n\nSince octopat is just an oauth application you can revoke tokens the [way you normally  would](https://help.github.com/en/github/authenticating-to-github/reviewing-your-authorized-applications-oauth)\n\nThere is a tradeoff with the oauth approach to generating tokens. You don't have an index for revoking one vs another. You can only revoke access given to a Github app. How do you overcome this tradeoff? You can make more than one GitHub app, one per category\nof application you are building. `octopat` accepts an `--alias` flag so that you can target a specific app when provisioning new tokens.\n\n## Why the oauth dance\n\nThis CLI uses the [web application oauth flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to dispense personal access tokens. Historically this has also been possible through a separate authorizations API which is [now deprecated](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/).\n\nDoug Tangren (softprops) 2020","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Foctopat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftprops%2Foctopat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftprops%2Foctopat/lists"}