Tutorials
Here you'll find a series of steps to achieve a goal.
Create your first project
To create a new project, create a new directory and fetch default values like this.
mkdir myProject cd myProject avalon --init # Edit .inventory.toml and .config.toml avalon --save
--init
and --save
will take into account the name of the parent directory as the project name and produce two files, the "inventory" and "config". You can override this via --root
. See --help
for details.
- See Project Inventory API for details on how to manage your
.inventory.toml
file. - See Project Configuration API for details on how to manage your
.config.toml
file.
Create your second project
Once you've tailored the configuration and inventory to your liking, you can re-use them for future projects.
- Copy your
.config.toml
and.inventory.toml
files from your first project. - Run the
--save
command
For example
mkdir mySecondProject cd mySecondProject copy ../myProject/.* ./ avalon --save
mkdir mySecondProject
cd mySecondProject
cp ../myProject/.* ./
avalon --save
The --init
command is used to write a generic configuration and inventory to your current working directory. If you already have some, it isn't necessary.
Create your first asset
With a project up and running, how do you actually go about creating assets?
cd myproject avalon --load # Edit .inventory.toml avalon --save
With --load
, the .inventory.toml
is written to your current working directory, ready for you to edit. Here's an example entry into the .inventory.toml
.
[[assets]] name = "Batman" label = "The Batman" # (Optional) Nicer name group = "Character" # (Optional) Visual grouping icon = "gear" # (Optional) Icon from FontAwesome
With the changes saved, you'll find the new asset in the Launcher.
Load project by name
Normally, the project name is derived from the current working directory. You may also pass a project name to the --load
argument, e.g. --load myproject
List available projects
When loading a project for the first time, you can list available in the Avalon database via avalon --ls