Sessions
| Command | Does |
|---|---|
machine login |
Sign in |
machine sessions |
List and manage sessions |
machine notices |
Show the notices in effect now |
machine ping |
Check reachability and latency |
machine account |
Show and manage the account |
machine logout |
Sign out |
machine upgrade |
Install the latest client |
machine completion |
Print the shell completion script |
machine login
Sign in. See Signing up.
A sign-in code is emailed. At a terminal the command asks for the address and the code. Use the account signup command if there is no account yet.
With --email the command emails the code and returns, so a coding agent or a
script never waits. Run it again with --email and --code to sign in.
Or set TESTFLOWS_MACHINE_API_KEY instead. An API key saved with account api-keys
create --save signs in when there is no login.
1 | machine login [-h] [--email address] [--code code] |
| Option | Does |
|---|---|
--email address |
The account’s email address, instead of asking for it |
--code code |
The emailed sign-in code, instead of asking for it |
Examples:
1 | machine login sign in at a terminal |
See also:
machine sessions
List and manage sessions. See Sessions.
A session is a reserved machine in the cloud. It holds CPUs, memory and disk space for runs. A run is created, started and stored in a session.
The create subcommand creates a session and uses it, so later commands in this terminal go to it. The use subcommand switches to another session.
Use -s to select a session for a single command. A session bills while it runs.
1 | machine sessions [-h] [-w] command ... |
| Option | Does |
|---|---|
-w, --watch |
Watch for changes |
Examples:
1 | machine sessions list sessions |
See also:
machine sessions list
List sessions. See Sessions.
The command lists the running sessions of the account. The current session is tagged.
A session that ended is listed once while this computer is still connected to it, with how it ended. The command then clears that connection.
Use --all to list the sessions that ended as well, and --state, --since
and --until to choose among them. The account keeps how each session ended.
1 | machine sessions list [-h] [-w] [-a] [--state [^]state] [--since date|age] |
| Option | Does |
|---|---|
-w, --watch |
Watch for changes |
-a, --all |
List the sessions that ended as well |
--state [^]state |
Filter by state: provisioning, running, stopping, stopped, failed (repeat = OR; ^ excludes) |
--since date|age |
Since a date such as 2026-06-01, or an age such as 7d, 24h or 30m |
--until date|age |
Until a date such as 2026-06-01, or an age such as 7d, 24h or 30m |
--sort field |
Sort field: created, stopped, name, cpus, memory (default: created) |
--reverse |
Reverse sort order |
--limit n |
Show at most n sessions (default: 25) |
--offset n |
Skip the first n sessions |
Examples:
1 | machine sessions list list sessions |
See also:
machine sessions create
Create a session and use it. See Sessions.
The command uses the new session in this terminal, as sessions use does. Use
--no-use to keep using the session in use before.
The command waits until the session is running. Use --no-wait to return once
the request is accepted. A session created with --no-wait is not used.
1 | machine sessions create [-h] [--cpus n] [--mem size] [--storage size] [--class type] |
| Argument | Does |
|---|---|
[name] |
Session name (default: auto-generated) |
| Option | Does |
|---|---|
--cpus n |
Number of vCPUs (default: 1) |
--mem size |
Memory, MB or with a K/M/G/T suffix (default: the class’s memory for each vCPU, as sessions classes lists it) |
--storage size |
The session’s storage, GB or with a K/M/G/T suffix (default: the class’s storage for the session’s size, up to the plan’s limit) |
--class type |
Hardware class, as sessions classes lists it (default: the plan’s class, which sessions classes tags) |
--no-wait |
Return without waiting |
--no-use |
Create the session without using it |
Examples:
1 | machine sessions create work create the session work and use it |
Refuses, and the way past:
1 | a class with no capacity now machine sessions classes |
See also:
machine sessions use
Make a session the default for later commands. See Sessions.
The command connects first if needed. It checks that the session responds before
switching. With --no-wait it fails if a connect is needed and the session is
not running yet.
1 | machine sessions use [-h] [--no-wait] [session] |
| Argument | Does |
|---|---|
[session] |
Session name, id, or prefix (default: the only one) |
| Option | Does |
|---|---|
--no-wait |
Fail if a connect is needed and the session is not running yet |
Examples:
1 | machine sessions use work use work in this terminal |
See also:
machine sessions show
Show session details. See Sessions.
1 | machine sessions show [-h] [session] |
| Argument | Does |
|---|---|
[session] |
Session name, id, or prefix (default: the only one) |
Examples:
1 | machine sessions show work details of work |
See also:
machine sessions classes
List the hardware classes a session can be created on.
Each class names its region and its CPU architecture. A session runs in its
class’s region, and its runs are stored there. A run starts only in a session of
the architecture it was recorded on. Use the class name with create --class.
A session created without --class runs on the plan’s default class. The list
tags that class default.
1 | machine sessions classes [-h] |
Examples:
1 | machine sessions classes list the classes |
See also:
machine sessions delete
Delete a session. See Sessions.
The operands name the sessions. Use -a to delete every session. Use --state to
delete the sessions in a state.
The command stops the machines of the session and syncs their runs to shared storage. The runs start again in another session. A session already gone counts as success. Its connection on this computer is cleared.
The command waits until a named session is gone. Use --no-wait to return once
the request is accepted.
1 | machine sessions delete [-h] [-a] [--state [^]state] [-y] [--no-wait] [session ...] |
| Argument | Does |
|---|---|
[session ...] |
Session names, ids, or prefixes (default: the only one) |
| Option | Does |
|---|---|
-a, --all |
Delete every session |
--state [^]state |
Delete the sessions in a state (repeat = OR; ^ excludes) |
-y, --yes |
Skip the confirmation prompt |
--no-wait |
Return without waiting |
Examples:
1 | machine sessions delete work -y stop and delete work |
See also:
machine sessions rename
Rename a session. See Sessions.
Only the name changes. The session keeps running.
1 | machine sessions rename [-h] session new-name |
| Argument | Does |
|---|---|
session |
Session name, id, or prefix |
new-name |
New session name |
Examples:
1 | machine sessions rename work build rename work to build |
See also:
machine sessions keep
Keep a session running while it is idle.
A session is idle while it serves no command. An idle session stops after the plan’s idle time. Keep holds it for the duration, up to the plan’s limit. A later keep replaces the hold.
1 | machine sessions keep [-h] session duration |
| Argument | Does |
|---|---|
session |
Session name, id, or prefix |
duration |
How long to keep it, such as 30m or 1h |
Examples:
1 | machine sessions keep work 30m keep work running idle for 30 minutes |
See also:
machine sessions migrate
Move a session to a new session with its runs.
The command creates a session of the same class and size. It stops each running machine, which checkpoints it, and starts it in the new session at that checkpoint. The new session takes the session’s name, and the old one is deleted.
A machine starts in the new session in the state it stopped in. The command compares the machine’s state hashes before the stop and after the start. A run that differs is not moved back, and both sessions are kept.
A command running on a machine ends, as stop ends it. The command asks first. A failure moves every machine back to the session and deletes the new one.
1 | machine sessions migrate [-h] [-y] [session] |
| Argument | Does |
|---|---|
[session] |
Session name, id, or prefix (default: the only one) |
| Option | Does |
|---|---|
-y, --yes |
Skip the confirmation prompt |
Examples:
1 | machine sessions migrate work move work to a new session |
See also:
machine sessions connect
Connect to a session. See Sessions.
The command connects this computer to the session and uses it in this terminal. The use subcommand does the same and also checks a connection already open. Use sessions use instead.
The command waits until the session is running. Use --no-wait to return once
the request is accepted.
1 | machine sessions connect [-h] [--no-wait] [session] |
| Argument | Does |
|---|---|
[session] |
Session name, id, or prefix (default: the only one) |
| Option | Does |
|---|---|
--no-wait |
Fail if the session is not running yet |
Examples:
1 | machine sessions connect work connect to work |
See also:
machine sessions disconnect
Disconnect from a session. See Sessions.
The session keeps running. The connection is shared on this computer, so every terminal loses it. Use -a to disconnect every session.
1 | machine sessions disconnect [-h] [-a] [session] |
| Argument | Does |
|---|---|
[session] |
Session (default: the current one) |
| Option | Does |
|---|---|
-a, --all |
Disconnect every session |
Examples:
1 | machine sessions disconnect work disconnect from work |
See also:
machine notices
Show the notices in effect now.
A notice says what will happen and when, and the command that acts on it. A session given a maintenance notice must move to another host by its deadline, or it stops. A client older than the latest release is out of date. A client may also be given a date after which it stops working.
The command asks the service now. Other commands show a session’s notice every 10 minutes. In the last 10 minutes before its deadline, every command shows it. They show the client’s notice once a day.
1 | machine notices [-h] |
Examples:
1 | machine notices what will happen to my sessions and client |
See also:
machine ping
Check reachability and latency. See The client.
The command pings the API and the connected sessions. It reports the state, round-trip time, jitter, setup time and certificate lifetime of each target.
1 | machine ping [-h] [-c n] |
| Option | Does |
|---|---|
-c, --count n |
Round-trips per target (default: 3) |
Examples:
1 | machine ping reachability and latency of the API and sessions |
Prints:
1 | text TARGET STATE RTT JITTER SETUP CERT LEFT |
See also:
machine account
Show and manage the account. See Account and billing.
The account holds the plan, the credits, the API keys and the signed-in devices. The subcommands buy credits or a plan, manage invoices and payment, and close the account.
1 | machine account [-h] command ... |
Examples:
1 | machine account plan, credits and quotas |
See also:
machine account devices
List signed-in devices. See Account and billing.
Use --revoke to sign out one device by id.
1 | machine account devices [-h] [--revoke id] |
| Option | Does |
|---|---|
--revoke id |
Sign out one device by its id (or a unique id prefix) |
Examples:
1 | machine account devices signed-in devices |
See also:
machine account buy-usage
Buy usage credits. See Account and billing.
The command opens checkout for the pack of the named number of credits. A credit costs one euro. A credit has no cash value.
1 | machine account buy-usage [-h] [-y] credits |
| Argument | Does |
|---|---|
credits |
Credits to buy, one of the amounts account products list shows. A credit costs one euro |
| Option | Does |
|---|---|
-y, --yes |
Skip the confirmation prompt |
Examples:
1 | machine account buy-usage 10 buy 10 usage credits for €10 |
See also:
machine account buy-plan
Subscribe to a plan. See Account and billing.
On a paid plan, the command upgrades or downgrades to the named tier instead.
1 | machine account buy-plan [-h] [-y] plan |
| Argument | Does |
|---|---|
plan |
Plan to subscribe to: starter, plus or pro |
| Option | Does |
|---|---|
-y, --yes |
Skip the confirmation prompt |
Examples:
1 | machine account buy-plan starter subscribe to starter |
See also:
machine account upgrade-plan
Upgrade to a higher plan. See Account and billing.
An omitted tier is the next one up. Use --link to print the URL without
opening a browser.
1 | machine account upgrade-plan [-h] [--link] [-y] [plan] |
| Argument | Does |
|---|---|
[plan] |
Plan to move to (default: the next plan up) |
| Option | Does |
|---|---|
--link |
Print the link only (don’t open a browser) |
-y, --yes |
Skip the confirmation prompt |
Examples:
1 | machine account upgrade-plan upgrade to the next plan |
See also:
machine account downgrade-plan
Downgrade to a lower plan. See Account and billing.
An omitted tier is the next one down. Use --link to print the URL without
opening a browser.
1 | machine account downgrade-plan [-h] [--link] [-y] [plan] |
| Argument | Does |
|---|---|
[plan] |
Plan to move to (default: the next plan down) |
| Option | Does |
|---|---|
--link |
Print the link only (don’t open a browser) |
-y, --yes |
Skip the confirmation prompt |
Examples:
1 | machine account downgrade-plan downgrade to the previous plan |
See also:
machine account payment
Update the payment method. See Account and billing.
Use --link to print the URL without opening a browser.
1 | machine account payment [-h] [--link] |
| Option | Does |
|---|---|
--link |
Print the link only (don’t open a browser) |
Examples:
1 | machine account payment update the payment method |
See also:
machine account portal
Open billing settings. See Account and billing.
Use --link to print the URL without opening a browser.
1 | machine account portal [-h] [--link] |
| Option | Does |
|---|---|
--link |
Print the link only (don’t open a browser) |
Examples:
1 | machine account portal open billing settings |
See also:
machine account invoices
List and manage invoices. See Account and billing.
The listing shows the newest 25. Use --limit for a different page size.
1 | machine account invoices [-h] [--since date|age] [--until date|age] |
| Option | Does |
|---|---|
--since date|age |
Since a date such as 2026-06-01, or an age such as 7d, 24h or 30m |
--until date|age |
Until a date such as 2026-06-01, or an age such as 7d, 24h or 30m |
--status {draft,open,paid,uncollectible,void} |
Filter by invoice status |
--limit n |
Cap to most recent n (default: 25, max 100) |
--sort field |
Sort by created or amount |
--reverse |
Reverse sort order |
Examples:
1 | machine account invoices list invoices |
See also:
machine account invoices list
List invoices.
The listing shows the newest 25. Use --limit for a different page size.
1 | machine account invoices list [-h] [--since date|age] [--until date|age] |
| Option | Does |
|---|---|
--since date|age |
Since a date such as 2026-06-01, or an age such as 7d, 24h or 30m |
--until date|age |
Until a date such as 2026-06-01, or an age such as 7d, 24h or 30m |
--status {draft,open,paid,uncollectible,void} |
Filter by invoice status |
--limit n |
Cap to most recent n (default: 25, max 100) |
--sort field |
Sort by created or amount |
--reverse |
Reverse sort order |
Examples:
1 | machine account invoices list list invoices |
See also:
machine account invoices download
Open an invoice.
The hosted page has the PDF and receipt. Use --link to print the URL without
opening a browser.
1 | machine account invoices download [-h] [--link] invoice-id |
| Argument | Does |
|---|---|
invoice-id |
Invoice id (in_…) |
| Option | Does |
|---|---|
--link |
Print the link only (don’t open a browser) |
Examples:
1 | machine account invoices download in_123 open invoice in_123 |
See also:
machine account cancel
Cancel the subscription. See Account and billing.
The plan stays until renewal, then drops to Free. Free includes plan credits
only in an account’s first 60 days. Usage credits stay. Use --link to print
the URL without opening a browser.
1 | machine account cancel [-h] [--link] |
| Option | Does |
|---|---|
--link |
Print the link only (don’t open a browser) |
Examples:
1 | machine account cancel cancel the subscription |
See also:
machine account email
Change the account email. See Account and billing.
A code goes to the current inbox. A link goes to the new one.
1 | machine account email [-h] [-y] email |
| Argument | Does |
|---|---|
email |
New email address |
| Option | Does |
|---|---|
-y, --yes |
Skip confirmation prompts |
Examples:
1 | machine account email me@example.com change the email |
See also:
machine account products
List products for sale. See Account and billing.
1 | machine account products [-h] command ... |
Examples:
1 | machine account products list products for sale |
See also:
machine account products list
List products for sale.
1 | machine account products list [-h] |
Examples:
1 | machine account products list products for sale |
See also:
machine account show
Show the account. See Account and billing.
1 | machine account show [-h] |
Examples:
1 | machine account show plan, credits and quotas |
See also:
machine account credits
Show the account’s credits. See Account and billing.
1 | machine account credits [-h] |
Examples:
1 | machine account credits the credit balance |
See also:
machine account activity
Show credit activity. See Account and billing.
A session is charged an hour ahead, as Charged rows. When it stops, a Settled row gives back the unused part of its last hour. Naming a session ends the listing with what the session used over all of its rows.
The listing shows the newest 25. Use --limit for a different page size.
1 | machine account activity [-h] [--since date|age] [--until date|age] [--period date] |
| Argument | Does |
|---|---|
[session] |
Show one session’s transactions, by name, id or id prefix |
| Option | Does |
|---|---|
--since date|age |
Since a date such as 2026-06-01, or an age such as 7d, 24h or 30m |
--until date|age |
Until a date such as 2026-06-01, or an age such as 7d, 24h or 30m |
--period date |
Show the plan period that contains this date, such as 2026-10-01 |
--type {granted,purchased,charged,settled,expired,removed,adjusted} |
Filter by activity type |
--credit-type {plan,usage} |
Credit type to filter by: plan or usage |
--limit n |
Cap to most recent n (default: 25, max 500) |
--sort field |
Sort by sequence or amount |
--reverse |
Reverse sort order |
Examples:
1 | machine account activity charges and credits |
See also:
machine account orders
List and manage orders. See Account and billing.
The listing shows the newest 25. Use --limit for a different page size.
1 | machine account orders [-h] |
| Option | Does |
|---|---|
--status {pending,processing,completed,cancelled,expired,failed} |
Filter by status |
--limit n |
Cap to most recent n (default: 25, max 200) |
Examples:
1 | machine account orders list list orders |
See also:
machine account orders list
List orders.
The listing shows the newest 25. Use --limit for a different page size.
1 | machine account orders list [-h] |
| Option | Does |
|---|---|
--status {pending,processing,completed,cancelled,expired,failed} |
Filter by status |
--limit n |
Cap to most recent n (default: 25, max 200) |
Examples:
1 | machine account orders list list orders |
See also:
machine account orders resume
Resume a pending checkout.
The command resumes the pending order. An account has one at most. Use --link
to print the URL without opening a browser.
1 | machine account orders resume [-h] [--link] |
| Option | Does |
|---|---|
--link |
Print the link only (don’t open a browser) |
Examples:
1 | machine account orders resume resume the pending order |
See also:
machine account orders cancel
Cancel a pending order so another buy can start.
The command cancels the pending order. An account has one at most.
1 | machine account orders cancel [-h] |
Examples:
1 | machine account orders cancel cancel the pending order |
See also:
machine account api-keys
List and manage API keys. See Account and billing.
A key controls runs, disks and sessions. It cannot change billing or the account.
Set TESTFLOWS_MACHINE_API_KEY to use one.
1 | machine account api-keys [-h] command ... |
Examples:
1 | machine account api-keys list list API keys |
See also:
machine account api-keys list
List API keys.
1 | machine account api-keys list [-h] |
Examples:
1 | machine account api-keys list list API keys |
See also:
machine account api-keys create
Create an API key.
The secret is shown once. Use --save to save it for this client instead. The
client then signs in with it when there is no login and
TESTFLOWS_MACHINE_API_KEY is not set.
Within 10 minutes of a sign-in no confirmation code is needed. Later a code is emailed, and at a terminal the command asks for it.
With --save, or without a terminal, the command emails the code and returns.
Run it again with --code.
1 | machine account api-keys create [-h] [--expiry days|never] [--save] [--code code] name |
| Argument | Does |
|---|---|
name |
Label to recognize this key later |
| Option | Does |
|---|---|
--expiry days|never |
Expire after N days (e.g. 30), or “never” (default: never) |
--save |
Save the key for this client instead of printing it |
--code code |
The emailed confirmation code, instead of asking for it |
Examples:
1 | machine account api-keys create ci create the key ci |
See also:
machine account api-keys save
Save an API key for this client.
The command reads the key from standard input, and at a terminal asks for it without showing it. The service checks the key and names its account.
The client signs in with the saved key when there is no login and TESTFLOWS_MACHINE_API_KEY is not set.
1 | machine account api-keys save [-h] |
Examples:
1 | machine account api-keys save asked for, not shown |
See also:
machine account api-keys delete
Delete an API key.
A sign-in code is required.
1 | machine account api-keys delete [-h] id |
| Argument | Does |
|---|---|
id |
Key id, as account api-keys list shows it |
Examples:
1 | machine account api-keys delete 3 delete key 3 |
See also:
machine account api-keys update
Set the expiry of an API key.
A sign-in code is required.
1 | machine account api-keys update [-h] id days|never |
| Argument | Does |
|---|---|
id |
Key id, as account api-keys list shows it |
days|never |
Number of days from now (e.g. 30) or “never” |
Examples:
1 | machine account api-keys update 3 30 expire key 3 in 30 days |
See also:
machine account provision
Set up the account’s shared storage. See Signing up.
The first session create or disk build sets up storage itself. This command sets it up ahead of them. The command is safe to repeat while it is still working.
1 | machine account provision [-h] |
Examples:
1 | machine account provision set up shared storage |
See also:
machine account signup
Open the signup page in a browser. See Signing up.
A person creates an account on the signup page, in a browser. The page checks that a person signs up. The client cannot make that check.
The command opens the page when the computer has a screen to show it on. It prints the address of the page in every case. It exits with code 2 because it creates no account.
Use --email to fill in the address on the page. Use the login command to sign
in after the signup.
1 | machine account signup [-h] [--email address] |
| Option | Does |
|---|---|
--email address |
The email address to fill in on the signup page |
Examples:
1 | machine account signup open the signup page |
See also:
machine account whoami
Show the account and credential this client uses.
The credential is TESTFLOWS_MACHINE_API_KEY when it is set, else the login, else the API key saved for this client. The command checks it with the service.
Without a credential that works the command fails with exit code 2. It changes nothing.
1 | machine account whoami [-h] |
Examples:
1 | machine account whoami the account and credential |
See also:
machine account close
Close the account. See Account and billing.
The command emails a code that starts the close. It waits until the machines of every session stop. It then emails a second code that confirms the close.
A close that is not confirmed stays in progress. Run the command again to finish
it. Use --cancel to stop it.
1 | machine account close [-h] [-y] [--cancel] |
| Option | Does |
|---|---|
-y, --yes |
Skip confirmation prompts |
--cancel |
Abort closing and return the account to active |
Examples:
1 | machine account close -y close the account |
See also:
machine logout
Sign out. See Signing up.
The command revokes the access token. Use --everywhere to sign out of every
device and browser.
1 | machine logout [-h] [--everywhere] |
| Option | Does |
|---|---|
--everywhere |
Sign out of every device and browser, not just this one |
Examples:
1 | machine logout sign out |
See also:
machine upgrade
Install the latest client. See Download.
The command downloads the release for this system. It checks the signed checksum with the release key built into the client. The signature names the version, the platform and the file. The download then replaces the installed client by a rename.
The command also installs the release’s Python SDK core. It removes the files older versions unpacked. It runs no downloaded script.
The download uses the client’s own sign-in, or the API key in TESTFLOWS_MACHINE_API_KEY. The sign-in goes to the service alone.
The latest is not downloaded again when it is installed already. A latest older
than this client is installed only when its version is named. A version named is
installed even when it is installed already. Use --list to see the versions
there are.
1 | machine upgrade [-h] [--list | version] |
| Argument | Does |
|---|---|
[version] |
Version to install, YYYYMMDD-HHMM (default: the latest) |
| Option | Does |
|---|---|
--list |
List the versions there are |
Examples:
1 | machine upgrade install the latest client |
See also:
machine completion
Print the shell completion script. See The client.
The script completes commands, options and their values as the client reads them. The client answers each Tab itself, so a newer client needs no newer script.
Add the line for the shell to its startup file:
1 | bash eval "$(machine completion bash)" in ~/.bashrc |
Run the same line in a shell to complete in that shell alone. The completion lasts until the shell exits.
machine-env loads the script itself. On macOS, machine outside machine-env is the system’s command. There the line belongs in no startup file.
1 | machine completion [-h] {bash,zsh,fish} |
| Argument | Does |
|---|---|
{bash,zsh,fish} |
Shell to print the script for: bash, zsh or fish |
Examples:
1 | machine completion bash the script for bash |
See also: