Crates.io | vector-project-manager |
lib.rs | vector-project-manager |
version | 0.2.1 |
source | src |
created_at | 2023-12-07 11:56:26.17291 |
updated_at | 2024-11-19 15:58:10.721981 |
description | Project folder manager. |
homepage | |
repository | https://github.com/victorhornet/vpm |
max_upload_size | |
id | 1060928 |
size | 57,614 |
Small CLI tool to manage my projects folder.
Install with cargo
:
cargo install vector-project-manager
vpm [COMMAND]
For a list of commands, run vpm --help
.
Example shortcuts using vpm
.
# cd into a project by its ID.
# Usage: pj <ID>
# Example: pj 1
pj() {
project_path=$(vpm path $1)
if [ -z "$project_path" ]; then
return 1
fi
cd $project_path
}
# Fuzzy search for a project and cd into it.
# Usage: j <QUERY>
# Example: j some-proj
j() {
project_path=$(vpm -p search -l 1 $1)
if [ -z "$project_path" ]; then
echo "No project found"
return 1
fi
cd $project_path
}
Fish functions can be installed with vpm init fish
.
⚠️ This will overwrite your
~/.config/fish/functions/j.fish
and~/.config/fish/functions/pj.fish
files.
# cd into a project by its ID.
# Usage: pj <ID>
# Example: pj 1
function pj
set path (vpm path $argv[1])
if set -q path[1]
cd $path
end
end
# Fuzzy search for a project and cd into it.
# Usage: j <QUERY>
# Example: j some-proj
function j
set path (vpm -p search -l 1 (echo $argv))
if set -q path[1]
cd $path
else
echo "No project was found for query: $argv"
end
end