Skip to main content

Jector

jector

Jector is a command line tool that creates project filestructures for you. I made it to speed up my workflow: I don’t have to copy and rename folders with the help of jector. It can also run scripts in several different contexts, so it can create a venv upon project creation (for example)

I made jector work with local folders and remote repos, so you can use both private templates as well as pre-made ones from the internet. Since the templates and scripts aren’t baked in, they’re completely customizable. With the simple syntax on the jector.toml file, you can create the perfect template for your needs.

[[template]]
name = "picorust"
git = "https://gitlab.com/slusheea/rp2040-rs-template"

[[template]]
name = "python"
dir = "/home/user/Documents/Code/Templates/Python"
scripts = ["mkvenv", "git_init"]

# Adds a predefined script
[[script]]
name = "mkvenv"
run = "/home/user/Documents/Code/Scripts/venv_creator.sh"

[[script]]
name = "git_init"
run = "/home/user/Documents/Code/Scripts/git_initter.sh"

For this example config, I can run jector picorust robot_arm and jector will create a folder called robot_arm with all the contents needed to start programming the rpi pico. As you can see, it does it by cloning the provided git repository. By running jector python oxygen_sensor, jector copies the local template folder, renames it to oxygen_sensor and creates a venv on the folder. As you can see it uses an array of scripts to run, so it also runs the git_initter.sh script.

Jector doesn’t have the best code, clippy complains every time that the main function is too long. But I don’t think I’m going to be refactoring in the near future, I’m currently invested on a 5 DoF robot arm powered by the rp pico and rust. If you think jector can be useful for you, give it a try! I use it constantly.

Oh, and just as a fun fact, I came up with the name with this process: project -> projector but this program is the furthest thing from pro, so just jector.

Check out the project on gitlab: https://gitlab.com/slusheea/jector