Getting Started

Install the Hamster CLI and authenticate with a single command.

Install

Run this in your terminal:

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

The script installs the CLI and opens your browser to sign in. After you approve, the session is transferred back to your terminal and you're ready to go. Credentials are stored securely on your machine — you only need to sign in once.

Initialize a Project

Inside your repository, run:

hamster init

This creates the .hamster/ directory, runs your first sync, and generates the agent skill file. From here, run hamster sync --watch to keep everything up to date as your team works.

Switch Teams

If you belong to multiple Hamster teams, switch between them without re-authenticating:

hamster team

The CLI lists your available teams and lets you select which one to work in.

Automated Environments

For CI/CD pipelines, containers, or sandboxed environments where a browser isn't available, you can authenticate with environment variables instead:

  • HAMSTER_ACCESS_TOKEN — Provide a valid access token directly
  • HAMSTER_REFRESH_TOKEN — Provide a refresh token; the CLI exchanges it for an access token automatically

When environment variables are set, the CLI skips the browser flow entirely.

Remote Environments

For SSH sessions or environments without a browser, hamster auth login supports a one-time code flow. The CLI prints a URL and a code — open the URL on any device, enter the code, and the session is issued to your terminal.

Auto-Update

The CLI checks for updates automatically and shows a progress indicator when downloading a new version. Updates are verified before installing.

Tips

  • Run hamster auth login to re-authenticate or switch accounts at any time.
  • The CLI session is independent from your browser session. Signing out of the web app does not affect it.
  • If your account has multi-factor authentication enabled, the sign-in flow handles it automatically.
  • Authentication tokens refresh transparently. hamster sync --watch runs indefinitely without auth interruptions.
  • Set HAMSTER_ACCESS_TOKEN in your CI/CD environment to use the CLI in automated pipelines without interactive sign-in.

Related