Using either hirotaskmanager or hirotm CLI commands, you can start, stop or check Hiro Task Manager Server status. While both commands are available, AI Agents are usually encouraged to use hirotm for everything.server start/stop/status only act on server-role profiles. Running them against a client-role profile (one with api_url pointing at a remote server) errors with code: invalid_args — there is no local server to start.
Starts the local API if it is not already healthy on that port. By default, the process detaches and hirotm prints JSON on success. Use --foreground when you want startup logs to stay attached to the terminal.
Option
Type
Required
Description
-b, --background
flag
Optional alias for the default detached start behavior.
--foreground
flag
Keep the server attached to the terminal and show startup logs.
--profile <name>
string
Profile for this command (same flag as the global root option; place it after server … in examples). The API port and data paths come from that profile’s config.json (see Profiles).
CLI Examples
hirotm server starthirotm server start --profile workhirotm server start --foreground --profile work
AI Agent Examples
Start Task Manager in the background on a named profile so API commands work.
Foreground modeWith --foreground, the command waits until the API is healthy, then keeps running and forwards SIGINT / SIGTERM to the server. Use this when you want startup errors and logs in the terminal. If the API is already up on that port, the command returns immediately without spawning another process (no JSON line in that case).
Stops a background server that hirotm server start recorded in the CLI pid file for this profile. It does not stop arbitrary processes on the port; if there is no pid file, the command fails with guidance.
Option
Type
Required
Description
--profile <name>
string
Profile whose pid file and port resolution this command uses (see Profiles).
CLI Examples
hirotm server stophirotm server stop --profile work
Run hirotm help server, hirotm help server start, hirotm help server stop, or hirotm help server status for the exact flags your installed CLI exposes.
If you specifically want the installed package entry instead of whatever hirotm resolves to on PATH, use hirotaskmanager.The installed launcher exposes:
hirotaskmanager server starthirotaskmanager server start --profile workhirotaskmanager server statushirotaskmanager server status --profile workhirotaskmanager server stophirotaskmanager server stop --profile work
These are installed-runtime launcher commands:
server start starts in the background by default and prints concise human progress text.
server stop prints concise human progress text such as “Stopping Server” and “Server stopped”.
server status prints the same JSON status shape as hirotm server status.
hirotaskmanager server status returns the same status JSON shape as hirotm server status and /api/health when the server is up.Example:
While Server setup usually helps you generate a CLI key, there are some cases where you might need to generate a new key, or revoke an existing key.This set of hirotaskmanager commands help generate, list and revoke CLI API keys. Learn more about CLI API keys in Concepts and Advanced setup.Notes
These commands should run on the server side, not the client side, unless it is a local setup.
Keys are stored in the server profile’s auth directory.
They do not require the HTTP server to be running.
They only run against server profiles.
api-key generate prints the raw key to stdout exactly once. Copy it immediately — only the hash is stored on the server, so the raw value cannot be recovered later. Lost keys must be revoked and re-issued.
hirotaskmanager server api-key generateGenerates a random 32-byte key, formats it as tmk-<64 hex chars>, stores its hash in cli-api-keys.json, and prints the raw key.
Option
Type
Required
Description
--label <text>
string
Free-form label stored alongside the hash (e.g. "Desktop", "Cursor Agent") — shown by api-key list.
--save-to-profile
flag
Also writes the new key into the active server profile’sapi_key field, so the local CLI authenticates immediately.
--profile <name>
string
Server profile whose auth dir to write into (~/.taskmanager/profiles/<name>/auth/).
Examples
hirotaskmanager server api-key generate --label "Desktop"hirotaskmanager server api-key generate --label "Local CLI" --save-to-profile
hirotaskmanager server api-key listLists all issued keys for the active server profile. Shows id (the first ~8 hex chars), label, and createdAt. Never shows the full key or its hash.
The raw key is stored in the client-side profile’sconfig.json as api_key:
For a client profile (the typical remote case): paste it during hirotaskmanager --setup-client, or edit the file by hand.
For a server profile that has require_cli_api_key: true (the hardened single-host case): use --save-to-profile on generate so the local CLI authenticates without further setup.