CLI Authentication
Before the CLI can manage machines, sign in with your SnapVM account.
Sign in
Section titled “Sign in”Run:
snapvm loginThe CLI opens a browser authentication flow. Complete sign-in in the browser, then return to your terminal.
If the browser does not open automatically, use the URL printed by the CLI.
Verify access
Section titled “Verify access”List the machines available to your account:
snapvm listBy default, snapvm list shows machines owned by you in the selected organization. Organization owners and admins can use --all or --user-id when they need a broader view.
snapvm list --allsnapvm list --user-id mesnapvm list --output jsonSelect an organization
Section titled “Select an organization”Use --org when your account has access to more than one organization:
snapvm --org my-team listYou can also set the default organization for your shell session:
export SNAPVM_ORG="my-team"Select a machine
Section titled “Select a machine”Most machine commands accept a machine name or ID. You can also set a default machine for a command:
snapvm --machine frontend-lab consoleFor a project directory, prefer local context:
snapvm use frontend-labsnapvm exec pwdCustom SnapVM URLs
Section titled “Custom SnapVM URLs”The CLI defaults to the public SnapVM service. If your workspace administrator gives you a custom SnapVM URL, use the matching option:
snapvm login --web-url https://snapvm.example.comsnapvm --api-url https://snapvm.example.com/api listFor repeated use, set the environment variables your administrator provides:
export SNAPVM_WEB_URL="https://snapvm.example.com"export SNAPVM_API_URL="https://snapvm.example.com/api"Log out
Section titled “Log out”Remove stored CLI credentials:
snapvm logoutRun snapvm login again when you need to reconnect the CLI.
Troubleshooting
Section titled “Troubleshooting”Browser does not open
Section titled “Browser does not open”Copy the authentication URL printed in the terminal, open it in your browser, complete sign-in, and return to the CLI.
Not signed in
Section titled “Not signed in”Run:
snapvm loginIf the problem continues, log out and sign in again:
snapvm logoutsnapvm loginNo machines appear
Section titled “No machines appear”Confirm that you selected the expected organization and that the console shows machines for your account. If access looks wrong, contact your workspace administrator.