Skip to content
This is the documentation for main, which is not released yet. Read the latest.

dicer token create

Makes a token for the daemon’s TCP listener, and prints it. It is shown only this once: the daemon keeps only the SHA-256 of its secret.

--scopes says what the token allows: * for everything, which is the default, or RESOURCE:ACTION, such as instances:write. RESOURCE is instances, snapshots, networks, volumes, images, kernels, tokens or events, and ACTION is read or write. Events have only read. A write scope allows reading too. A token can make only tokens its own scopes allow.

--secret-stdin reads the token’s secret instead of having the daemon make one: at least 32 letters and digits. It is for a tool that must know the token before it exists.

Usage

$ dicer token create NAME [flags]

Examples

$ dicer token create laptop
$ dicer token create ci --scopes instances:write,images:write

Flags

FlagDescription
--format stringOutput format: table for the token alone, json or yaml. Default: table.
--scopes stringsWhat the token allows, comma-separated (default: * for everything).
--secret-stdinRead the token’s secret from standard input.

Global flags

FlagDescription
-D, --debugTrace every call to the daemon on stderr (or set $DICER_DEBUG).
-r, --remote stringDaemon to talk to: a remote’s name, or an address (unix:///PATH or HOST:PORT) (default $DICER_REMOTE, then the current remote, then local).
--request-timeout durationGive up on a single call to the daemon after this long, e.g. 30s (0: never; streams such as logs -f and exec are not bounded).