This guide covers installing App Builder and creating a first application.
Installation
The Releases page provides binaries, RPMs, DEBs, and zip files containing the appbuilder command. The binary can be placed anywhere in the system PATH.
brew tap choria-io/tap
brew install choria-io/tap/appbuilder
Hello World
The following example creates a command that invokes cowsay to demonstrate some capabilities of the system.
The command supports cowsay, cowthink, and an optional configuration override to use animalsay instead of cowsay.
demo say "hello world"
demo think "hello world"
The following YAML file (demo-app.yaml) describes the demo application. The reference sections cover all available options.
name: demodescription: Demo application for Choria App Builderauthor: https://github.com/choria-io/appbuildercommands:
- name: saydescription: Say something using the configured commandtype: execcommand: | {{ default .Config.Cowsay "cowsay" }} {{ .Arguments.message | escape }}arguments:
- name: messagedescription: The message to send to the terminalrequired: true - name: thinkdescription: Think something using a cowtype: execcommand: | cowthink {{ .Arguments.message | escape }}arguments:
- name: messagedescription: The message to send to the terminalrequired: true
Place this file in either /etc/appbuilder/demo-app.yaml or ~/.config/appbuilder/demo-app.yaml (~/Library/Application Support/appbuilder/demo-app.yaml on a Mac).
$ sudo mkdir -p /etc/appbuilder
$ sudo cp demo-app.yaml /etc/appbuilder/
$ sudo ln -s /usr/local/bin/appbuilder /usr/bin/demo
$ demo say "hello world"
_____________
< hello world >
-------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
$ demo think "this is pretty cool"
_____________________
( this is pretty cool )
---------------------
o ^__^
o (oo)\_______
(__)\ )\/\
||----w |
|| ||
The YAML file above makes the say command configurable. The following demonstrates how that works.
Create the following in /etc/appbuilder/demo-cfg.yaml.