Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gumieri/p
Collection of helping commands for the management of projects using git
https://github.com/gumieri/p
cli git gitlab workflow
Last synced: about 1 month ago
JSON representation
Collection of helping commands for the management of projects using git
- Host: GitHub
- URL: https://github.com/gumieri/p
- Owner: gumieri
- License: mit
- Created: 2019-06-15T20:15:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-13T16:47:52.000Z (almost 2 years ago)
- Last Synced: 2024-12-08T07:42:48.458Z (about 1 month ago)
- Topics: cli, git, gitlab, workflow
- Language: Go
- Homepage:
- Size: 82 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# p(rojects)
Collection of helping commands for the management of projects using git.## Configurations
`p` will look for configurations at `$XDG_CONFIG_HOME/p/config.yaml` or `~/.p.yaml`.
The file can be a JSON, TOML, YAML, HCL or envfile. Any configuration can also be set as environment variable.
I recommend to use the projects path configuration as environment variable (`$PROJECTS_PATH`).A configuration example:
```
projects_path: "~/Projects"
gitlab_token: "wd4qRsNpHci5wtizByap"
gitlab_url: "git.private.local"
gitlab_https: false
```## Commands
### `p`
List all projects into `$PROJECTS_PATH`### `p clone`
A `git clone` with power-ups.
It will create the path as `$PROJECTS_PATH/HOST/…/GROUPS/PROJECT`:
```
$ p clone [email protected]:gumieri/p.git
ssh://[email protected]/gumieri/p.git: cloning into /home/rafael@gumieri/Projects/github.com/gumieri/p.
ssh://[email protected]/gumieri/p.git: completed.
```
It is also able to clone multiple projects from gitlab groups and subgroups:
```
$ p clone [email protected]:group/subgroup
ssh://[email protected]:group/subgroup/project1.git: cloning into /home/rafael@gumieri/Projects/git.private.local/group/subgroup/project1.
ssh://[email protected]:group/subgroup/project2.git: cloning into /home/rafael@gumieri/Projects/git.private.local/group/subgroup/project2.
ssh://[email protected]:group/subgroup/project1.git: completed.
ssh://[email protected]:group/subgroup/project3.git: cloning into /home/rafael@gumieri/Projects/git.private.local/group/subgroup/project3.
ssh://[email protected]:group/subgroup/project2.git: completed.
ssh://[email protected]:group/subgroup/project3.git: completed.
```### `p tag`
To tag git projects with semantic versioning.
It will respect if it has a `v` prefix or not.Listing all tags (semantic ordered):
```
$ p tag
0.0.0
```
Creating new tags, and pushing it:
```
$ p tag patch
0.0.1
$ p tag minor
0.1.1
$ p tag major
1.1.1
$ p tag patch --push
1.1.2
$ p tag major --remote elsewhere --push
2.1.2
```
It also has a shortcut to handle the higher (semantic ordered) tag:
```
$ p tag last
1.1.1
$ p tag last --delete
$ p tag last
0.1.1
```A simple combination:
```
$ p tag patch && git push origin `p tag last`
```