Crates.io | tesuto |
lib.rs | tesuto |
version | 0.3.0 |
source | src |
created_at | 2023-09-02 05:46:29.484652 |
updated_at | 2024-07-06 06:44:41.980093 |
description | Lightweight automation tool. |
homepage | https://github.com/kostya-zero/tesuto |
repository | https://github.com/kostya-zero/tesuto |
max_upload_size | |
id | 961548 |
size | 38,727 |
Tesuto is a minimalist tool that allows you to automate things like builds, deploys etc. It uses YAML syntax for their project to be less harder to understand how to work with it.
The main goal of this project is to provide a utility that is fast, lightweight and easy-to-use.
You can install Tesuto with cargo
:
cargo install tesuto
Also, if you have cargo-binstall
installed, you can use it too:
cargo binstall tesuto
If you would like to build Tesuto from source, use this command:
cargo build --release
To initialize new project use new
subcommand to run initialization wizard:
tesuto new
The initialization wizard will ask you 2 questions:
Refer to configuration section for how to configure project.
You can run your project with ease by using run
command:
tesuto run
# If your project is in different location.
tesuto run --project "configs/tesuto.yml"
Also, you can run specific job with run-job
command:
tesuto run-job cargo
Tesuto uses YAML syntax for projects. The structure for project is pretty simple:
name: TesutoProject
jobs:
hello:
- name: Print 'Hello world!'
run: echo "Hello World!"
quite: false
In the code block above you can see an example project. If you choose to not generate example project, you will see an empty one like this:
name: TesutoProject
require: []
jobs: {}
In the root of project there is 3 fields:
name
- Used to identify project.with
- Additional options to run your project.require
- List of programs that required to run this project.jobs
- Actions that Tesuto need to do.
We will skip name
field because it's obvious what it is purpose.with
optionThe with
field serves as additional options for your project. It has 2 options:
...
with:
shell:
program: "zsh"
args:
- "-c"
- "{}"
cwd: "build"
shell
- Allows you to specify the shell you want to run. Note that it is important to add curly braces to the args field as in the example above, because Tesuto will replace them with a command to run.cwd
- Changes the working directory for Tesuto.In the require
field you can specify which programs are required to run this project:
...
require:
- git
- cargo
...
It's a list of program that will be found through search in PATH. If one of this programs are not found, Tesuto will crash and tell you which program is not found.
Jobs contain steps that Tesuto needs to perform to complete a job. Every job in a project will be executed step-by-step. The syntax of a job looks like this:
...
jobs:
cargo:
- name: Build release binary
run: cargo build --release
quite: false
...
Step has 3 properties:
name
- The name of the step. If it's empty, it will be replaced with the command that the step should run.run
- The command to run. If this field is empty, Tesuto will display only the name of the step. If both name and run fields are empty, Tesuto will skip the step.quite
- Whether to display the output or not.
You can create as many jobs and steps as needed. There are no limits for your workflow.