Skip to main content

Get

Print the behavior DSL: each option, method, example part and field tag.

Print each part of the behavior DSL, what it makes osapi do and when to use it. The list comes from this binary. Thus it agrees with the build that you run. Read it before you write a behavior, then check the result with osapi dsl behavior validate.

osapi dsl behavior spec get

Examples​

osapi dsl behavior spec get
osapi dsl behavior spec get --json

Result​

The command prints:

$ osapi dsl behavior spec get
Definition:
  Register(Define(name, doc, options...))
    Declares the behavior and adds it to the registry. The agent, the
    server, the CLI and the generator read the registry.
    Use: One time, in behavior.go: var Behavior =
    behavior.Register(behavior.Define(...)).

With --json, the command prints:

{
"kinds": [
{
"kind": "definition",
"title": "Definition",
"terms": [
{
"kind": "definition",
"name": "Register(Define(name, doc, options...))",
"does": "Declares the behavior and adds it to the registry. The agent, the server, the CLI and the generator read the registry.",
"when": "One time, in behavior.go: var Behavior = behavior.Register(behavior.Define(...))."
}
]
}
]
}

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.