Global options¶
Global options apply to every {{ product_name }} Admin CLI command. They are defined on the root command, so they must be placed before the command path, not after the leaf command or its options.
Syntax¶
Most commands are remote — host profile and login required
The Admin CLI is a remote gRPC client. Before running any server-touching command you must
create a host profile with profile hosts create and
authenticate with profile authn login. The only
exceptions are init (a pre-OIDC, HMAC-signed bootstrap call) and the local
profile hosts / profile authn commands, which run entirely on the client and need no prior
login.
Global option reference¶
| Option | Default | Description |
|---|---|---|
-p, --profile |
default-admin |
Host connection profile to use for a single invocation |
-h, --help |
- | Show usage help and exit |
-V, --version |
- | Show the CLI version and exit |
The -p/--profile option selects which host connection profile the CLI uses for one-shot
execution. Host connection profiles — including their embedded OIDC logins (with PIN-sealed
tokens) — are stored under ${HOME}/.config/alpinepki/hosts/ and define the gRPC endpoint to
connect to. When omitted, the CLI uses the default-admin profile.
Placement rules¶
Because the global options live on the root command, they must come before the command path. The same rule applies whether you pass one global option or several.
Correct¶
Incorrect (global option after the command)¶
Examples¶
Select a non-default host profile for a single call:
Use the default profile and show the CLI version (no profile or login needed):
Print usage help for the top-level command tree:
FAQ¶
Where do I put the -p/--profile option?
Before the command path. The global options are defined on the root command, so
bin/admin.sh -p prod server info is correct, while bin/admin.sh server info -p prod is not.
What does -p/--profile select?
The host connection profile used for a single invocation. Host profiles live under
${HOME}/.config/alpinepki/hosts/ and define the gRPC endpoint to connect to. When omitted, the
CLI uses the default-admin profile.
Which commands work without a host profile and login?
Only init (a pre-OIDC, HMAC-signed bootstrap call) and the local profile hosts and
profile authn commands. Every other command is a remote gRPC call that requires a host profile
created with profile hosts create and an authenticated session from
profile authn login.