This reference lists the available Instruqt CLI commands and specifies some commonly used commands.
A command is a directive to an operating system or an application to perform a task—for example, copying a file or creating a track in the Instruqt context.
Instruqt CLI commands always start with the
instruqtdirective, followed by a command with an optional subcommand and optional flags. For example,
challengeis a command which has a
createsubcommand and a
instruqt challenge create --title "Create a Kubernetes cluster"
versionis a command on its own:
To explore the available commands, open a terminal on your machine and enter the following command:
↳ Instruqt CLI shows the available commands:
List all users playing an invite.
Create and manage challenges.
Generate shell auto completion scripts.
View and edit Instruqt CLI configuration.
Manage the developers of a track.
Help about any command.
Create and manage notes.
Create and manage tracks.
Update the CLI.
Show the version of the CLI.
You can drill down any command with the
--helpflag—for example the
instruqt track --help
↳ After which Instruqt CLI shows the subcommands for
checksum Get the track checksum
create Create a new track
delete Delete a remote track
deploy Deploy a remote track
logs Get logs for the track
open Open the track URL in a browser
pull Pull the track from the remote server
push Push the local track to the remote server
test Test the track with its lifecycle scripts
upgrade Upgrade track version.
validate Validate the local track
And you can even further drill down by adding a subcommand:
instruqt track create --help
↳ After which Instruqt CLI shows examples and the flags for the
If you omit the track slug (TRACK), one is generated based on the title:
$: instruqt track create --title "My first track"
To copy an existing track:
$: instruqt track create --from instruqt/docker-basics --title "My new track"
--from string The remote track to copy: '<organization-slug>/<track-slug>'
-h, --help help for create
--title string The title of the track
The following commonly used commands are further specified for your reference:
instruqt create track
[--from | --title]
The create command scaffolds a local directory with track configuration files.
The remote track to copy: '<organization-slug>/<track-slug>'
The title of the track
To create a new track as a copy of an existing track:
instruqt track create --from instruqt/docker-basics --title "My new track"
instruqt track test
[--keep-running | --skip-fail-check]
Test the track with all lifecycle scripts (setup / check / solve / cleanup).
Enter your API token for your team here to set the
INSTRUQT_TOKENenvironment variable when running the test command from a CI/CD system.
Keep the environment running when the test finishes or fails.
Don't fail the test if running the first challenge check doesn't fail.
To run a test from your machine that keeps the environment running when the test finishes:
instruqt track test --keep-running
To run a test from a CI/CD system:
INSTRUQT_TOKEN = "YOUR_API_TOKEN" instruqt track test
instruqt track logs
[--participant-id | --since | --severity]
The logs command tails logs of the track.
The participant ID. When set, this will take precedence over track ID or slug.
The start datetime from which to return logs, either in relative duration.
The severity of the log entries, e.g DEBUG, INFO, ERROR. Defaults to INFO.
To log a track, starting 30 minutes ago:
instruqt track logs --since 30m