The Project Management Tool (pjt) is a versatile Bash script designed to streamline the management of multiple projects. With pjt, you can add, create, list, run commands, and scan directories for projects. This README provides a detailed guide on how to use each of the available commands.
An installation script is provided
# download the script
curl -s https://raw.githubusercontent.com/DimitriGilbert/pjt/main/utils/get_pjt -O;
# make it executable
chmod +x get_pjt;
# display the help
./get_pjt --help;
# -b, --branch|--tag|--install-version <branch>: version to install
# --install-directory <install-directory>: where to install
# --install-file <install-file>: rc files to install to, forces install, repeatable
# -i|--install|--no-install: install in bashrc
# --remove-installer|--no-remove-installer: remove install script itself
# aliases: --rm,
# --ssh|--no-ssh: clone using ssh
# --zip|--no-zip: install using zip archive, not recommended
# generic install
./get_pjt --install;
Ensure that the `bin` directory is included in your `PATH`:
```sh
export PATH=$PATH:/path/to/pjt/bin
The main command for the Project Management Tool.
Project management tool:
target: pjt subcommand [one of 'add', 'config', 'create', 'list', 'run', 'scan']
Usage :
pjt <target>Add an existing project to the management tool.
pjt add
Add an existing project:
name: The path of the existing project to add
path: The path of the existing project to add
--config-dir <config-dir>: pjt config directory
--description <description>: project description
Usage :
pjt add <name> <path> [--config-dir <value>] [--description <value>]Manage the configuration of the tool. (Note: This section is incomplete and requires further detail.)
pjt config
Manage the configuration:
target: The subcommand to run [one of 'add', 'remove', 'show']
Usage :
pjt config <target>Create a new project.
pjt create
Create a new project:
project-name: The name of the project to create
-i, --init <init>: Initialization command or script, repeatable
--config-dir <config-dir>: pjt config directory
--parent <parent>: parent directory
Usage :
pjt create <project-name> [--init <value>] [--config-dir <value>] [--parent <value>]List all managed projects.
pjt list
List all projects:
--config-dir <config-dir>: pjt config directory
Usage :
pjt list [--config-dir <value>]Run a command within the context of a specified project.
pjt run
Run a command in the project directory:
project-name: The name of the project
command: The command to run in the project directory
--config-dir <config-dir>: pjt config directory
Usage :
pjt run <project-name> <command> [--config-dir <value>]Scan a directory for existing projects and optionally add them to the management tool.
pjt scan
Scan a directory for existing projects:
directory: The directory to scan for projects
--config-dir <config-dir>: pjt config directory
--add-all|--no-add-all: Flag to add all found projects
Usage :
pjt scan <directory> [--config-dir <value>] [--[no-]add-all]-
Add a Project: Add an existing project located at
/path/to/project.pjt add myproject /path/to/project --description "A sample project" -
Create a New Project: Create a new project named
newprojectwith an initialization script.pjt create newproject --init "init_script.sh" -
List Projects: List all managed projects.
pjt list
-
Run a Command: Run the
makecommand in the context of themyproject.pjt run myproject make
-
Scan Directory: Scan the
/projectsdirectory and add all found projects.pjt scan /projects --add-all
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License.
For any questions or issues, please open an issue on the GitHub repository.