CLI

Quizalto provides a command-line interface (CLI) for interacting with the API directly from your terminal. The CLI is useful for automation, scripting, and users who prefer working from the command line.

Installation

Homebrew (macOS)

The latest stable release is available via the official tap:

brew tap f-quiz/quizalto
brew install quizalto

Debian/Ubuntu

The downloads page has version specific instructions for debian and ubuntu you cancopy/paste.

curl -LO https://www.dev.quizalto.com/assets/latest/quizalto_<version>_amd64.deb
sudo dpkg -i quizalto_<version>_amd64.deb

Fedora/RHEL

The downloads page has version specific instructions for fedora and redhat entreprise linux you can copy/paste.

curl -LO https://www.dev.quizalto.com/assets/latest/quizalto-<version>-1.x86_64.rpm
sudo rpm -i quizalto-<version>-1.x86_64.rpm

Pre-built Binaries

Download the binary for your platform from the release page:

Platform Architecture File
Linux amd64 quizalto-linux-amd64
Windows amd64 quizalto-windows-amd64.exe

Make the binary executable and add it to your PATH:

Linux:

chmod +x quizalto-linux-amd64
sudo mv quizalto-linux-amd64 /usr/local/bin/quizalto

Windows:

ren quizalto-windows-amd64.exe quizalto.exe
# Move to a directory in your PATH

Available Commands

Command Description
login Authenticate with the API
logout Remove stored credentials

Use quizalto --help to see all available commands and global flags.

Configuration

Credentials are stored in your OS config directory and secrets are kept in the OS keychain.

Authentication

The CLI supports all Quizalto authentication methods.

Signing Up

To create a new account from the CLI, use the signup command:

quizalto user signup-user --data '{"username":"alice","email":"alice@example.com","password":"your-strong-password"}'

Once your account is created, you can log in using any of the methods below.

Login with Username & Password

quizalto login --username alice
# You will be prompted for your password

# Or pipe the password
echo "your-password" | quizalto login --username alice --password-stdin

# Or provide it directly (less secure)
quizalto login --username alice --password your-password

The CLI verifies your credentials and stores them securely in the OS keychain.

Login with Social (Device Code Grant)

The CLI supports browser-based login using the Device Authorization Grant flow — the same pattern used by aws sso login and gh auth login. This allows you to authenticate with LinkedIn, GitHub, Google, or your email/password through your browser.

quizalto login --device

What happens:

  1. The CLI contacts the server and receives a short user code.
  2. It opens your browser automatically and displays the code to confirm:
    Opened browser. Confirm the code below matches in your browser to authorize:
    
      BC-DEF-12
    
  3. Sign in through your browser using any available method (LinkedIn, GitHub, Google, or email/password).
  4. Confirm the code matches and click Confirm and Authorize.
  5. The CLI polls the server and receives your JWT tokens once approved.

This is the recommended way to authenticate when you want to use social login or prefer browser-based authentication.

Login with SAML (Device Code Grant)

If your organisation uses SAML Single Sign-On, use the --org flag to route authentication through your organisation’s Identity Provider:

quizalto login --device --org YOUR_ORG_ID

Replace YOUR_ORG_ID with your organisation’s UUID (provided by your admin).

What happens:

  1. The CLI contacts the server with your organisation ID and opens your browser.
  2. Your browser is routed directly to your organisation’s SAML login page.
  3. Sign in with your corporate credentials.
  4. After successful authentication, you are returned to the device login page.
  5. Confirm the code matches and click Confirm and Authorize.
  6. The CLI polls the server and receives your JWT tokens once approved.

Note: The SAML authentication happens automatically through the browser — the --org flag tells the CLI which organisation’s Identity Provider to use.

Examples

Get Current User Profile

Once logged in, retrieve your profile information:

quizalto user get-user-profile

Search for Content

Search for content related to “IAM” (Identity and Access Management):

quizalto search --q IAM

This returns matching courses, exams, and quizzes:

{
  "courses": [
    {
      "title": "AWS Identity and Access Management (IAM)",
      "description": "Deep dive into IAM users, groups, roles, and policies."
    }
  ],
  "exams": [...],
  "quizzes": [...]
}

You can also search from the web application at https://quizalto.com/app/search.

Logging Out

# Remove stored credentials for the current server
quizalto logout

# Remove all stored credentials
quizalto logout --all