Package Exports
- @outofbear/rbx-cookie
- @outofbear/rbx-cookie/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@outofbear/rbx-cookie) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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.