Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benitolopez/p
Project automator for Bash and Zsh
https://github.com/benitolopez/p
bash project-management tool zsh
Last synced: about 2 months ago
JSON representation
Project automator for Bash and Zsh
- Host: GitHub
- URL: https://github.com/benitolopez/p
- Owner: benitolopez
- License: mit
- Created: 2016-11-12T02:00:06.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-16T00:19:17.000Z (about 8 years ago)
- Last Synced: 2024-04-14T23:41:04.943Z (10 months ago)
- Topics: bash, project-management, tool, zsh
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# P
**P** is a minimal project automator for Bash and Zsh. It was inspired by [prm](https://github.com/eivind88/prm), an awesome project of Eivind Arvesen. While I'm still thinking that *prm* is very good, I was looking for a project manager with a different logic and more simple. During the day, I switch between projects constantly, losing a lot of time. Sometimes I need to start some common tasks (launch Vim, start Gulp and so on), but often I only need to open the project with my editor.
That's why I have created **P**.
## How it works
When you run **P**, you run the script associated to your project. You can open a new shell window, start a task runner or run a command. It's up to you. **P** creates this script with only one variable, `PROJECT_PATH`, the path of your project.
Example:
```bash
# cd to your project directory
cd $PROJECT_PATH# run Gulp
gulp
```## Installation
Clone this repository:
```bash
git clone https://github.com/benitolopez/p.git
```Then add something like this in your `.bashrc`:
```bash
. /path/to/p.sh
```And ensure the script is executable
```bash
chmod +x /path/to/p.sh
```## Usage
```bash
Usage: pOptions:
Run project(s) configuration script.
add Add project.
list List all projects.
delete Delete project(s).
o Open project(s) with the default editor.
g Go to the project directory.
edit Edit project(s).
rename Rename project.
-h --help Display this information.
-v --version Display version info.
```So, to add a project just run `p add ` from the root of your project. This creates a `.sh` file in `~/.projects/`. Then you can run that script with `p `.
You can run multiple projects at once with:
```bash
p
```But sometimes you only need a quick way to open a project with your default editor. In this case, just run (multiple projects allowed):
```bash
p o
```And to go the project directory run:
```bash
p g
```## Options
You can modify some defaults exporting these environment variables:
```
_P_CMD # the P command, default 'p'
_P_DIR # projects directory where the scripts are saved
default '~/.projects'
_P_OPEN_FUNC # function used to open the project with
your default editor, default '$EDITOR .'
```## License
[MIT](http://opensource.org/licenses/MIT)
Copyright (c) 2016 [Benito Lopez](http://lopezb.com)