website/docs/endpoint-devices/authentik-agent/authentik-cli.mdx
The following commands are available when interacting with the authentik Agent via the command line.
:::info Flags
Most of the CLI commands have a -v/--verbose flag for verbose output.
Use the -h/--help flag to access help information.
:::
Commands for authenticating with different CLI applications.
ak auth <command>
aws - Authenticate to AWS with the authentik profile.kubectl - Authenticate to a Kubernetes Cluster with the authentik profile.raw - Authenticate to arbitrary API calls.vault - Generate a JWT for authenticating to HashiCorp Vault.Generate the autocompletion script for the specified shell.
ak completion <command>
bash - Generate the autocompletion script for bash.fish - Generate the autocompletion script for fish.powershell - Generate the autocompletion script for PowerShell.zsh - Generate the autocompletion script for zsh.Configure authentik CLI
ak config <command>
list-profiles - List profiles that are enabled on the device. Each profile is associated with a separate authentik deployment.setup - Configure authentik CLI.Output help information about any command.
ak help <command>
Where <command> is any authentik CLI command you want help with, for example: ak help ssh
Establish an SSH connection with the target endpoint device.
ak ssh <hostname>
Commands for interacting with authentik sessions.
ak system <command>
status - Status about the current session.Shows the version of all installed authentik components.
ak version
Check user account details for a given profile.
ak whoami
Used to run the authentik system agent
ak-sysd agent
-d for debug
--disable-component to disable a component, can be used multiple times.
Components:
agent_starter: Responsible for starting the authentik user agentauth: Authentication components for interactive and token-based authenticationctrl: Provides a control socket for the CLI to join domains, etcdevice: Handles device compliance checkins and validationsdirectory: Provides directory services on linux systemping: Provides a ping service for healthcheckingsession: Handles sessions created with local device authentication/SSHGenerate the autocompletion script for the specified shell.
ak-sysd completion <command>
bash - Generate the autocompletion script for bash.fish - Generate the autocompletion script for fish.powershell - Generate the autocompletion script for powershell.zsh - Generate the autocompletion script for zsh.ak-sysd domains <command>
join - Join an authentik domain, for example ak-sysd domains join <name_for_authentik_domain> -a <authentik_URL>ak-sysd help <command>
Where <command> is any authentik CLI command you want help with, for example: ak-sysd help domains
ak-sysd troubleshoot <command>
check - Check status of authentik agent components. Useful on Linux as there are various components being used.inspect - Outputs the state database that the agent has.facts - Outputs device facts. These are the facts that are sent to authentik for device reporting.