Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/veracioux/tuterm
A better way to learn CLI programs.
https://github.com/veracioux/tuterm
bash bash-script cli demo good-first-project hacktoberfest linux terminal tutorial
Last synced: about 20 hours ago
JSON representation
A better way to learn CLI programs.
- Host: GitHub
- URL: https://github.com/veracioux/tuterm
- Owner: veracioux
- License: mit
- Created: 2021-05-23T20:53:07.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-08T13:10:24.000Z (over 2 years ago)
- Last Synced: 2023-03-08T21:34:26.213Z (almost 2 years ago)
- Topics: bash, bash-script, cli, demo, good-first-project, hacktoberfest, linux, terminal, tutorial
- Language: Shell
- Homepage:
- Size: 113 KB
- Stars: 25
- Watchers: 2
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
tuterm
Learn the CLI by doing instead of watching
**Also check out:** [A collection of tutorials for your favorite CLI programs][collection]
Tuterm is a framework for running and creating real-time interactive tutorials
and demonstrations of CLI programs.Key features:
**For users**
* Ridiculously easy to use
* Step by step instructions
* Learn at your own pace
* No mistakes possible
* Customizable colors, delays and prompts**For tutorial creators**
* Nothing more than a bash extension
* Create interactive tutorials and non-interactive demos with the same code
* Simple framework and minimalistic design
* Well documented
* Doesn't reinvent the wheel
* 100% repeatable# Example
The following script defines a short tutorial/demo for the command `ls`.
```bash
# file: ls_tutorial
configure() {
DELAY=0.09
DELAY_SEP=0.12
DELAY_PROMPT=1.5
COLOR_MESSAGE='1;32'
}run() {
mkdir dir
touch file1 file2 .file3 dir/file
M "Let's just run the command."
cmdline ls
M "The -a option shows hidden files."
# c is an alias for cmdline
c ls -a
M "The -R option recurses into directories"
c ls -R
M "You can also see the file modes"
c ls -l
}
```
This script is run as:
```shell
tuterm ls_tutorial --mode MODE
```
There are two supported MODEs: tutorial and demo. Demo mode types out the
commands in real time just like a human would. Tutorial mode shows the user what
to type and then waits for them to type it, correcting any mistakes.Demo mode is great for creating terminal recordings. The video below was
generated using asciinema:```shell
asciinema rec -c 'tuterm ls_tutorial --mode demo' ls_tutorial.cast
```# Installation
## Arch Linux
```shell
[aur-helper] -S tuterm
```## From source
After cloning this repository or downloading the source code, simply run
```shell
make install
```
(You may need to use `sudo`)This will install tuterm under `/usr/local`. You can change this by setting `PREFIX=/your/path/of/choice`.
# Documentation
Everything is documented inside the man page that is installed with tuterm.
# Projects using tuterm
# Contributing
Please, feel free to report any issues or feature requests [here][issues].
But before you do that, have a look at [TODO](./TODO.org).
(this file will steadily dissolve into GitHub issues)If you want to submit a bug fix, you can simply open a pull request. But if you
want to add a new feature, open an issue so we can discuss it first.Everyone is welcome to contribute.
*A note: Tuterm is a simple program, so most issues or features should be a good choice for a beginner.*
[collection]: https://github.com/veracioux/tuterm-collection
[issues]: https://github.com/veracioux/tuterm/issues