Sign in from a terminal or a script
The browser sign-in, a key for scripts and CI, where it is stored, and signing out.
In a terminal: the browser sign-in
hostemi login starts a device sign-in: it opens the Hostemi page in your browser, you sign in and approve this computer, and the CLI stores the key it receives. Nothing to copy, no password typed into the terminal, and no booking platform login is involved.
Without a terminal (a script, an agent) it never waits by default: it prints the sign-in link on stderr and exits with code 3. Add --wait to keep waiting for the approval instead.
Where the key is kept
| What | Where |
|---|---|
| Config file | ~/.config/hostemi/config.json (or $XDG_CONFIG_HOME/hostemi/config.json), readable only by you (mode 600, folder 700) |
| Sign out | hostemi logout removes the stored key |
| Check | hostemi whoami shows which API the key talks to, and whether it still works |
Scripts and CI: a key
Create a key in Hostemi under Settings, AI & apps (an API key starts with hst_). Pass it in HOSTEMI_TOKEN: it wins over a stored key and is never written to disk. Or store it once from stdin, which checks it first:
Environment
export HOSTEMI_TOKEN=hst_your_key
hostemi bookings --jsonStore once
hostemi login --token-stdin < key.txtGitHub Actions
env:
HOSTEMI_TOKEN: ${{ secrets.HOSTEMI_TOKEN }}
steps:
- run: npm i -g hostemi
- run: hostemi pricing pace --json > pace.jsonNot signed in
hostemi whoamiError: Not signed in.
Run: hostemi login (or set HOSTEMI_TOKEN).Another API address
--api <url> or HOSTEMI_API_URL point the CLI at another API (the default is https://api.hostemi.com); HOSTEMI_APP_URL changes where approval links point.