autobot 0.0.0+8 autobot: ^0.0.0+8 copied to clipboard
A command line tool for automating common developer tasks like generate files, manage environment, configure projects and setup CI.
autobot
A command line tool for automating common development tasks like generate files, manage environment, configure projects or setup for CI.
Installation #
-
Install Dart following this instructions.
-
Activate autobot running the following command:
$ dart pub global activate autobot
Commands #
version #
Prints the autobot version.
$ autobot version
init #
Initializes a autobot_config.yaml
in the working directory.
$ autobot init
Use init -g
to initialize a global config file in your home directory.
$ autobot init -g
run
The run command has the -t
(template
) option. Use run -t <template_file_name_without_yaml_extension>
to run a template.
$ autobot run -t myTemplateName
Make sure that you have either initialized a directory specific autobot_config.yaml
or a global .autobot_config.yaml
using the init
command. The template file must be places inside the templateDirectory
which can be definid in the autobot_config.yaml
file.
Templates #
A autobot template is a yaml file. It describes what autobot has to do.
inputs #
Add a list of inputs to tell autobot that you need some information from the user.
inputs:
- key: userName
prompt: What is your name?
- key: userAge
prompt: How old are you?
Running this template, autobot will print the two prompts to the user and assign the input values to the keys.
outputs #
Add a list of outputs to tell autobot that you what to write some files.
inputs:
- key: userName
prompt: What is your name?
- key: userAge
prompt: How old are you?
outputs:
- path: some/relative/path.txt
write: true
content: Hi {{ userName }}
- path: /some/non_relative/path.txt
write: true
content: |
Hi {{ userName }},
is it true that you are {{ userAge }} years old?
Autobot uses mustache to redner the output fields. This means that you can use the input keys to render dynamic values in path
, write
or content
field of a output definiton.
autobot_config #
The autobot_config.yaml
is necessary for some commands like run
.
Currently it support only the templateDirectory
field. This allows for defining in which directory autobot should search for templates.