jrt.new

Install jrt the easy way

Installs jrt to ~/.local/bin (Mac/Linux) or %USERPROFILE%\.local\bin (Windows).

Copy the installation command:
/bin/bash -c "$(curl -fsSL https://xentixar.github.io/jrt-builds/install/mac)"
  1. Open Terminal (Spotlight: ⌘ Space → type Terminal → Return).
  2. Paste the command and press Return.
After install
jrt version
jrt auth login --app-password
Auth (API token + OAuth consumer)

`jrt` supports both API token auth (recommended) and OAuth consumer auth.

API token auth (recommended)

  1. In Bitbucket, open Personal settings → API tokens and create a token.
  2. Grant scopes you need, such as: read:user:bitbucket, read:repository:bitbucket, write:repository:bitbucket, admin:repository:bitbucket, read:workspace:bitbucket, admin:workspace:bitbucket.
  3. Add optional scopes for commands you use: pullrequest:*:bitbucket, pipeline:*:bitbucket, issue:*:bitbucket, snippet:*:bitbucket.
  4. Login from jrt:
    jrt auth login --app-password
    # Bitbucket username: your Atlassian email (e.g. you@example.com)
    # Bitbucket app password: <paste the API token>

OAuth consumer auth

  1. Create a Bitbucket OAuth consumer.
  2. Add a local callback redirect URL (for example http://127.0.0.1:<port>/oauth/callback).
  3. Log in with consumer credentials:
    # with flags
    jrt auth login --client-id "$BKT_CLIENT_ID" --client-secret "$BKT_CLIENT_SECRET"
    
    # or via env vars
    export BKT_CLIENT_ID="..."
    export BKT_CLIENT_SECRET="..."
    jrt auth login