https://github.com/psykulsk/tetri.sh
Simple tetris game in bash
https://github.com/psykulsk/tetri.sh
bash bash-game games shell shell-scripts terminal-game tetris
Last synced: about 6 hours ago
JSON representation
Simple tetris game in bash
- Host: GitHub
- URL: https://github.com/psykulsk/tetri.sh
- Owner: psykulsk
- License: mit
- Created: 2024-10-07T23:00:25.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-05-09T08:48:23.000Z (2 months ago)
- Last Synced: 2026-05-09T10:38:31.207Z (2 months ago)
- Topics: bash, bash-game, games, shell, shell-scripts, terminal-game, tetris
- Language: Shell
- Homepage:
- Size: 417 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tetri.sh
Feeling your eyelids droop during that never-ending meeting? Or maybe you're ssh'ed into your server, bored out of your mind?
tetri.sh is here for you!
```
curl https://raw.githubusercontent.com/psykulsk/tetri.sh/main/tetri.sh -o tetri.sh && \
bash tetri.sh
```
```
usage: ./tetri.sh [-c cols ] [-r rows] [-l start level]
controls: left, right and down arrows for movement, z and x for rotation
-h display help
-c cols specify game area cols. Make sure it's not higher then the actual terminal's width.
-r rows specify game area rows. Make sure it's not higher then the actual terminal's height.
-l specify start level. Value from 1-10.
Exitting with Ctrl-C automatically cleans the screen.
```
Requires `bash --version` >= 4.0. **Warning**, MacOS is distributed with bash 3 by default. Check the [instructions](#upgrading-bash-on-macos) on how to upgrade it.
### Other bash games
* [shnake](https://github.com/psykulsk/shnake)
* [rubik.sh](https://github.com/psykulsk/rubik.sh)
### Demo

### Upgrading bash on MacOS
* Install a new version of bash using brew: `brew install bash`
* Add `/opt/homebrew/bin/bash` to `/etc/shells`
* Set is as default with `chsh -s /usr/local/bin/bash`