WardrikDaemon.CLI (wardrik_daemon v0.1.0-rc.1)

Copy Markdown

The wardrik command, also installed as rik.

wardrik agent ls
wardrik ask triage "What's new?"
wardrik approval approve triage CALL --json

Each command runs an operation on the daemon over its HTTP API. It acts with the token the daemon writes to cli_token as it starts. WARDRIK_URL and WARDRIK_TOKEN point it at another daemon.

Commands are grouped in namespaces, as agent ls and token create. ask, follow and ls are shortcuts. Each is a WardrikDaemon.CLI.Command, defined once for its help, its options and running it.

Every command takes --json, and then prints the operation's JSON. An agent is named by its ID, as acme/triage, or without the deployment's org, as triage or @jon/notes.

serve, start, stop, pid, logs and service run the daemon itself, so the bin/wardrik script handles them.

Summary

Functions

Returns every command, in the order help lists them within each group.

Runs the command argv names, as bin/wardrik does, then halts the VM with its exit status.

Runs the command argv names. Returns the exit status.

Functions

commands()

@spec commands() :: [WardrikDaemon.CLI.Command.t()]

Returns every command, in the order help lists them within each group.

halt(argv)

@spec halt([String.t()]) :: no_return()

Runs the command argv names, as bin/wardrik does, then halts the VM with its exit status.

main(argv, opts \\ [])

@spec main([String.t()], keyword()) :: 0 | 1

Runs the command argv names. Returns the exit status.

Options