Instruqt CLI

This reference explains:
  • What Instruqt CLI is.
  • Why you might use it.
  • How to install it.
  • How to use it from CI/CD systems.

What is Instruqt CLI?

Instruqt Command-Line Interface (CLI) is a text-based interface that accepts commands to create and maintain tracks. You enter the commands at a command prompt or terminal on your machine, and these command prompts/terminals look something like this:
🐧 Linux
Instruqt CLI commands let you do things like:
  • Create a new track from scratch.
  • Pull the configuration files of an existing track.
  • Push your local changes to the Instruqt platform to update the track.
  • Start an automated test of the track.
And this is an example of an Instruqt CLI command for creating a new track:
instruqt track create

Why would you use Instruqt CLI?

You might wonder why you would use Instruqt CLI, where you have to type and memorize commands, while you have the Web UI where you click your way through Instruqt. Well, Web UI is just fine, and if you want to stay with it, that is OK. But you can use Instruqt CLI for the following reasons:
  • To integrate Instruqt with CI/CD systems.
  • To maintain a developer workflow.
  • To develop faster if you know the commands.
And one does not exclude the other: You can perfectly well use Web UI and Instruqt CLI side-by-side to create and maintain your tracks.

How to install Instruqt CLI

Before getting started, you will need to install and authenticate the Instruqt CLI.

Update Instruqt CLI

Instruqt only supports the latest version of Instruqt CLI. If a newer version is available, Instruqt CLI blocks and asks you to upgrade first. You can also manually upgrade:
instruqt update
↳ Instruqt CLI shows this output when ready:
==> Updating CLI.
Automatically update within CI/CD systems
If you run the Instruqt CLI in a non-interactive way, for example, in your CI/CD system, always run the instruqt update command first to ensure you are using the latest version.

Instruqt CLI commands

See the following topic for details on the set of Instruqt CLI commands:

Using Instruqt CLI from CI/CD systems

When using Instruqt CLI in CI/CD pipelines, you can use an API token to authenticate. To create or regenerate an API token, visit the API section of your team page.
To authenticate Instruqt CLI using an API token, set or export the INSTRUQT_TOKEN environment variable.
If you're looking for an example DevOps CI/CD (Continuous Integration/Continuous Deployment) workflow, please check out the Maintain a developer workflow section in the docs. This guide shows you how to develop and test your tracks with automated testing of dev versions of your tracks, testing and promotion of tracks to production using infrastructure as code.