Skip to content

Latest commit

 

History

History
246 lines (180 loc) · 4.55 KB

commands.md

File metadata and controls

246 lines (180 loc) · 4.55 KB

Commands Reference

Complete reference for all Embeddable CLI commands.

Global Options

  • --help - Show help for any command
  • --debug - Enable debug output
  • --version - Show CLI version

Setup & Authentication

embed setup

Interactive setup wizard that guides new users through the complete configuration process.

embed setup
# or skip token generation
embed setup --skip-token

What it does:

  • Configure API authentication
  • Create a database connection
  • Set up an environment with data source mappings
  • Optionally generate a security token

embed init

Initialize the CLI with your Embeddable API credentials.

embed init

embed auth

Manage authentication credentials.

embed auth login

Update or change your API credentials.

embed auth login

embed auth logout

Clear stored credentials from your system.

embed auth logout

embed auth status

Check your current authentication status and test API connectivity.

embed auth status

Database Management

embed database connect

Add a new database connection with support for interactive mode or JSON configuration.

Interactive mode:

embed database connect

JSON mode:

embed database connect --json '{"name":"prod-db","type":"postgresql","host":"localhost","port":5432,"database":"mydb","user":"user","password":"pass"}'

File mode:

embed database connect --file connection.json

Options:

  • --json <config> - Connection configuration as JSON
  • --file <path> - Path to JSON file with connection configuration
  • --skip-test - Skip connection test before creating

embed database list

List all configured database connections.

embed database list

embed database test [connectionId]

Test a database connection to ensure it's working properly.

embed database test
# or specify connection
embed database test <connection-id>

embed database remove [connectionId]

Remove a database connection.

embed database remove
# or specify connection
embed database remove <connection-id>

Environment Management

embed env create

Create a new environment with data source mappings.

embed env create

embed env list

List all environments.

embed env list

embed env set-default [environmentId]

Set the default environment for token generation.

embed env set-default
# or specify environment
embed env set-default <environment-id>

embed env remove [environmentId]

Remove an environment.

embed env remove
# or specify environment
embed env remove <environment-id>

Embeddables & Tokens

embed list

List all available embeddables in your workspace.

embed list

embed token [embeddableId]

Generate a security token for embedding a dashboard. Supports user context and row-level security.

embed token
# or specify embeddable
embed token <embeddable-id>
# or with specific environment
embed token <embeddable-id> --env <environment-id>

Options:

  • --env <environment-id> - Use specific environment (overrides default)

Utility Commands

embed version

Display the current CLI version.

embed version

embed version --check

Check for available updates.

embed version --check

embed version --update

Update to the latest version (Homebrew installations only).

embed version --update

embed config

Display current configuration including region and masked API key.

embed config

Command Examples

Complete Setup Flow

# 1. Initialize CLI
embed init

# 2. Add a PostgreSQL database
embed database connect
# Choose PostgreSQL, enter connection details

# 3. Create a production environment
embed env create
# Name it "production", map data sources

# 4. Set as default environment
embed env set-default

# 5. List available embeddables
embed list

# 6. Generate a token for embedding
embed token

Scripted Database Setup

# Create connection from JSON file
embed database connect --file db-config.json

# Create environment and set as default
embed env create
embed env set-default production

Token Generation with Filters

# Generate token with user context and security filters
embed token embeddable-123 --env production
# Follow prompts for user ID and security filters

Getting Help

For detailed help with any command:

embed <command> --help

For command-specific examples, see the Examples documentation.