A simple project management tool for the command line written in Rust.
Note: All of these commands have even shorter aliases. You can get the aliases for your shell via p aliases SHELL
- Demo
- Table of Contents
- Availability
- Installation
- Configuration
- User Configuration
- Version Configuration
- External Version Repositories
p is available for macOS and Linux. If you're using Windows, use WSL.
Download the binary from the latest release and install it.
All configuration is done in the ~/.p/ directory, which gets created when you run p for the first time. The central configuration file is ~/.p/config.toml.
The following is the schema for the TOML configuration file, located at ~/.p/config.toml.
pub struct UserConfigSchema {
pub projects_dir: String,
pub project_management_tool: String,
pub version_repositories: Option<Vec<String>>,
pub editor: Option<String>,
}
projects_dir
: The directory where all your projects are stored.
project_management_tool
: The default project management tool used by p.
version_repositories
: Optional. A list of external version repositories.
editor
: Optional. The default text editor used by p.
p treats each project as if it has its own 'version'. Versions are configurations that specify what kind of project it is and how to handle it. Versions are stored in ~/.p/versions/. To create a new version, create a new file in ~/.p/versions/. The file should contain a valid TOML configuration. The following is the TOML configuration schema for a version:
pub struct VersionConfigSchema {
pub version: String,
pub description: String,
pub files_needed: Vec<String>,
pub directories_needed: Vec<String>,
pub specificity: u8,
pub project_management_tool: Option<String>,
}
version
: The name of the version.
description
: A short description of the version.
files_needed
: A list of files that the version needs.
directories_needed
: A list of directories.
specificity
: The specificity of the version. The higher the number, the more specific the version is. For example, if you have a version for a Rust project and a version for a Rust project with a Cargo.toml file, the version with the Cargo.toml file should have a higher specificity.
project_management_tool
: Optional. The project management tool used by p for this version.
p supports external version repositories.
To add an external version repository, add the URL to the version_repositories list in ~/.p/config.toml by running p repo add URL
.
To sync external version repositories, run p repo sync
. This will download all the versions from the external version repositories and store them in ~/.p/external_versions/.
To remove an external version repository, run p repo remove URL
. This will remove the URL from the version_repositories list in ~/.p/config.toml.
p provides an easy way to create a version repository. To create a version repository, run p repo new NAME
. This will create a new directory in your current directory. The directory will contain a versions
directory. You can add versions to the versions
directory, initialize a new git repository and push the repository to GitHub. Other users can then add your version repository to their p configuration.