Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/mikronita/mikrom/llms.txt

Use this file to discover all available pages before exploring further.

Personal Access Tokens (PATs) are long-lived credentials that let scripts, CI/CD pipelines, and automation tools authenticate to the Mikrom platform without requiring an interactive username and password login. Instead of calling mikrom auth login in an automated environment, you generate a PAT once, store it securely, and configure the CLI to use it. PATs are scoped to the project that was active when the token was created, so they only grant access to resources within that project.
PATs are scoped to the active project at the time of creation. If you need to automate operations across multiple projects, create a separate PAT in each project after switching context with mikrom project switch.

mikrom pat list

List all Personal Access Tokens associated with the current project. The token value itself is never shown after creation — only the token ID, name, and creation date are displayed.
mikrom pat list
Example output
ID             NAME               CREATED
pat-a1b2c3    github-actions     2024-11-01
pat-d4e5f6    deploy-script      2024-12-15

mikrom pat create

Create a new Personal Access Token with a descriptive name. The full token value is printed once immediately after creation and cannot be retrieved again.
mikrom pat create <name>
name
string
required
A human-readable label that identifies where or how this token is used (e.g. github-actions, deploy-script).
The token value is shown only once at creation time. Copy it and store it in a secure secrets manager (such as GitHub Actions Secrets, HashiCorp Vault, or a .env file with restricted permissions) immediately. You cannot retrieve the token value again after closing the terminal — you would need to revoke it and create a new one.
Example
mikrom pat create github-actions
Example output
Personal Access Token created.

  Name:    github-actions
  ID:      pat-a1b2c3
  Token:   mk_pat_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Save the token value above — it will not be shown again.

Using a PAT to authenticate the CLI

Instead of running mikrom auth login, configure the CLI to use a PAT by setting it as the API token in the configuration:
mikrom config set api-token mk_pat_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
In CI/CD environments, inject the token from a secret and set it before running any mikrom commands:
# GitHub Actions example
- name: Configure Mikrom CLI
  run: mikrom config set api-token ${{ secrets.MIKROM_PAT }}

- name: Deploy application
  run: mikrom app deploy --name my-api
Give each PAT a name that reflects its purpose and origin — for example gh-actions-prod, k8s-job, or local-dev-script. This makes it easy to audit and revoke individual tokens without disrupting other automations.

mikrom pat revoke

Revoke a Personal Access Token by its ID. Once revoked, any automation using that token will immediately lose access to the platform. Prompts for confirmation unless --yes is supplied.
mikrom pat revoke <id> [--yes]
id
string
required
The ID of the token to revoke, as shown in mikrom pat list.
--yes / -y
boolean
default:"false"
Skip the interactive confirmation prompt.
Example
mikrom pat revoke pat-a1b2c3 --yes

1

Switch to the target project

mikrom project switch abc123
PATs are scoped to the active project, so switch to the correct context first.
2

Create a PAT with a descriptive name

mikrom pat create github-actions-prod
3

Save the token in your secrets manager

Copy the printed token value and store it as a secret (e.g. MIKROM_PAT in GitHub Actions repository secrets).
4

Configure the CLI in your pipeline

mikrom config set api-token $MIKROM_PAT
Run this step before any other mikrom command in your CI job.
5

Revoke when no longer needed

mikrom pat revoke pat-a1b2c3 --yes
Rotate or revoke tokens regularly as part of your security hygiene.

Build docs developers (and LLMs) love