CLI login
amendable loginOptional flags from amendable login --help:
amendable login --hostname my-laptopamendable login --poll-seconds 1--hostname is the label shown on the grant page. It defaults to this machine’s hostname. --poll-seconds is how often the CLI polls until the grant succeeds. Default is 2.
What happens:
POST /v1/auth/sessionswith this machine’s hostname (or--hostname)- The CLI prints a short code and
https://amendable.io/access-tokens/create?auth_session_id=... - Your browser opens. Confirm the code. Grant a token (Grant All is fine for a laptop)
- The CLI polls
https://api.amendable.iountil 200 and writes the secret to the config file
If you cannot use a browser, create a token in the UI and:
export AMENDABLE_TOKEN='...'# or put token = "..." in the config fileamendable whoamiamendable logoutremoves the stored token.
Git credential helper
Section titled “Git credential helper”git config --global credential.https://amendable.io.helper '!amendable git-credential'Then git clone https://amendable.io/r/USER/REPO.git does not need the token in the URL. The helper only implements get.