CLI Toolchain (emx)
The Emuluxe CLI (emx) is a professional terminal interface designed to bridge your local development environment with our high-fidelity cloud hardware foundry. It automates local tunneling, hardware fingerprinting, and session management with zero configuration.
Installation
Option 1: Zero-Install (Recommended)
Run it directly without installing anything permanently:
npx @emuluxe/cli start https://your-site.com
Option 2: Global Install
Access Emuluxe anywhere with the emx command:
npm install -g @emuluxe/cli
Authentication
Option 1: One-Click Command (Recommended)
- Navigate to your Integrations Settings in the Emuluxe dashboard.
- Scroll to the CLI Authentication section.
- Click Generate Auth Command to get a pre-configured command.
- Copy and run the command in your terminal.
Option 2: Manual Setup
-
Obtain Token: You can find your secure API token in the Settings -> Integrations section of your Emuluxe dashboard.
-
Authenticate: Set your CLI authentication token:
emx auth your_secure_token -
Login: Alternatively, run the login command to open the dashboard:
emx login
Core Commands
emx devices
List all available device profiles with their hardware IDs and plan restrictions.
Example:
emx devices
emx network-profiles
List all available network profiles with bandwidth, latency, and plan restrictions.
Example:
emx network-profiles
emx init
Initialize Emuluxe in the current project with default settings.
--device, -d <id>: Default device ID (Default:iphone-15-pro-max)--network, -n <id>: Default network profile ID (Default:no-throttle)
Example:
emx init -d pixel-8-pro -n 4g
emx start [url]
Launch a high-fidelity simulation session.
url: The target URL (Default: auto-detected from package.json orhttp://localhost:3000).--device, -d <id>: Override the default hardware profile for this session.--network, -n <id>: Network profile ID (e.g.,no-throttle,3g,4g,5g). Default:no-throttle.--landscape, -L: Start in landscape mode instead of portrait.
Example: Starting a session with specific device and network
emx start http://localhost:8080 -d iphone-15-pro-max -n 4g -L
[!NOTE]
emxautomatically initializes an encrypted Local Tunnel relative to your target URL, allowing our cloud devices to securely access your local server. It also performs intelligent port discovery by reading yourpackage.jsonscripts to guess the correct port.
emx set-device <id>
Sets your preferred default hardware profile.
emx set-network <id>
Sets your preferred default network profile.
emx rotate
Rotate the device orientation in the IDE (toggles between Portrait and Landscape).
emx screenshot
Capture a screenshot of the current simulation in the IDE.
--type, -t <type>: Screenshot type (Default:SITE). Options:SITE,DEVICE,FULL,TAB. Note: Pro plan required for types other thanSITE.
Plan Awareness
The CLI is plan-aware and enforces restrictions based on your Emuluxe plan:
- Free Plan: Limited to Free-tier devices and
SITE(viewport) screenshots only - Pro Plan: Access to all devices and all screenshot types (TAB, DEVICE, SITE, FULL)
When using emx devices or emx network-profiles, the CLI will indicate which items are available on your current plan and which require Pro.
Instant Auto-Launch
The Emuluxe CLI features a robust IDE detection engine. When you run emx start, it automatically identifies your active coding environment and triggers the Simulation Panel instantly.
Supported IDEs:
- Antigravity: Native detection via
APP_NAME. - Cursor: Native detection via
VSCODE_ICON_KEYand bundle IDs. - Windsurf: Native detection via bundle ID
com.exafunction.windsurf. - VS Code: Native detection via
TERM_PROGRAM.
Configuration
Emuluxe stores global configuration in ~/.emuluxe-cli-nodejs/config.json.
| Key | Description | Default |
|---|---|---|
token | Encrypted API License Token | null |
defaultDevice | Fallback hardware profile | iphone-15-pro-max |
defaultNetwork | Default network profile | no-throttle |
Full Example Workflow
Follow this sequence to launch your first high-fidelity simulation:
-
Authenticate:
emx auth your_token_here -
Bridge to the Foundry:
emx start http://localhost:3000 -
Result:
- The CLI generates a secure
emuluxe.runtunnel. - Instant Trigger: The session automatically opens in your active IDE (Antigravity, Cursor, Windsurf, or VS Code).
- Physical Rendering: The mobile frame is instantly rendered, pointing to your local code.
- The CLI generates a secure
Next, explore the REST API Reference.