A terminal-based automation tool for KlokApp AI chat with session token authentication and a resilient retry mechanism.
- 🔑 Session Token Authentication - Direct login using KlokApp session token
- 📊 Interactive Dashboard - Beautiful terminal UI with
blessed
andblessed-contrib
- 🤖 Automated Prompts - Generate creative prompts using Groq API
- ⏳ Rate Limit Management - Automatic cooldown when limits are reached
- 📌 Point Tracking - Real-time monitoring of inference points
- 🔄 Automatic Retry - Handles network and server errors
- 📡 Stream Verification - Ensures successful message delivery
- 🌐 Proxy Support - Uses user-provided proxy if available, defaults to system IP otherwise
- 📜 Detailed Logging - Comprehensive monitoring and debugging
klokapp-automation/
├── package.json # Project dependencies
├── session-token.key # Session token for login (required)
├── groq-api.key # Groq API key
├── proxies.txt # Proxy configuration (optional)
├── info.log # Log file for monitoring
├── index.js # Main entry point
├── config.js # App configuration
└── src/
├── api/ # KlokApp API functions
├── ui/ # UI components
├── services/ # External services
└── utils/ # Utilities
1️⃣ Open a terminal and clone the repository:
git clone https://github.com/rpchubs/Klok-BOT.git
cd Klok-BOT
2️⃣ Install dependencies:
npm install
3️⃣ Configure Proxy:
- Open
proxies.txt
using nano:nano proxies.txt
- Add your proxy in the format:
http://username:password@ip:port
- Example:
http://user123:pass456@192.168.1.1:8080
- If
proxies.txt
is empty or missing, the application will use your default system IP. - Save the file (
CTRL + X
, thenY
, thenEnter
).
4️⃣ Configure Session Token:
nano session-token.key
- Paste your
session_token
and save the file.
5️⃣ Register for Groq API Key:
- Visit Groq Console and create an account.
- Copy your API key and save it:
nano groq-api.key
- Paste your API key and save the file.
6️⃣ Run the application:
npm run start
1️⃣ Open PowerShell and run:
git clone https://github.com/rpchubs/Klok-BOT.git
cd Klok-BOT
2️⃣ Install dependencies:
npm install
3️⃣ Configure Proxy:
- Open
proxies.txt
and add your proxy in the format:http://username:password@ip:port
- Example:
http://user123:pass456@192.168.1.1:8080
- If
proxies.txt
is empty or missing, the application will use your default system IP.
4️⃣ Configure Session Token:
- Open
session-token.key
with Notepad++ and paste your session_token. - Save and close the file.
5️⃣ Register for Groq API Key:
- Visit Groq Console and create an account.
- Open
groq-api.key
with Notepad++ and paste your Groq API KEY. - Copy your API key and save it in
groq-api.key
.
6️⃣ Start the application:
npm run start
1️⃣ Login to KlokApp in your browser.
2️⃣ Open Developer Tools (F12
or Ctrl + Shift + I
).
3️⃣ Navigate to Application > Local Storage > https://klokapp.ai
.
4️⃣ Find and copy the session_token
value.
📌 Example Screenshot:
Start the script:
npm start
S
- Start automation (requires session-token.key)P
- Pause automationR
- Resume automationL
- Clear log fileI
- Show file informationH
- Show helpQ
orEsc
- Quit application
- Automatic Retry - Retries on network/server failures.
- Exponential Backoff - Increases wait time on consecutive failures.
- Error Logging - Logs all failures for debugging.
- Automatic Recovery - Resumes when conditions are normal.
To clear the log file:
npm run clear-logs
🚀 Happy Botting! 🎯