https://choria-io.github.io/appbuilder/
brew tap choria-io/tap
brew install choria-io/tap/appbuilder
appbuilder --version
Instead of using the default locations for appbuilder
, which for macOS is $HOME/Library/Application Support
, we want to use a Git repository. Therefore, we need to set the XDG_CONFIG_HOME
environment variable. For our installation, we are setting the environment in $HOME/.zshrc
:
export XDG_CONFIG_HOME=$HOME/github
Why XDG_CONFIG_HOME
? The only XDG value that appbuilder uses is ConfigHome in builder.go
I also created an appbuilder
Git repository because as referenced in builder.go
, appbuilder
is automatically appended to the Source Locations paths from appbuilder info
:
appbuilder info
Choria Application Builder
Debug Logging (BUILDER_DEBUG): false
Configuration File (BUILDER_CONFIG): not specified
Definition File (BUILDER_APP): not specified
Source Locations: /Users/dpope/github/appbuilder, /etc/appbuilder
We're also going to need to do symlinking later on. For our environment, we make sure we have a directoy on PATH
:
export PATH=$HOME/.local/bin
At this point, we are ready to start command development.
- In the
appbuilder
Git repository, create a<command>-app.yaml
wherecommand
is the CLI you will want to call. For example,demo-app.yaml
will translate todemo
- Link
appbuilder
to the command. For example, fordemo
:ln -s /usr/local/bin/appbuilder $HOME/.local/bin/demo
- Test the command
demo help