-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dbaf79e
commit 2570b19
Showing
7 changed files
with
89 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
+++ | ||
title = "Project 2" | ||
description = "Example description" | ||
weight = 1 | ||
# weight = 2 | ||
|
||
[extra] | ||
# You can also crop the image in the url by adjusting w=/h= | ||
remote_image = "https://images.unsplash.com/photo-1523821741446-edb2b68bb7a0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80" | ||
# remote_image = "https://images.unsplash.com/photo-1523821741446-edb2b68bb7a0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80" | ||
+++ | ||
|
||
Example project page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
+++ | ||
title = "Project 3" | ||
description = "Example description" | ||
weight = 1 | ||
# weight = 3 | ||
|
||
[extra] | ||
remote_image = "https://images.unsplash.com/photo-1462556791646-c201b8241a94?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1465&q=80" | ||
# remote_image = "https://images.unsplash.com/photo-1462556791646-c201b8241a94?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1465&q=80" | ||
+++ | ||
|
||
Example project page | ||
Example project page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
+++ | ||
title = "Project 4" | ||
description = "Example description with a lot of words but without any meaning. Why use lorem ipsum when you can just write a lot of text that has no underlying meaning?" | ||
weight = 1 | ||
# weight = 4 | ||
|
||
[extra] | ||
remote_image = "https://images.unsplash.com/photo-1620121692029-d088224ddc74?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1632&q=80" | ||
# remote_image = "https://images.unsplash.com/photo-1620121692029-d088224ddc74?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1632&q=80&h=322.219&w=483.333" | ||
+++ | ||
|
||
Example project page | ||
Example project page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
+++ | ||
title = "Project 4" | ||
title = "Project 5" | ||
description = "Example description" | ||
weight = 1 | ||
# weight = 5 | ||
|
||
[extra] | ||
# remote_image = "https://images.unsplash.com/photo-1650547002676-7cd5dea3175e?q=80&h=322.219&w=483.333&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" | ||
+++ | ||
|
||
Example project page | ||
Example project page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
+++ | ||
title = "Rupit" | ||
description = "a simple CLI tool to run long terminal commands by aliases" | ||
weight = 1 | ||
|
||
[extra] | ||
# local_image = "/projects/project-1.jpg" | ||
# link_to = "https://github.com/not-matthias/apollo" | ||
+++ | ||
|
||
# Rupit | ||
|
||
A simple CLI tool to run long, complex, and multistep terminal commands by aliases. | ||
|
||
using a configuration file `rupit.json`, that contains the list of aliases for rupit to use. | ||
|
||
## How to use | ||
|
||
For Linux users you can use the pre-built binary from the releases <a href="https://github.com/mohamedeliwa/rupit/releases" target="_blank">page</a>, it's built and tested on **Ubuntu 22.04.4 LTS**, | ||
|
||
or you can build from source for linux, windows, and macOS systems using the following steps: | ||
|
||
1. Pull the repo: | ||
|
||
```sh | ||
git pull [email protected]:mohamedeliwa/rupit.git | ||
``` | ||
|
||
2. Build the project with: | ||
|
||
```sh | ||
cargo build --release | ||
``` | ||
|
||
3. Put the release binary in a suitable execution path | ||
4. Create `rupit.json` file, with a structure similar to the following: | ||
|
||
```json | ||
{ | ||
"aliases": { | ||
"greetings": "echo \"Hello World\"", | ||
"multistep": "cd ~; touch test.txt" | ||
} | ||
} | ||
``` | ||
|
||
> Note: depending on your OS the path at which to put the file will be | ||
> **Linux**: /home/\<user>/.config/rupit/rupit.json | ||
> **Windows**: C:\Users\\\<user>\AppData\Roaming\Foo Corp\Bar App\rupit.json | ||
> **macOS**: /Users/\<user>/Library/Application Support/com.Foo-Corp.Bar-App/rupit.json | ||
5. Run the command with an alias name `rupit <ALIAS>` | ||
|
||
```sh | ||
rupit greetings | ||
``` | ||
|
||
this will execute the following: | ||
|
||
```sh | ||
echo "Hello World" | ||
|
||
Hello World | ||
``` | ||
|
||
## Available Commands | ||
|
||
- `rupit run <alias>` -> to run specific alias command from the config file. | ||
- `rupit show -c` -> to show the expected path of the config file. | ||
- `rupit show -a <alias>` -> to print the alias corresponding command without executing it. | ||
- `rupit help` -> to print the help message |