Tau is a powerful project construction tool made in Rust. It enables users to build projects based on predefined templates and commands.
- Template Management: Easily manage templates by adding new ones, editing existing ones, or removing them.
- Command Management: Add or edit predefined commands that work seamlessly with your templates.
- Directory Intelligence: Tau recognizes the template in use within a directory and adjusts its available commands accordingly.
- Root Directory Scaling: Tau automatically scales across directories to find the root of your project and execute commands from there.
new
: Create a new project from an available template.path
: Display the resource paths used by Tau.list
: List all available templates.help
: Print this help message or the help of the given subcommand(s).
To get started with Tau, you first need to install it. Follow these steps:
git clone https://github.com/zam-cv/tau
cd tau
cargo install --path .
Move to the directory where you want to create or manage your project.
Use the command tau new <project_name>
to initiate a new project based on an available template.
Once you're within a project directory, Tau can detect the template in use and provides corresponding commands for that template.
Tau can traverse directories to find the root of your project, ensuring commands are executed correctly, even if you're in a subdirectory of the project.
To edit commands or add more templates, navigate to the config.json
file by using the command tau path
. You will see:
Config: "PROJECT_DIR/config.json"
Templates: "PROJECT_DIR/templates/"
The config.json
file is where you can add or modify commands. The templates/
directory is where you can place new project templates or edit existing ones.
Example of configuring the default C++ template found in the config.json
file.
{
"c++": {
"optional_files": [
".gitignore",
"README.md",
"tests/test.cpp",
"include/add.h"
],
"commands": {
"run": {
"tasks": [
{
"name": "Build",
"command": "make"
},
{
"name": "Run",
"command": "./build/main"
}
],
"args": null,
"description": "Build and run the project"
},
"bin": {
"tasks": [
{
"name": "Bin",
"command": "./build/main"
}
],
"args": null,
"description": "Run the project"
},
"test": {
"tasks": [
{
"name": "Test",
"command": "make tests"
},
{
"name": "Run",
"command": "./build/tests"
}
],
"args": null,
"description": "Build and run the tests"
},
"clean": {
"tasks": [
{
"name": "Clean",
"command": "make clean"
}
],
"args": null,
"description": "Clean the project"
}
},
"routes": []
}
}