Skip to main content

Create, use and share bashs commands

Project description

b4sh

Create, Use and share bash commands easily.

Requirements

  • pip (3.x recommend)

How to install

pip3 install b4sh

How to use

$ b4sh -h
[x] Starting b4sh...

usage: b (or b4sh) [-h] [-g GET] [-f FIND] [-c CREATE] [-ls LIST] [-v]

optional arguments:
  -h,  --help    Show this help message and exit.
  -g,  --get     To get a b4sh by key/id, Ex: b4sh -g apache2_eerft.
  -f,  --find    To find a b4sh by name online, Ex: b4sh -f nginx.
  -r,  --run     To run directly with the good key/id, Ex: b4sh -r nginx_eedrf4.
  -c,  --create  To create a new B4sh, Ex: b4sh -c / Or with a file_path, Ex: b4sh -c script.sh
  -ls, --list    To list all available offline/local b4sh shells.
  -v,  --version To get the actual version of b4sh.

To create a custom list of bash commands :

  • To create a custom b4sh

$ b4sh -c

[x] Starting b4sh...
[-] --------------------
[-] author : d4rk3r
[-] os-pid : 15205
[-] --------------------

[+] Creating a new b4sh...

[?] Title : hello world
[?] Description : Just an echo of hello world
[?] Content** ( In a new line, Ctrl-D to save the content ): 
echo 'Hello World !'
[+] b4sh hello_world_e48ec created/saved successfully !
  • To create a custom b4sh command from a file

$ b4sh -c script.sh

[x] Starting b4sh...
[-] --------------------
[-] author : d4rk3r
[-] os-pid : 11205
[-] --------------------

[+] Creating a new b4sh...

[?] Title : script.sh
[?] Description : Just a bash script
[+] Getting the content...
[+] b4sh script.sh_b3155 created/saved successfully !

The create command will create a json file in /home/$USER/.b4sh or C:/b4sh on Windows

-rw-r--r-- 1 d4rk3r d4rk3r  46 Dec  8 15:20 conf.json
-rw-r--r-- 1 d4rk3r d4rk3r 425 Dec  8 15:21 hello_world_e48ec.json

To search for a b4sh :

You just have to use the parameter find.

b4sh -f hello

[x] Starting b4sh...
[-] Searching for : hello...
[+] Listing results (1) :
[-] 1-) hello_world_e48ec

[?] Your choice (0 to quit):1
[-] Checking offline : hello_world_e48ec...
[-] Getting : hello_world_e48ec...
[-] - - -
[-] > hello_world_e48ec
[-] > sha256: bf0473c2d30f6f7bda45508eebe0483ec9b99fc298ed5d7e105a7eacd2fafcb3
[?] > See the content ? (Y/N): y
echo 'Hello World !'

[?] > See stats (used, votes...) ? (Y/N): y
[=] Stats:
[=] ____used_count: 0
[=] ____updated_count: 0
[=] ____up_vote: 0
[=] ____down_vote: 0
[?] > Execute it ? (Y/N): y
Hello World !
  • To get a b4sh by key/id :

b4sh -g hello_world_e48ec

[x] Starting b4sh...
[-] Checking offline : hello_world_e48ec...
[-] Getting : hello_world_e48ec...
[-] - - -
[-] > hello_world_e48ec
[-] > sha256: bf0473c2d30f6f7bda45508eebe0483ec9b99fc298ed5d7e105a7eacd2fafcb3
[?] > See the content ? (Y/N): y
echo 'Hello World !'

[?] > See stats (used, votes...) ? (Y/N): y
[=] Stats:
[=] ____used_count: 0
[=] ____updated_count: 0
[=] ____up_vote: 0
[=] ____down_vote: 0
[?] > Execute it ? (Y/N): y
Hello World !
  • To run by key/id :

b4sh -r hello_world_e48ec

[x] Starting b4sh...
[-] Checking offline : hello_world_e48ec...
[-] Getting : hello_world_e48ec...
[-] - - -
[?] > Execute it ? (Y/N): y
Hello World !
  • To list all offline b4sh :

b4sh -ls

[x] Starting b4sh...
[+] Listing results (1) :
[-] 1-) hello_world_e48ec

[?] Your choice (0 to quit):0
[x] Stopping b4sh.

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

b4sh-0.1.0.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

b4sh-0.1.0.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file b4sh-0.1.0.2.tar.gz.

File metadata

  • Download URL: b4sh-0.1.0.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.3

File hashes

Hashes for b4sh-0.1.0.2.tar.gz
Algorithm Hash digest
SHA256 8eb88e96cbb99e17b693c247522abb32c2d06d6b7e9e009ad1e8b6c76dfe0de1
MD5 d1ce0cc4e348122f4a04b4acfd7b72e6
BLAKE2b-256 b0614ba3db9eac80ae09b0d308da01e91bc366bbcb49b568b7848e0e33ef512c

See more details on using hashes here.

File details

Details for the file b4sh-0.1.0.2-py3-none-any.whl.

File metadata

  • Download URL: b4sh-0.1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.3

File hashes

Hashes for b4sh-0.1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 25461903ddffbaf542eb91a4d52aa6f8527c4410893a34a4e303ed515623b371
MD5 eb5aa4f30d9818a6919e0d02c9d2eee9
BLAKE2b-256 8c267782386533ce0494b5113eb79b99b6984d9f0be5cf3c5991e63e1f9153c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page