| Crates.io | projectctl |
| lib.rs | projectctl |
| version | 1.0.0 |
| created_at | 2022-11-29 14:57:17.352978+00 |
| updated_at | 2023-01-05 14:31:42.085489+00 |
| description | CLI tool to manage project |
| homepage | |
| repository | https://github.com/leroyguillaume/projectctl |
| max_upload_size | |
| id | 725458 |
| size | 396,940 |
CLI tool to manage project.
VERSION=1.0.0
# Linux x64
curl -Lfo /usr/local/bin/projectctl https://github.com/leroyguillaume/projectctl/releases/download/v$VERSION/projectctl-$VERSION-linux-x64
# Linux aarch64
curl -Lfo /usr/local/bin/projectctl https://github.com/leroyguillaume/projectctl/releases/download/v$VERSION/projectctl-$VERSION-linux-aarch64
# MacOS x64
curl -Lfo /usr/local/bin/projectctl https://github.com/leroyguillaume/projectctl/releases/download/v$VERSION/projectctl-$VERSION-macos-x64
# MacOS ARM
curl -Lfo /usr/local/bin/projectctl https://github.com/leroyguillaume/projectctl/releases/download/v$VERSION/projectctl-$VERSION-macos-aarch64
sudo chmod +x /usr/local/bin/projectctl
# Allow projectctl to source environment variables automatically when you're entering into a directory present in ~/.projectctl/allowed-dirs
# If you're using bash
echo 'eval "$(projectctl hook bash)"' >> ~/.bashrc
source ~/.bashrc
# If you're using zsh
echo 'eval "$(projectctl hook zsh)"' >> ~/.zshrc
source ~/.zshrc
cargo install projectctl
# Allow projectctl to source environment variables automatically when you're entering into a directory present in ~/.projectctl/allowed-dirs
# If you're using bash
echo 'eval "$(projectctl hook bash)"' >> ~/.bashrc
source ~/.bashrc
# If you're using zsh
echo 'eval "$(projectctl hook zsh)"' >> ~/.zshrc
source ~/.zshrc
git clone https://github.com/leroyguillaume/projectctl
cargo install --path projectctl
# Allow projectctl to source environment variables automatically when you're entering into a directory present in ~/.projectctl/allowed-dirs
# If you're using bash
echo 'eval "$(projectctl hook bash)"' >> ~/.bashrc
source ~/.bashrc
# If you're using zsh
echo 'eval "$(projectctl hook zsh)"' >> ~/.zshrc
source ~/.zshrc
To create a new project from a template, you can use new subcommand.
By default, leroyguillaume/projectctl-templates is used as templates repository. Each directory matches a template. Feel free to open a pull request to add one if you want! You can override it by using --git option.
Liquid is using as template engine. Each file with .liquid extension will be rendered. You can templatize filenames.
projectctl injects some variables:
name that has for value the project namedescription that has for value the project description (can be set with -d option, unset by default)env that contains all environment variablesgit that contains default git configurationYou can also define any variable you want but keep in mind that you will have to set it when you run command by adding --values option.
Examples:
projectctl new rs-lib my-project-name
projectctl new --values '{"repository-url":"https://github.com/username/project-name"}' rs-lib my-project-name
projectctl automatically updated ~/.projectctl/allowed-dirs.
When you want to delete a project, you can run the following command to make sure everything is clean-up:
projectctl destroy my-project-name
When you run projectctl env, these configuration files are loaded (from least to most priority):
projectctl.ymlprojectctl.local.ymlNote that you can override these locations with option -c (or --config).
All configuration files must match this JSON schema.
You can find here some configuration examples.