https://github.com/anyone-developer/gc
Orchestrate good commands with your desired way. It's a CLI for aggregate and execute commands with command line way. "gc" means "Good Command".
https://github.com/anyone-developer/gc
gc rust tool
Last synced: 2 months ago
JSON representation
Orchestrate good commands with your desired way. It's a CLI for aggregate and execute commands with command line way. "gc" means "Good Command".
- Host: GitHub
- URL: https://github.com/anyone-developer/gc
- Owner: anyone-developer
- Created: 2023-09-20T09:12:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-25T01:44:17.000Z (over 1 year ago)
- Last Synced: 2024-05-28T18:39:35.115Z (about 1 year ago)
- Topics: gc, rust, tool
- Language: Rust
- Homepage:
- Size: 480 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gc (Good Commands)
Orchestrate good commands with your desired way. It's a CLI for aggregate and execute commands with command line way. "gc" means "Good Command". **(Maybe Garbage Command. LOL)**
## Usage scenario
### 1. Get changed files from git repo.
In some companies, when you create a PR for code review. Sometimes you need generate the changed files from your branch. And you need paste those stuff in the PR description. you can borrow "gc" to simplify these work.
### 2. Shorten long commands into concise commands
You can customize and aggregate long commands into small commands. all of stuff can be configurable.
## Configuration
When gc initialized, it will automatically create .gc_config file under the home path. for MacOS user, you can find from ~/.gc_config. Configuration stores with json format. can be changed manually.
```json
{
"app": "App",
"version": "Version",
"source": "https://github.com/Anyone-Developers/gc",
"commands": {
"git-cached-changes": {
"type": "String",
"name": "git-cached-changes",
"detail": "git diff --name-only --cached #0",
"prefix": " [x] ",
"suffix": null
},
"git-changes-branches": {
"type": "String",
"name": "git-changes-branches",
"detail": "git diff --name-only #0 #1",
"prefix": " [x] ",
"suffix": "🚀"
},
"git-test": {
"type": "String",
"name": "git-test",
"detail": "git diff agsfd",
"prefix": null,
"suffix": null
},
"git-changes": {
"type": "String",
"name": "git-changes",
"detail": "git diff --name-only",
"prefix": " [x] ",
"suffix": "🚀"
}
}
}
```## Inline commands
### add
for adding aggregated command for gc. command detail support # sign variables. It's start with 0.
for example:
```shell
gc add git-changes-branches "git diff --name-only #0 #1" --prefix=" [x] " --suffix="🚀"
```### delete
for deleting aggregated command for gc.
for example:
```shell
gc delete git-changes-branches
```### run
for executing aggregated command from gc.
for example
```shell
gc run git-changes-branches "develop,main"
```
### list
for listing all of commands from gc. and display them with a table.
for example:
### help
display help information.
## Planning Feature
- [ ] Support System Variables. eg. It can be setup with ${JAVA_HOME}
- [ ] Support more command types. like setup shell script. Currently, only support "String".
- [ ] Auto update CLI with inline command.
- [ ] Auto install and uninstall shell script. like nvm.
- [ ] And many unlisted features. Mail me your idea: [email protected].## Donation
Currently, I am laid off. I need suitable job to raise my life. If you have interests to my skill, Please contact me. [[email protected]](mailto:[email protected])