CLI Authentication

Install the Hamster CLI and connect it to your account with a single command.

Overview

The Hamster CLI is a command-line tool called task-master. It connects to your Hamster account and lets you view tasks, switch brief context, and manage work from the terminal. Authentication uses a browser-based login flow — the CLI opens your browser, you sign in with your existing Hamster credentials, and the session is transferred back to your terminal automatically. For remote or SSH environments where a browser is not available, a one-time code flow is also supported.

How It Works

  1. Run the setup command — Paste the following into your terminal and press Enter:

    curl -s https://tryhamster.com/cli | bash
    

    The script checks for Node.js, installs task-master-ai globally via npm if it is not already present, and adds tm and taskmaster as shell aliases in your ~/.zshrc or ~/.bashrc.

  2. Sign in — The CLI runs task-master auth login, which opens your default browser to a Hamster sign-in page. A banner on the page confirms that you are signing in to authorize your CLI. Sign in with your Hamster email and password, or with any social provider your account already uses.

  3. Authorize the session — After you sign in, the CLI is authorized and ready to use. Signing out of Hamster in the browser does not affect your CLI session. If you have multi-factor authentication enabled on your account, you will be prompted to complete that step before authorization completes.

  4. Select context — If the setup command was not launched from a specific brief, the CLI prompts you to select your organization and then your brief. Once a brief is selected, the CLI lists your current tasks and confirms it is ready to use.

Key Capabilities

  • Browser-based OAuth: The default flow opens your browser for sign-in and returns the session to the terminal. You do not need to copy tokens or credentials manually.
  • One-time code flow: For SSH sessions and environments without a browser, task-master auth login supports a code-based alternative. Follow the prompt displayed in your terminal.
  • Persistent CLI access: Signing out of Hamster in the browser does not affect your CLI. You stay authenticated until you explicitly sign out or your session expires.
  • MFA support: If your account has multi-factor authentication enabled, the browser-based flow handles the MFA step before issuing the CLI session.
  • Brief-scoped setup: Running the setup command from a specific brief page — via the "Open in CLI" button — pre-fills the brief context, so you skip the organization and brief selection step entirely.
  • Shell aliases: The installer adds tm and taskmaster as aliases for task-master in your shell configuration file, so you can type tm list instead of task-master list.

Tips

  • Run task-master auth login at any time to re-authenticate or switch accounts.
  • Run task-master context to see which organization and brief are currently active.
  • If the browser does not open automatically, the CLI prints a URL you can copy and paste manually.
  • To switch between briefs after the initial setup, run task-master context brief and choose from the list.
  • The CLI session persists across terminal sessions. You only need to authenticate once unless you sign out or your session expires.

Related