@outofbear/rbx-cookie
v1.2.1
Published
A lightweight Node.js utility that retrieves the Roblox cookie from your Roblox Studio installation or environment.
Maintainers
Readme
🍪 rbx-cookie-js
A lightweight Node.js utility that retrieves the .ROBLOSECURITY cookie from your Roblox Studio installation or environment variables.
Supports Windows and macOS, making it ideal for tooling, automation, or scripts that need Roblox authentication.
⚙️ Requirements
This project uses N-API bindings implemented in Rust, so you must have:
- Rust (≥ 1.70) installed — Install Rust here
- Node.js (≥ 18) or Bun (≥ 1.0)
🪶 On Windows, ensure you have the Rust toolchain and a compatible C++ build environment (e.g. MSVC or GNU).
✨ Features
- 🔍 Automatically detects authenticated Roblox Studio sessions
- 💻 Cross-platform support for Windows and macOS
- 🔒 Falls back to the
ROBLOSECURITYenvironment variable - ⚙️ Simple async API for quick integration
📦 Installation
Using npm:
npm install rbx-cookieUsing pnpm:
pnpm add rbx-cookie🚀 Usage
ESM (recommended)
import rbxCookie from 'rbx-cookie';
const cookie = rbxCookie.get();
console.log(cookie);CommonJS
const rbxCookie = require('rbx-cookie');
const cookie = rbxCookie.get();
🧠 How It Works
rbx-cookie-js attempts to find your Roblox authentication cookie in the following order:
ROBLOSECURITYenvironment variable- Roblox Studio’s local authentication storage
- Windows: Using wincreds, before reverting back to searching the registry
- macOS: Using Roblox Studio HttpStorage, before reverting back to trying the plist
If no cookie is found, it will return null
🧪 Example Use Cases
- Command-line tools for Roblox APIs
- Automated deployment or asset upload scripts
- Roblox project build pipelines
📝 License
This project is licensed under the MIT License.
