Skip to content

Instantly share code, notes, and snippets.

@ruzli
Last active March 3, 2026 23:58
Show Gist options
  • Select an option

  • Save ruzli/e309451bddec8be54a4be5cfd77aaef9 to your computer and use it in GitHub Desktop.

Select an option

Save ruzli/e309451bddec8be54a4be5cfd77aaef9 to your computer and use it in GitHub Desktop.
Sandbox bot (CLIPLATFORMER) by Ruzli

๐Ÿš€ How to Install & Run the Shuffle CLI Platformer Bot

Prerequisites

  • OS: Windows, macOS, or Linux
  • Node.js: v18 or newer installed.

๐Ÿ”ง Step 1: Project Setup

  1. Create a folder (e.g., C:\cliplatformer).
  2. Place all project files inside, ensuring you have:
    • cliplatformer.js
    • dashboard.html
    • shuffle-api.js
    • package.json
    • utils/, commands/, etc.
  3. Open your terminal in this folder:
    cd C:\cliplatformer

๐Ÿ”Œ Step 2: Install Dependencies

Run the following command to install required packages:

npm install

โœ… You should see added X packages in Ys.

๐Ÿ” Step 3: Set Up Credentials

The bot requires your Shuffle API token and 2FA secret.

  1. Run the bot once to generate the config file:
    node cliplatformer.js
  2. The app will detect shuffle-token.json is missing and prompt you for:
    • Bearer Token: (See instructions below)
    • 2FA Secret: (Base32 code from your authenticator app)
    • Username: Your Shuffle username
  3. Once entered, the file is created, and the app exits. Run it again to start the CLI.

๐Ÿ“ How to get your Bearer Token?

  1. Open https://shuffle.com in Chrome.
  2. Press F12 โ†’ Go to the Network tab.
  3. Refresh the page.
  4. Click on any request named graphql.
  5. In the Headers tab, find Authorization: Bearer ey....
  6. Copy everything after Bearer (starting with ey...).

๐ŸŽฎ Step 4: Running the Dashboard (Web UI)

While the CLI offers full control, the Dashboard provides a visual interface for building strategies, monitoring live bets, and using hotkeys.

How to Start the Dashboard

  1. Ensure your credentials are set up (shuffle-token.json exists).
  2. Run the main script:
    node cliplatformer.js
  3. Wait for the startup message. You will see:

    ๐ŸŒ Dashboard available at: http://localhost:3000

  4. Open your browser and navigate to http://localhost:3000.

Note: The dashboard runs on port 3000 (HTTP) and connects to the bot via WebSocket on port 8080. Keep the terminal window open while using the dashboard.

How to Use the Dashboard

1. Strategy Builder (Editor Panel)

  • Profile Info: Give your strategy a unique ID and Name.
  • Basic Settings: Set Base Bet, Stop on Profit/Loss, and enable/disable the strategy logic.
  • Target Modes:
    • Static: Fixed multiplier.
    • Random Range: Randomizes between Min/Max per bet.
    • Array Random: Picks randomly from a comma-separated list (e.g., 2, 5, 10).
  • Rules Engine (On Win / On Loss):
    • Click + Add Rule to create complex logic.
    • Actions: Return to base, Increase by %, Add static amount (supports "USD" suffix).
    • Conditions: Trigger based on streaks (e.g., after_each_3_wins).
  • JSON Preview: See the raw configuration generated in real-time.
  • Save: Click ๐Ÿ’พ Save to store the strategy in the /profiles folder. It will immediately appear in the "Select Strategy" dropdown.

2. Session Settings

Before starting, configure your session parameters:

  • Currency: Select from your available balances (auto-loaded).
  • Bet Amount / Target / Count: Override strategy defaults if needed.
  • Emulation Mode: Check this box to test strategies with fake money (no real API calls).

3. Live Betting Dashboard

Once a session starts, this panel expands automatically:

  • Stats Cards: Real-time Balance, Profit (with USD equivalent), Win Rate, and Streaks.
  • Speed Metrics: Shows Bets Per Second (BPS) and Bets Per Minute (BPM).
  • Live History: A scrollable table of every bet placed. You can resize this section by dragging the handle at the bottom.
  • Hotkeys Modal: Click the โŒจ๏ธ Hotkeys button to view keyboard shortcuts.

4. Quick Actions Panel (Floating Widget)

A draggable floating panel appears on the right side of the screen during active sessions:

  • Pause/Resume: Instantly pause betting without stopping the session.
  • Vault 25%: Quickly move profits to your vault.
  • Async Toggle: Switch between synchronous (wait for result) and asynchronous (fire & forget) betting modes.
  • Modifiers: Buttons to Double/Halve Bet, Base Bet, or Target instantly.
  • Strategy Switcher: A collapsible list to switch to a different saved strategy mid-session.

๐ŸŽฒ Limbo Settings Configuration Guide

This section details every supported attribute for your strategy profiles (.json files in /profiles).

๐Ÿ”ง Top-Level Structure

{
  "id": "UniqueStrategyId",
  "name": "Human Readable Name",
  "strategy": { ... }
}

โš™๏ธ Strategy Attributes (strategy object)

โœ… Core Fields

Field Type Description
enabled boolean If false, ignores rules and uses static inputs.
baseBet string Starting bet. Supports: "0.01", "1 USD", "2.5%".
maxBetSize string Max allowed bet limit. Same formats as baseBet.
maxBetAction string Action when max bet hit: "stop", "reset", "reset-addbase", "switch_strategy".
maxTarget number Hard ceiling for target multiplier.
maxTargetAction string Action when max target hit: "stop", "reset", "reset-addtarget-base".

๐ŸŽฏ Target Modes

Field Type Options
targetMode string "static", "random_range", "array_random"
staticTarget number e.g., 3.5
randomTargetRange object { "min": 2.0, "max": 10.0 }
targetArray array [20, 40, 60] (Integers or floats)

๐Ÿ“ˆ Stop Conditions & Switching

Field Type Description
stopOnProfit string Stop if profit reaches value (e.g., "50%", "20 USD").
stopOnLoss string Stop if loss reaches value.
switchStrategyId array List of Strategy IDs to switch to upon stop condition or max bet breach.

๐Ÿ”„ Rules Engine (onWin / onLoss)

Both fields accept an array of rule objects. All matching rules execute in order.

Rule Object Structure:

{
  "action": "increase_percent",
  "condition": "after_each_2_wins",
  "value": "10"
}

Supported Actions:

  • return_to_base: Reset bet to baseBet.
  • return_to_base_target: Reset target to original.
  • increase_percent: Multiply current by (1 + value/100).
  • add_static_amount_to_current_bet: Add value (supports "USD").
  • add_static_amount_to_base_bet: Add value to base permanently.
  • increase_percent_target: Multiply target by (1 + value/100).
  • add_static_amount_to_current_target: Add fixed amount to target.

Supported Conditions:

  • null or "": Apply every time.
  • after_N_wins: Trigger once when total wins reach N.
  • after_each_N_wins: Trigger every Nth win (2, 4, 6...).
  • after_N_lose / after_each_N_lose: Same logic for losses.

๐Ÿ’ก Hotkeys Reference

CLI Mode (Terminal)

  • SPACE: Pause/Resume
  • D / F: Halve / Double Bet
  • E / R: Halve / Double Target
  • B / N: Halve / Double Base Bet
  • [ / ]: Halve / Double Interval (Speed)
  • V: Vault 25% of balance
  • - / +: Open Strategy Selection Menu
  • Q: Quit Session

Dashboard Mode (Browser)

  • Same keys as CLI work when the browser window is focused.
  • Alternatively, use the Quick Actions Panel buttons.

๐Ÿ›‘ Important Security Notes

  • ๐Ÿ”’ Never share your shuffle-token.json. It contains your private API keys and 2FA secrets.
  • ๐Ÿงช Use Emulation Mode to test new strategies before risking real funds.

โ“ Troubleshooting

Problem Solution
Error: Cannot find module 'chalk' Run npm install again.
Invalid token Ensure your Bearer token starts with ey and has no extra spaces.
2FA code invalid Sync your system clock; TOTP is time-sensitive.
Dashboard not loading Ensure node cliplatformer.js is running and check console for port conflicts (3000/8080).
Strategy not found Ensure the Strategy ID in switchStrategyId exactly matches the id field of another profile in /profiles.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment