Back to Docs

CLI Authentication & Permissions

Approve a CLI device and choose which projects and teams it can access.

Approve a device

mechasm login

The browser page lets you name the device and approve access. Device names must contain 1–120 characters. Choose access to existing projects separately from permission to create new projects in teams.

For an existing project, choose the actions the device needs: view results, run tests, or create and edit tests. Creating or editing a test can start a run, so that permission includes run access. Team project-creation access does not grant access to existing projects in that team. You can approve a team with no project access when the device only needs to create a new project.

If the browser cannot open, the CLI prints a manual approval link. Use mechasm login --no-browser on a headless machine. Normal terminal output does not print the one-time code, device ID, or token.

You can rename or revoke the device under Profile → My devices. mechasm logout revokes the CLI credentials for this device.

Use a scoped token

If you already have a scoped access token, pass it through standard input:

printf %s "$TOKEN" | mechasm whoami --token-stdin --json

Do not put token values in command arguments. --token-stdin cannot share standard input with a prompt read through --prompt-file - or a variable supplied with --value-stdin; use a prompt or value file when needed.

Grant boundaries

  • Existing project access and team project-creation access are separate.
  • A new project grants its creator view, create/edit, and run access to that project.
  • A team grant does not provide access to existing projects in that team.
  • The CLI can list teams approved for project creation and create projects in those teams. It cannot create teams or delete projects.
  • Test and run commands require an explicit project ID; the CLI does not select a default project.

If a request is denied, run mechasm login again and approve the required project action or team project-creation access. Your account must already have access to the project or team; ask the team owner if access is missing. Then retry with the explicit project or team ID.