Skip to content

Session & workspaces

These commands manage who you are signed in as and where commands go. The shared options (-v, and -e / -a / -c where marked) are described in Getting started.

Sign in and store an encrypted session token for the endpoint. Supports MFA: if the account requires it, you are prompted for the verification code.

GenieClient auth -u <user> -p <password> [-e <url>]
Parameter Type Required Default Description
-u, --user text yes — Username or email of the account. Use a System-role account if you will run execute-script or switch companies freely.
-p, --password text yes — The account’s password. Quote it if it contains shell characters.
-e, --endpoint URL no saved endpoint, else http://localhost:5174 Deployment to sign in to. The token is stored in that endpoint’s workspace.
Terminal window
GenieClient auth -u system@example.com -p '<password>'
GenieClient auth -u system@example.com -p '<password>' -e https://staging.example.com

Check that the deployment is reachable, that sign-in works, and whether the account holds the System role (needed by execute-script).

GenieClient health [-e <url>] [-a] [-c <company>]

Takes only the common options.

Terminal window
GenieClient health
GenieClient health -e https://staging.example.com -a # force a fresh sign-in

Save the default API URL used by every later command that has no -e. Stored in the global config.json.

GenieClient set-endpoint -e <url>
Parameter Type Required Default Description
-e, --endpoint URL yes — The API base URL to remember, e.g. http://localhost:5290.
Terminal window
GenieClient set-endpoint -e http://localhost:5290

Set the company that later commands act in for this workspace. The company is looked up on the server, checked against your memberships, and saved in the workspace’s workspace.json. By default nothing changes on the server.

GenieClient set-company -c <id-or-name> [--persist-default] [-e <url>] [-a]
Parameter Type Required Default Description
-c, --company text (id or name) yes — The company to use: a number is a company id, anything else is matched by name.
--persist-default flag no off Also save it as the account’s default company on the server. This is durable and also changes which company the account lands in when it signs in to the web app. Leave it off unless you want that.
Terminal window
GenieClient set-company -c 2
GenieClient set-company -c "Head Office"
GenieClient set-company -c "Head Office" --persist-default

To act in another company for one command only, pass -c to that command instead.

List the known workspaces — one per endpoint you have signed in to — with their saved company and whether a valid token is stored.

GenieClient workspaces

No parameters besides -v.

Delete a workspace’s stored token, so the next command against that endpoint signs in again. The workspace’s saved company is kept.

GenieClient workspace-forget <endpoint>
Parameter Type Required Description
<endpoint> (positional) URL yes The endpoint whose token to forget, as you used it with -e (a trailing / or /api/v1 is ignored).
Terminal window
GenieClient workspace-forget http://localhost:5290