Skip to main content

List

List each command of this binary, and the layer that made it.

The layer is command for a command of a local group, endpoint for a command of an endpoint group, behavior for a command of a behavior, and hand-written for a command in cmd/ that no definition makes yet.

osapi dsl command list

Examples​

osapi dsl command list
osapi dsl command list --json

Result​

The command prints:

$ osapi dsl command list
Commands (4):
  COMMAND                          LAYER     DESCRIPTION
  osapi controller token generate  command   Generate a new token
  osapi controller token validate  command   Validate a token for authenticity and claims
  osapi client agent list          endpoint  List active agents
  osapi client node hostname get   behavior  Get the hostname
  Command:       2
  Endpoint:      1
  Behavior:      1
  Hand written:  0

With --json, the command prints:

{
"items": [
{
"command": "osapi controller token generate",
"layer": "command",
"group": "controller token",
"doc": "Generate a new token"
},
{
"command": "osapi controller token validate",
"layer": "command",
"group": "controller token",
"doc": "Validate a token for authenticity and claims"
},
{
"command": "osapi client agent list",
"layer": "endpoint",
"group": "agent",
"doc": "List active agents"
},
{
"command": "osapi client node hostname get",
"layer": "behavior",
"group": "hostname",
"doc": "Get the hostname"
}
],
"command": 2,
"endpoint": 1,
"behavior": 1,
"hand_written": 0
}

Global flags​

FlagDescriptionDefault
-d, --debugEnable or disable debug mode
-j, --jsonEnable JSON output
-f, --osapi-filePath to config file; without one at the default path, osapi runs on the defaults/etc/osapi/osapi.yaml

Output tells how the result is printed, and what --json gives.