Skip to content

AndriiBash/tetOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

screenshot tetOS)

TetOS — manage your Minecraft server with ease!

Python Python

screenshot tetOS)

TetOS is a CLI utility for managing a local Minecraft server. It allows you to get the server status (RAM usage, world weight, count of players, etc.). If desired, send notifications to Telegram via a bot about events on the server, such as players logging in and out or server readiness. The official core of the Minecraft Java server is used for work.

Libraries used for tetOS:

  • psutil - to control the use of server resources (RAM).
  • python-telebot - for sending notifications to Telegram about events on the server.
  • python-dotenv - configuration of the secure storage component (.env file).

Telegram Bot

screenshot tetOS) telegram

How it is worked? The Telegram bot in tetOS is used only for notifications and basic interaction with the server. TetOS controls the Minecraft server (logs, status, events). When an event occurs (server start/stop, player joining/leaving), tetOS sends a message to the Telegram bot. Telegram bot delivers notifications to all registered users.

Scheme Telegram-bot workflow

User (Telegram)
      │
      ▼
Telegram Bot
      │
      ▼
tetOS (CLI utility)
 ├── .env           (bot token)
 ├── tg_users.txt   (subscribed users)
      │
      ▼
Minecraft Java Server

Supported Operating Systems

OS Build Notes
MacOS ✅ Full Tested on OSX Tahoe
Linux ✅ Full Tested on Linux Arch
Windows ❌ WIP Support coming soon

Basic commands

An important point for the utility is the commands, the main commands will look like this

info - Show server status (RAM, players, version, etc.)
start - Start the server (optional: --hard for hard start)
stop - Stop the server
help - Show help menu
restart - Restart the server
clear/cls - Clear the terminal
tps - Show server TPS
mspt - Show MSPT servers
set - Set server properties (max-ram, gamemode, telegram notify, etc.)
exit - Exit the utility

File System Structure

The file system structure of the utility will look like this

tetOS/                        # Repository root
├── README.md                 # Project documentation
├── requirements.txt          # Python dependencies
├── run.sh                    # TetOS utility launcher (main script)
├── src/                      # Python scripts, run_server.sh, and configs
│   ├── python_scripts/       # Main TetOS code
│   │   ├── main.py
│   │   ├── config.py
│   │   ├── server_commands.py
│   │   └── telegram_bot.py
│   ├── .env                  # Environment variables (Telegram bot token)
│   ├── run_server.sh         # Minecraft server launch script
│   └── telegram_cache/       # Telegram user cache
│       └── tg_users.txt
└── server/                   # Minecraft server folder
    ├── server.jar            # Downloaded server file
    ├── eula.txt              # License file (generated by the server)
    ├── world/                # Minecraft world files
    └── server.properties     # Server settings (port, max players, etc.)

Getting Started

🚀 Automatical

Download the TetOS installer from the official GitHub repository, and start script.

chmode +x ./installer.sh
./installer.sh

✋ Manual installation

1. Installation tetOS

Clone the repository:

git clone https://github.com/AndriiBash/tetOS.git
cd tetOS

2. Install Python dependencies

Install dependencies using pip:

pip install -r requirements.txt

3. Install Minecraft Java server

Download the official Minecraft Java server from the official site. Download Server.

4. Configure server

  1. Move the downloaded server file (e.g.,server.jar) into the server/ folder (example: tetOS/server/server.jar).

⚠️ Important: If the server/ folder does not exist, you need to create it manually.

  1. Execute server.jar:
cd server
java -jar server.jar
  1. After this, you need to accept the license agreement to start the server. Go to the eula.txt file and change eula=false to eula=true. Use this command to do so:

MacOS/Linux:

sed -i.bak 's/eula=false/eula=true/' eula.txt && rm eula.txt.bak

Windows:

Null

5. Create .env file

The .env file stores your environment variables, such as your Telegram bot token, so that TetOS can securely access them.

Create a .env file in src/ with the following content:

cd ../src
touch .env
echo 'TELEGRAM_TOKEN="YOUR_TOKEN"' > src/.env

6. Run TetOS

Start the utility using.

MacOS/Linux:

cd ../
./run.sh

Windows:

Null

⚠️ Make sure run.sh is executable:

chmod +x run.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors