Harthelm Docs

hart login

Sign in and save an API key in a context

Generated from cmd/hart at v1.5.0

Signs in to a Harthelm console and saves a new API key in a context of the contexts file, which becomes the current one.

By default hart opens the console in the browser; after you approve there, the console hands back to hart on 127.0.0.1. With --code (the default over SSH and inside workspaces) hart prints a link and a code to approve on any device. With --token it reads an existing key (hart_...) from stdin.

The context is named after the console's host unless --context names it; -t and -w set its default team and workspace.

hart login [flags]

Examples:

hart login --api https://console.example.org
hart login --code
hart login --token < key.txt
FlagDescription
--codeapprove with a code on any device instead of this machine's browser
--name stringname of the new API key (default "hart on <hostname>")
--no-browserprint the console link instead of opening the browser
--tokenread an existing API key from stdin