CLI
Documentation

Lux CLI Documentation

Complete command reference for the Lux CLI tool.

Running CLI Commands

The CLI is located in the frontend directory. Run commands from the Lux Studio root:

node bin/lux-cli/lux.js <command>

Or from the frontend directory:

node bin/lux-cli/lux.js <command>

Table of Contents


Workflows

Manage workflows with full lifecycle support.

Aliases: workflows, flow, f

Core Commands

List Workflows

node bin/lux-cli/lux.js workflows list

Lists all workflows from local storage with their sync status.

Get Workflow Details

node bin/lux-cli/lux.js workflows get <workflow-id>

Shows complete workflow details including configuration.

Show Sync Status

node bin/lux-cli/lux.js workflows status <workflow-id>

Shows the sync status for a specific workflow (draft, synced, dirty, or conflict).

Create Workflow

node bin/lux-cli/lux.js workflows create <name> [description] [--publish]

Creates a new workflow. Use --publish to publish immediately after creation.

Examples:

node bin/lux-cli/lux.js workflows create "Customer Onboarding" "Handles new customer setup"
node bin/lux-cli/lux.js workflows create "Data Sync" --publish

Sync from Cloud

node bin/lux-cli/lux.js workflows sync

Syncs published workflows from cloud to local storage.

Save Draft Config

node bin/lux-cli/lux.js workflows save <workflow-id> <config-file>

Saves workflow configuration from a JSON file to local draft.

Config File Format:

{
  "nodes": [],
  "edges": [],
  "variables": {},
  "metadata": {
    "description": "Workflow description"
  }
}

Publish Workflow

node bin/lux-cli/lux.js workflows publish <workflow-id>

Publishes the local config to production (R2 storage).

View Diff

node bin/lux-cli/lux.js workflows diff <workflow-id>

Shows differences between local and published configurations.

Delete Workflow

node bin/lux-cli/lux.js workflows delete <workflow-id>

Deletes a local workflow.


Sync Status Reference

StatusMeaning
draftNever published, local only
syncedMatches published version
dirtyHas local changes since publish
conflictLocal changes + cloud has newer version

Webhook Commands

Complete webhook trigger workflow for workflows.

Get Webhook URL

node bin/lux-cli/lux.js workflows webhook-url <workflow-id>

Shows the webhook URL and current status.

Output:

📍 Webhook URL:
https://webhook-trigger-worker.jason-a5d.workers.dev/trigger/<token>

📊 Status:
   Format Confirmed: ✅ Yes
   Webhook Trigger Enabled: ✅ Yes

Start Webhook Listening

node bin/lux-cli/lux.js workflows webhook-listen <workflow-id>

Starts a 5-minute listening session to capture incoming webhook payloads.

Poll for Captured Webhook

node bin/lux-cli/lux.js workflows webhook-poll <workflow-id>

Checks if a webhook was captured during the listening session.

Accept Webhook Format

node bin/lux-cli/lux.js workflows webhook-accept <workflow-id>

Accepts the captured webhook payload format, creates a schema, and saves variables.

Decline Webhook Format

node bin/lux-cli/lux.js workflows webhook-decline <workflow-id>

Rejects the captured webhook and resets the listening session.


Webhook Workflow Example

# 1. Start listening for webhooks
node bin/lux-cli/lux.js workflows webhook-listen flow_abc123
 
# 2. Send a test webhook
curl -X POST https://webhook-trigger-worker.jason-a5d.workers.dev/trigger/<token> \
  -H "Content-Type: application/json" \
  -d '{"userId":"123","email":"user@example.com"}'
 
# 3. Check if captured
node bin/lux-cli/lux.js workflows webhook-poll flow_abc123
 
# 4. Accept the format
node bin/lux-cli/lux.js workflows webhook-accept flow_abc123
 
# 5. Verify
node bin/lux-cli/lux.js workflows webhook-url flow_abc123

Interfaces

Manage and deploy interfaces.

Aliases: interface, i

Initialize Interface

node bin/lux-cli/lux.js interface init --name <name> [--description <desc>] [--type <type>]

Creates a new interface with boilerplate code.

Options:

  • --name (required) - Interface name
  • --description (optional) - Interface description
  • --type (optional) - Type: external or internal (default: external)

Example:

node bin/lux-cli/lux.js interface init --name my-interface --description "My custom interface" --type external

Deploy Interface

node bin/lux-cli/lux.js interface deploy

Deploys an interface to production.

List Interfaces

node bin/lux-cli/lux.js interface list
node bin/lux-cli/lux.js interface ls

Lists all interfaces.

View Logs

node bin/lux-cli/lux.js interface logs

Shows logs for the current interface.


Agents

Manage AI agents for your organization.

List Agents

node bin/lux-cli/lux.js agent list

Lists all agents with their ID, name, type, and category.

Get Agent Details

node bin/lux-cli/lux.js agent get <agent-id>

Shows complete agent information including the system prompt.

Create Agent

node bin/lux-cli/lux.js agent create <id> <name> [description]

Creates a new custom agent.

Delete Agent

node bin/lux-cli/lux.js agent delete <agent-id>

Deletes a custom agent.

Get Agent Prompt

node bin/lux-cli/lux.js agent prompt get <agent-id>

Retrieves the agent's system prompt.

Set Agent Prompt

node bin/lux-cli/lux.js agent prompt set <agent-id> <file>

Sets the agent's system prompt from a file.


Voice Agents

Manage ElevenLabs voice agents from the command line.

Aliases: voice-agents, va

Agent Commands

List Voice Agents

node bin/lux-cli/lux.js voice-agents list

Lists all voice agents for the current project.

Get Agent Details

node bin/lux-cli/lux.js voice-agents get <agent-id>

Shows detailed information about a voice agent.

Create Voice Agent

node bin/lux-cli/lux.js voice-agents create <name> [options]

Creates a new voice agent.

Options:

  • --voice <voice-name> - Voice to use (e.g., Rachel, Drew, Sarah)
  • --prompt <text> - System prompt for the agent
  • --first-message <text> - First message the agent says

Update Voice Agent

node bin/lux-cli/lux.js voice-agents update <agent-id> [options]

Updates an existing voice agent.

Delete Voice Agent

node bin/lux-cli/lux.js voice-agents delete <agent-id>

Deletes a voice agent.

List Phone Numbers

node bin/lux-cli/lux.js voice-agents phones

Lists available phone numbers.

Inbound Call Commands

List Twilio Numbers

node bin/lux-cli/lux.js voice-agents twilio-numbers

Lists Twilio phone numbers with webhook status.

Configure Inbound

node bin/lux-cli/lux.js voice-agents configure-inbound <phone> <flow-id>

Configures a phone number for Lux-managed inbound calls.

Check Inbound Status

node bin/lux-cli/lux.js voice-agents inbound-status <phone>

Checks the inbound configuration status for a phone number.

Reset Inbound

node bin/lux-cli/lux.js voice-agents reset-inbound <phone>

Resets phone number configuration.


Knowledge Base

Manage your knowledge base documents and folders.

Aliases: knowledge, kb

Document Commands

List Documents

node bin/lux-cli/lux.js knowledge list

Lists all documents and folders in the knowledge base.

Get Document

node bin/lux-cli/lux.js knowledge get <document-id>

Gets document details and content.

Get Document URL

node bin/lux-cli/lux.js knowledge url <document-id>

Gets the public URL for a document.

Upload Document

node bin/lux-cli/lux.js knowledge upload <file-path> [folder-id]

Uploads a file to the knowledge base.

Examples:

node bin/lux-cli/lux.js knowledge upload ./data.json
node bin/lux-cli/lux.js knowledge upload ./image.png folder_xyz

Delete Document

node bin/lux-cli/lux.js knowledge delete <document-id>

Deletes a document.

Folder Commands

List Folders

node bin/lux-cli/lux.js knowledge folders list

Lists all folders.

Create Folder

node bin/lux-cli/lux.js knowledge folders create <name> [parent-id]

Creates a new folder.

Delete Folder

node bin/lux-cli/lux.js knowledge folders delete <folder-id>

Deletes a folder.


Data Management

Tables

Manage SQL tables in your Turso database.

List Tables

node bin/lux-cli/lux.js data tables list

Lists all tables with their name, type, and read-only status.

Create Table

node bin/lux-cli/lux.js data tables init <name> [description]

Creates a new user table. Table name must start with user.

Example:

node bin/lux-cli/lux.js data tables init user.customers "Customer data"

Schema format:

{
  "columns": [
    { "name": "id", "type": "TEXT", "primaryKey": true, "notNull": true },
    { "name": "email", "type": "TEXT", "notNull": true }
  ],
  "indexes": [
    { "name": "idx_email", "columns": ["email"], "unique": true }
  ]
}

Get Table Details

node bin/lux-cli/lux.js data tables get <table-id>

Delete Table

node bin/lux-cli/lux.js data tables delete <table-id>

Query Table

node bin/lux-cli/lux.js data tables query <table-id> <sql>

Examples:

node bin/lux-cli/lux.js data tables query tbl_123 "SELECT * FROM \"user.customers\" LIMIT 10"

Insert Row

node bin/lux-cli/lux.js data tables insert <table-id> <json>

Update Row

node bin/lux-cli/lux.js data tables update <table-id> <row-id> <primary-key> <json>

Delete Row

node bin/lux-cli/lux.js data tables delete-row <table-id> <row-id> <primary-key>

Export to CSV

node bin/lux-cli/lux.js data tables export <table-id> [file]

Import from CSV

node bin/lux-cli/lux.js data tables import <table-id> <csv-file>

KV Store

Manage Cloudflare KV namespaces.

List KV Namespaces

node bin/lux-cli/lux.js data kv list

Create KV Namespace

node bin/lux-cli/lux.js data kv init <name> [description]

Delete KV Namespace

node bin/lux-cli/lux.js data kv delete <namespace-id>

List Keys

node bin/lux-cli/lux.js data kv keys <namespace-id>

Get Key Value

node bin/lux-cli/lux.js data kv get <namespace-id> <key>

Set Key Value

node bin/lux-cli/lux.js data kv set <namespace-id> <key> <value>

Delete Key

node bin/lux-cli/lux.js data kv delete-key <namespace-id> <key>

Export to JSON

node bin/lux-cli/lux.js data kv export <namespace-id> [file]

Import from JSON

node bin/lux-cli/lux.js data kv import <namespace-id> <json-file>

Storage

Manage R2 object storage.

List Objects

node bin/lux-cli/lux.js storage ls [prefix]

Examples:

node bin/lux-cli/lux.js storage ls
node bin/lux-cli/lux.js storage ls workflows/

Get Object

node bin/lux-cli/lux.js storage get <key> [output-file]

Put Object

node bin/lux-cli/lux.js storage put <key> <file>

Delete Object

node bin/lux-cli/lux.js storage rm <key>

Secrets

Manage organization secrets (environment variables).

List Secrets

node bin/lux-cli/lux.js secrets list

Set Secret

node bin/lux-cli/lux.js secrets set <key> <value>

Get Secret

node bin/lux-cli/lux.js secrets get <key>

Delete Secret

node bin/lux-cli/lux.js secrets delete <key>

Project Management

Deploy and manage projects on GitHub.

Aliases: project, proj

Deploy Project

node bin/lux-cli/lux.js project deploy [project-id]
node bin/lux-cli/lux.js project push [project-id]

Pushes the project to GitHub (force push entire state).

Examples:

node bin/lux-cli/lux.js project deploy                  # Deploy current project
node bin/lux-cli/lux.js project deploy my-project-id    # Deploy specific project

Project Status

node bin/lux-cli/lux.js project status [project-id]

Shows the current project status.


Dev Servers

Manage running development servers started from Lux Studio.

List Running Servers

node bin/lux-cli/lux.js servers

Shows all running dev servers with their ports, URLs, and log files.

View Server Logs

node bin/lux-cli/lux.js logs [interface]

View logs from a running dev server.

Options:

  • -f, --follow - Follow log output (like tail -f)
  • -n, --lines <number> - Number of lines to show (default: 50)
  • -c, --console - Show browser console logs instead of terminal logs

Examples:

node bin/lux-cli/lux.js logs                    # Show logs from current interface
node bin/lux-cli/lux.js logs my-interface       # Show logs from specific interface
node bin/lux-cli/lux.js logs -f                 # Follow log output
node bin/lux-cli/lux.js logs -n 100            # Show last 100 lines

Webview Control

Control interface previews for automated testing. These commands allow AI agents or scripts to interact with running interface previews in Lux Studio.

Take Screenshot

node bin/lux-cli/lux.js screenshot <interface-id>

Takes a screenshot of the interface preview.

Click Element

node bin/lux-cli/lux.js click <interface-id> <selector>

Clicks an element in the interface preview.

Example:

node bin/lux-cli/lux.js click my-interface "button.submit"

Type Text

node bin/lux-cli/lux.js type <interface-id> <selector> <text>

Types text into an element.

Example:

node bin/lux-cli/lux.js type my-interface "input#email" "user@example.com"

Execute JavaScript

node bin/lux-cli/lux.js eval <interface-id> <code>

Executes JavaScript in the interface preview.

Example:

node bin/lux-cli/lux.js eval my-interface "document.title"

Get Current URL

node bin/lux-cli/lux.js url <interface-id>

Gets the current URL of the interface preview.

Navigate

node bin/lux-cli/lux.js nav <interface-id> <url>

Navigates the interface preview to a URL.

Wait

node bin/lux-cli/lux.js wait <interface-id> <ms>

Waits for a duration in milliseconds.

Start Preview

node bin/lux-cli/lux.js preview <interface-id>

Starts the interface preview (opens in Lux Studio).


Tips & Best Practices

Command Shorthand

For convenience, you can set up an alias in your shell:

alias lux="node bin/lux-cli/lux.js"

Then use the shorter form: lux workflows list

Command Aliases

The CLI provides short aliases for frequently used commands:

Full CommandAlias
workflowsflow or f
interfacei
knowledgekb
voice-agentsva
projectproj

Working with JSON

Many commands accept JSON input. Use single quotes to pass JSON strings:

node bin/lux-cli/lux.js data kv set kv_123 user:456 '{"name":"Jane","active":true}'

Table Naming

Table names must follow the user. prefix convention:

# Correct
node bin/lux-cli/lux.js data tables init user.customers
 
# Incorrect (missing user. prefix)
node bin/lux-cli/lux.js data tables init customers

Getting Help

For any command, run it without arguments to see usage information:

node bin/lux-cli/lux.js workflows      # Shows workflow commands
node bin/lux-cli/lux.js data           # Shows data commands
node bin/lux-cli/lux.js agent          # Shows agent commands

Version

Check CLI version:

node bin/lux-cli/lux.js --version