https://github.com/c0m4r/okrutnik
Bash script that helps you write correct Python code
https://github.com/c0m4r/okrutnik
bandit bash black codespell linter linux mypy okrutnik pylama pylint pyright python python-formatter python-linter ruff
Last synced: about 2 months ago
JSON representation
Bash script that helps you write correct Python code
- Host: GitHub
- URL: https://github.com/c0m4r/okrutnik
- Owner: c0m4r
- License: gpl-3.0
- Created: 2024-01-09T06:54:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-08T21:22:56.000Z (over 1 year ago)
- Last Synced: 2025-03-18T06:45:52.190Z (about 1 year ago)
- Topics: bandit, bash, black, codespell, linter, linux, mypy, okrutnik, pylama, pylint, pyright, python, python-formatter, python-linter, ruff
- Language: Shell
- Homepage:
- Size: 85.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Okrutnik


[](https://www.gnu.org/licenses/gpl-3.0)
[](https://github.com/c0m4r/okrutnik/actions/workflows/okrutnik.yml)
[](https://www.codefactor.io/repository/github/c0m4r/okrutnik)
Okrutnik ([/ɔkrutɲik/](https://www.youtube.com/watch?v=JaEWtfozcSk)) - a bash script that helps you write correct Python code.
It can also ruin your day by letting you know how much your code sucks.
So like... enjoy.

## 📦 Deps
It uses a bundle of different linters and a code formatter:
[bandit](https://bandit.readthedocs.io/)
| [black](https://github.com/psf/black)
| [codespell](https://github.com/codespell-project/codespell)
| [mypy](https://mypy.readthedocs.io/)
| [pylint](https://github.com/pylint-dev/pylint)
| [pyright](https://github.com/microsoft/pyright)
| [ruff](https://github.com/astral-sh/ruff)
## 💾 Installation
Download
```
wget https://raw.githubusercontent.com/c0m4r/okrutnik/main/okrutnik.sh
echo "5f429b9afc27fd37f1082c6979379c8ddd316e5caa2267fa6714f969a5ebcd39 okrutnik.sh" | sha256sum -c || rm -f okrutnik.sh
chmod +x okrutnik.sh
```
Just put it where your project is and install the required modules:
```
./okrutnik.sh --install
```
Include custom modules used in your project with `-r requirements.txt`:
```
./okrutnik.sh --install -r requirements.txt
```
Okrutnik will create a virtual Python environment in .okrutnik_venv for itself and store its tools in order to perform a scan.
You can `--update` or `--uninstall` them at any time.
## 🚀 Usage
```
./okrutnik.sh target.py
```
To stop on failed linters or errors:
```
./okrutnik.sh --stop target.py
```
**Be advised**: it will reformat your code by default. Make a backup or comment out black before use.
```
Usage: ./okrutnik.sh [options]
Before :
-s, --stop Exit on failed linters or errors
Standalone:
-h, --help Print this help message
--update Update installed tools
--uninstall Remove installed tools
```
## 📜 License
> Okrutnik: a bash script that helps you write correct Python code\
> Copyright (C) 2024-2026 c0m4r
>
> This program is free software: you can redistribute it and/or modify\
> it under the terms of the GNU General Public License as published by\
> the Free Software Foundation, either version 3 of the License, or\
> (at your option) any later version.
>
> This program is distributed in the hope that it will be useful,\
> but WITHOUT ANY WARRANTY; without even the implied warranty of\
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\
> GNU General Public License for more details.
>
> You should have received a copy of the GNU General Public License\
> along with this program. If not, see .
## 💸 Funding
If you found this script helpful, please consider [making a donation](junglekeepers.org/donate) on my behalf. Thank you.