PeakeCoin Bots - dashboard.py

Hypothetically
đ§ Terminal Control Tower: Running Hive Bots Like a Pro
Let me paint the picture real quick â youâve got five, maybe ten bots, each trading different tokens on Hive Engine. Oneâs flipping SWAP.LTC, anotherâs scalping SWAP.ETH, maybe thereâs a DOGE one throwing hands with the meme market. All doing their thing.
But whatâs not working?
You.
Youâre stuck opening terminal windows like a server DJ. CTRL+TAB fatigue. Zero visibility. One crashes and you donât even notice for an hour.
So I fixed it. Enter dashboard.py
. Itâs the no-BS control panel for managing and monitoring all your Hive bots in one terminal window.
đïž What It Does
Hereâs the deal:
- Runs each bot script in its own threaded subprocess
- Streams their live output with color-coded tags
- Keeps the whole thing clean, readable, and press-CTRL+C-to-nuke friendly
Itâs like tmux, but baked into Python â and without the overhead.
đ§± Core Structure
Hereâs the bot list:
BOT_SCRIPTS = [
("LTC Bot", "uni_ltc.py"),
("ETH Bot", "uni_eth.py"),
("BTC Bot", "uni_btc.py"),
("DOGE Bot", "uni_doge.py"),
]
Each one is a tuple: friendly name, script name.
Color coding for visibility:
BOT_COLORS = {
"LTC Bot": "\033[96m",
"ETH Bot": "\033[92m",
"BTC Bot": "\033[93m",
"DOGE Bot": "\033[95m",
}
RESET_COLOR = "\033[0m"
đ How It Works
Hereâs the heart of it:
def run_bot(name, script):
color = BOT_COLORS.get(name, "")
print(f"{color}[DASHBOARD] Launching {name} ({script})...{RESET_COLOR}")
proc = subprocess.Popen(
["python", script],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True
)
while True:
line = proc.stdout.readline()
if not line:
break
print(f"{color}[{name}] {line.strip()}{RESET_COLOR}")
And we launch everything in threads:
for name, script in BOT_SCRIPTS:
t = threading.Thread(target=run_bot, args=(name, script), daemon=True)
t.start()
threads.append(t)
Daemon threads keep the show running. No blocking. One dies? The rest live.
đ§ Why It Works
- No more wondering if a bot is running â you see it live
- If one bot fails, the dashboard doesnât
- You get color-coded logs in real time
- You scale it by adding a tuple. Done.
đ§Ș Full dashboard.py
import subprocess
import threading
import time
BOT_SCRIPTS = [
("LTC Bot", "uni_ltc.py"),
("ETH Bot", "uni_eth.py"),
("BTC Bot", "uni_btc.py"),
("DOGE Bot", "uni_doge.py"),
]
BOT_COLORS = {
"LTC Bot": "\033[96m",
"ETH Bot": "\033[92m",
"BTC Bot": "\033[93m",
"DOGE Bot": "\033[95m",
}
RESET_COLOR = "\033[0m"
def run_bot(name, script):
color = BOT_COLORS.get(name, "")
print(f"{color}[DASHBOARD] Launching {name} ({script})...{RESET_COLOR}")
proc = subprocess.Popen(
["python", script],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True
)
while True:
line = proc.stdout.readline()
if not line:
break
print(f"{color}[{name}] {line.strip()}{RESET_COLOR}")
def main():
threads = []
for name, script in BOT_SCRIPTS:
t = threading.Thread(target=run_bot, args=(name, script), daemon=True)
t.start()
threads.append(t)
print("[DASHBOARD] Monitoring bots. Press Ctrl+C to exit.")
try:
while True:
time.sleep(2)
except KeyboardInterrupt:
print("[DASHBOARD] Exiting...")
if __name__ == "__main__":
main()
đ Final Thoughts
This little dashboard gave me peace of mind. I went from chasing bot logs across tabs to having one central command center that tells me whatâs happening in real time.
If you're running multiple bots for multiple Hive Engine tokens â and youâre doing it without this kind of visibility â you're flying blind.
This is free.
This is clean.
This is how I do it.
Join us on the Ecency Discord
Congratulations @peakecoin! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)
Your next target is to reach 500 upvotes.
You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP