---
name: forgehand-account
description: Sign in to Forgehand, set up SSH access or the fh CLI, and manage a user's profile and access tokens.
---

# Forgehand account

Use the user's Forgehand instance; the default web address is `https://app.forgehand.app`. Use existing browser access for web steps and `fh` for CLI steps. Check `fh --help` if the installed CLI differs from these instructions.

## Sign in and SSH setup

- In the browser, open `/login`, enter the user's email, then enter the six-digit emailed code. GitHub sign-in appears only when that instance has it enabled.
- Compute onboarding uses an SSH public-key form. For LLM-only access, open `/settings` and `/usage` directly; neither needs an SSH key. Follow the key selection steps below only when setting up compute access. Keys can later be added or removed under **Settings → SSH keys**. They are installed for `root` on the user's team sessions.
- **Settings → Profile** changes the displayed name. **Sign out** is in the app navigation.

## CLI access

Install with `npm install -g @qforge/forgehand` (Node.js 24 or newer), then run `fh login` and enter the emailed code. For another instance use `fh login --url <instance-url>`. Verify with `fh whoami`. `fh login --token <token>` accepts a personal access token created under **Settings → Access tokens**; the value is shown once. The CLI's emailed-code flow creates a one-year token on the user's behalf.

`FORGEHAND_URL` and `FORGEHAND_TOKEN` override saved CLI configuration; `FORGEHAND_CONFIG_DIR` changes its location. Use a secret environment variable for tokens in automation. Revoke an unused or exposed token under **Settings → Access tokens**. The CLI does not currently manage profile fields or token revocation.

## LLM access

The same Forgehand personal access token authenticates the team-scoped LLM API. Use `fh whoami --json` for team UUIDs; no Azure credentials are needed. CLI login saves a token but does not export `FORGEHAND_TOKEN` for SDKs. Supply a token securely to your application and follow the bundled `forgehand-llm` skill for the base URL, requests, and credits. Do not create a workspace or GPU session solely to use the LLM API.

## Add an SSH key

1. Check for an existing default key pair, starting with `~/.ssh/id_ed25519` and `~/.ssh/id_ed25519.pub`, then `id_ecdsa` or `id_rsa`. Use an existing pair when both files are present. If a private key exists but its `.pub` file is missing, derive the public key with `ssh-keygen -y -f <private-key> > <private-key>.pub` after confirming the destination does not exist. If only a `.pub` file exists, look for its matching private key before using it; a public key alone will not let the user connect.
2. If there is no usable default pair, create a new Ed25519 pair with `ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519` when that path is free. If it is occupied, choose a new filename and use its `.pub` path explicitly. Never overwrite a key. Let the user choose a passphrase; do not read, print, copy, or upload the private key.
3. Register **only** the `.pub` file. In the browser, paste its contents into the onboarding form or **Settings → SSH keys**. With the CLI, run `fh login` if needed (the user enters the emailed code), then `fh ssh-key add [public-key-file]`. With no file argument, `fh ssh-key add` reads `~/.ssh/id_ed25519.pub`; use an explicit path for any other key. `fh ssh-key ls` lists registered keys, and `fh ssh-key rm <key-id>` removes one.
4. If the agent registered a key through the CLI while the onboarding page is open, return to that page and select **Continue after the key is added**. The browser then detects the key and opens the app.

To equip the agent with Forgehand workflows, run `fh skills install`; `fh skills install --agent claude` targets Claude Code, and `--project` installs into the current project. `fh skills list` shows what is bundled.
