CI/CD
simply gitlab ci environment list
Section titled “simply gitlab ci environment list”List a project deployment environments.
Flags
-p, --project <value>— Project id, or its full path such as group/subgroup/project. (required; env:GITLAB_PROJECT)--limit <value>— Maximum number of environments to return across all pages. (default:20)--name <value>— Return the environment with exactly this name.--search <value>— Return environments whose name contains this term.--state <value>— Environment state. (one of:available,stopped)
Connection
-e, --env-file <value>— Path to a .env file holding connection settings.--gitlab-url <value>— Base URL of the GitLab instance. Defaults to https://gitlab.com. (env:GITLAB_URL)--gitlab-token <value>— Personal, project, or group access token. (env:GITLAB_TOKEN)
Global
--json— the raw API payload, for scripts and agents.
Environments are what CI deploys to and what review apps create. Both available and stopped ones are listed; —state narrows to one. Use —json for the last deployment on each, which is the field worth having when you are answering “what is running where”.
Examples
simply gitlab ci environment list --project group/projectsimply gitlab ci environment list --project group/project --state available --search prodsimply gitlab ci job list
Section titled “simply gitlab ci job list”List CI jobs for a project.
Flags
-p, --project <value>— Project id, or its full path such as group/subgroup/project. (required; env:GITLAB_PROJECT)--limit <value>— Maximum number of jobs to return across all pages. (default:20)--scope <value>— Job states to include. Repeatable. (one of:created,pending,running,failed,success,canceled,skipped,waiting_for_resource,manual)
Connection
-e, --env-file <value>— Path to a .env file holding connection settings.--gitlab-url <value>— Base URL of the GitLab instance. Defaults to https://gitlab.com. (env:GITLAB_URL)--gitlab-token <value>— Personal, project, or group access token. (env:GITLAB_TOKEN)
Global
--json— the raw API payload, for scripts and agents.
Jobs across every pipeline, newest first. —scope is repeatable and the scopes are ORed, so —scope failed —scope running is “either”. The ID column is what ci job log takes.
Examples
simply gitlab ci job list --project group/project --scope failed --limit 10simply gitlab ci job list --project group/project --scope running --scope pendingsimply gitlab ci job log
Section titled “simply gitlab ci job log”Print a job log.
Flags
-p, --project <value>— Project id, or its full path such as group/subgroup/project. (required; env:GITLAB_PROJECT)--job <value>— Job id, as listed by ci job list. (required)--tail <value>— Print only the last N lines. 0 prints the whole trace. (default:200)
Connection
-e, --env-file <value>— Path to a .env file holding connection settings.--gitlab-url <value>— Base URL of the GitLab instance. Defaults to https://gitlab.com. (env:GITLAB_URL)--gitlab-token <value>— Personal, project, or group access token. (env:GITLAB_TOKEN)
Global
--json— the raw API payload, for scripts and agents.
A job trace regularly runs to tens of megabytes, and what matters about a failed job is at the end, so only the last 200 lines are printed. —tail changes that number and —tail 0 prints the whole thing.
The trace is written by whatever the job ran, which means it is arbitrary text from an untrusted source. Control characters are stripped before it is printed, so the coloured output a runner emits arrives here plain.
Examples
simply gitlab ci job log --project group/project --job 12345simply gitlab ci job log --project group/project --job 12345 --tail 0simply gitlab ci variable list
Section titled “simply gitlab ci variable list”List a project CI/CD variables.
Flags
-p, --project <value>— Project id, or its full path such as group/subgroup/project. (required; env:GITLAB_PROJECT)--limit <value>— Maximum number of variables to return across all pages. (default:50)--reveal— Print the variable values in clear text.
Connection
-e, --env-file <value>— Path to a .env file holding connection settings.--gitlab-url <value>— Base URL of the GitLab instance. Defaults to https://gitlab.com. (env:GITLAB_URL)--gitlab-token <value>— Personal, project, or group access token. (env:GITLAB_TOKEN)
Global
--json— the raw API payload, for scripts and agents.
Variable values are hidden by default, including under —json. GitLab returns every value in clear text on this endpoint — the “masked” attribute only hides a value in job logs, not from the API — and those values are deploy keys and production credentials.
Pass —reveal to print them. Doing so puts live secrets on stdout, into your shell history if you redirect it, and into the context of anything reading this output, so it is a deliberate step rather than the default.
Examples
simply gitlab ci variable list --project group/projectsimply gitlab ci variable list --project group/project --reveal