CLI

A CLI to start, query and manipulate awe pages.

Any option (argument prefixed with -/--) that is generally speaking, complex (dict, list, etc…), will be yaml parsed. For example, when running this:

awe new --obj 'Text: Hello World'

obj will be evaluated to {"Text": "Hello World"}.

In addition, prefixing such arguments with @ will load the file referenced by the option and the content of that file will be yaml parsed. e.g.

awe new --obj '@/home/dan/awe-templates/table.yaml'

Object definitions when calling awe new should follow the DSL specification.

awe

A CLI to start, query and manipulate awe pages.

awe [OPTIONS] COMMAND [ARGS]...

Options

-h, --host <host>

Server host.

Default:127.0.0.1
-p, --port <port>

Server port.

Default:8080
-o, --output-format <output_format>

Command output format. (choices: json, yaml)

Default:json
Options:json | yaml
-l, --output-line

Compact single line JSON output.

Default:False
-q, --quiet

Silence all command output.

Default:False

call

Call an element method.

awe call [OPTIONS]

Options

-e, --element-id <element_id>

Required Element ID.

-m, --method <method>

Required Method name.

-k, --kwargs <kwargs>

Keyword arguments passed to method invocation.

call-function

Call a registered function.

awe call-function [OPTIONS]

Options

-f, --function-id <function_id>

Required Function ID.

-k, --kwargs <kwargs>

Keyword arguments passed to function invocation.

get

Get a registered element.

awe get [OPTIONS]

Options

-e, --element-id <element_id>

Required Element ID.

get-variable

Get a registered variable.

awe get-variable [OPTIONS]

Options

-v, --variable-id <variable_id>

Required Variable ID.

ls

List all elements.

awe ls [OPTIONS]

Options

-d, --include-data

Include element data in output.

Default:False
-p, --include-props

Include element props in output.

Default:False

ls-variables

List all variables.

awe ls-variables [OPTIONS]

new

Create a new element.

awe new [OPTIONS]

Options

-o, --obj <obj>

Required Element definition.

-p, --params <params>

Keyword arguments to use when creating obj.

-e, --element-id <element_id>

Optionally specify an element ID. (one will be generated otherwise)

-r, --root-id <root_id>

Optionally specify a different root to creat the element under. If not specified, and parent_id is not supplied, the main page root will be used.

-c, --parent-id <parent_id>

Optionally specify the element create the new element under.

-n, --new-root

Create element under a new root.

Default:False

new-prop

Create a new prop child.

awe new-prop [OPTIONS]

Options

-e, --element-id <element_id>

Required Element ID.

-n, --name <name>

Required Prop name.

new-variable

Create a new variable.

awe new-variable [OPTIONS]

Options

-v, --variable-id <variable_id>

Optionally supply a variable ID, one will be generated otherwise.

-d, --value <value>

Required Initial variable value.

remove

Remove an element.

awe remove [OPTIONS]

Options

-e, --element-id <element_id>

Required Element ID.

start

Start a new page.

awe start [OPTIONS]

Options

-t, --title <title>

Page title.

Default:Awe
-w, --width <width>

Page width.

Default:1200
-b, --open-browser

Open a browser with the newly created page.

Default:False
-o, --obj <obj>

Optional top level element definition.

-p, --params <params>

Keyword arguments to use when creating obj if supplied.

-s, --style <style>

Customize root element style.

--host <host>

Start page on a custom webserver host (interface).

Default:127.0.0.1
--port <port>

Start page on a custom webserver port.

Default:8080
--websocket-port <websocket_port>

Start page on a custom websocket port.

Default:9000

status

Get server status.

awe status [OPTIONS]

update-data

Update element data.

awe update-data [OPTIONS]

Options

-e, --element-id <element_id>

Required Element ID.

-d, --data <data>

Required New data to set on element.

update-prop

Update an element prop.

awe update-prop [OPTIONS]

Options

-e, --element-id <element_id>

Required Element ID.

-p, --path <path>

Required Prop path.

-v, --value <value>

Required Prop new value.

update-props

Update element props.

awe update-props [OPTIONS]

Options

-e, --element-id <element_id>

Required Element ID.

-p, --props <props>

Required New props to set on element.

update-variable

Update a variable.

awe update-variable [OPTIONS]

Options

-v, --variable-id <variable_id>

Required Variable ID.

-d, --value <value>

Required Variable new value.