]> git.armaanb.net Git - gen-shell.git/blob - README.md
move to sr.ht, minor updates
[gen-shell.git] / README.md
1 # gen-shell
2 A simple way to turn any command into a shell with arrow key/history support (if compiled with libreadline). Forked from [taskshell](https://github.com/GothenburgBitFactory/taskshell).
3
4 ## Usage
5 See `gen-shell --help`
6
7 ## Installation
8 ### From a binary
9 Binaries can be downloaded [from here](https://build.bhojwani.org/job/gen-shell/lastSuccessfulBuild/artifact/build/src/gen-shell). NB: these binaries are compiled against libreadline7, so if your system only has libreadline8, you can symlink 8 to 7 with `sudo ln -s /usr/lib/x86_64-linux-gnu/libreadline.so.8.0 /usr/lib/x86_64-linux-gnu/libreadline.so.7`. This isn't a great solution, but it gets the job done.
10
11 ### From source
12 If you would like to avoid this, you can build from source. Doing so requires:
13   - cmake (2.8 or higher)
14   - make
15   - gcc
16   - g++ (sometimes packaged as gcc-c++ or gcc-g++)
17   - cpp (any somewhat recent version is fine)
18   - libreadline development files (7 or 8 is fine, 5 is untested) (optional, but highly reccomended)
19
20 On a Debian or Ubuntu based distribution, you can install these dependencies with this command:
21 ```bash
22 sudo apt update && sudo apt install cmake make gcc g++ cpp libreadline-dev
23 ```
24 Then download and build gen shell:
25 ```bash
26 git clone --recursive https://codeberg.org/armaan/gen-shell
27 cd gen-shell
28 cmake .
29 sudo make install
30 ```
31 ### Docker
32 You can also run gen-shell in docker. Simply use
33 ```bash
34 docker run -it -e command=<command> -e before_command=<before command> -e after_command=<after command> -e custom_prompt=<custom prompt> armaanb/gen-shell
35 ```
36 Or to build the docker container locally, run:
37 ```bash
38 git clone --recursive https:/codeberg.org/armaan/gen-shell
39 cd gen-shell
40 docker build gen-shell:latest .
41 ```
42 This method ensures that you have the latest version, and also lets you modify the code in the docker image
43
44 ## License
45 Following suit from taskshell, gen-shell is MIT licensed by Armaan Bhojwani, 2020. Gen-shell is forked from taskshell, which was developed by [these people](https://github.com/GothenburgBitFactory/taskshell/blob/master/AUTHORS).
46
47 Gen-shell uses the [Sarge library](https://github.com/MayaPosch/Sarge) for parsing command-line arguments. Sarge was written by Maya Posch and is BSD 3-Clause licensed. It is added as a submodule in the root folder of this repository.