Skip to main content
The Inworld CLI is a comprehensive command-line toolkit that streamlines the entire lifecycle of Runtime graph development - from initial prototyping to production deployment and continuous optimization. To download and install Inworld CLI, run the following command:
npm
npm install -g @inworld/cli

Commands

The CLI follows a logical command hierarchy that matches developer workflows:
inworld
├── auth          # Authentication
│   ├── login     # User authentication (alias: inworld login)
│   ├── logout    # Sign out (alias: inworld logout)
│   ├── print-access-token  # Display access token
│   ├── print-api-key       # Display API key
│   └── status    # Show authentication status (alias: inworld status)
├── init          # Project creation with templates  
├── graph         # Graph management and deployment
│   ├── run       # Local testing and development (alias: inworld run)
│   ├── serve     # Local HTTP/gRPC servers (alias: inworld serve)
│   ├── deploy    # Cloud deployment (alias: inworld deploy)
│   ├── visualize # Generate architectural diagrams
│   └── variant   # A/B testing and experimentation
├── tts           # Text-to-speech synthesis
└── workspace     # Workspace management

Project Initialization

The inworld init command downloads the llm-to-tts-node template—a production-ready LLM to TTS pipeline.
Currently, only the llm-to-tts-node template is available via CLI. CLI support for fetching additional templates is coming soon. To view all available templates, visit inworld.ai/templates.
For graph-only examples that demonstrate specific Runtime features, clone the templates repository directly.
# Initialize with the llm-to-tts-node template
inworld init --template llm-to-tts-node --name my-ai-app

# Skip dependency installation prompt
inworld init --template llm-to-tts-node --name my-ai-app --skip-install

# Force refresh template cache (download fresh copy even if cached)
inworld init --template llm-to-tts-node --name my-ai-app --force
Init Command Options:
  • -n, --name <name> - Name of the project directory
  • -t, --template <template> - Template to use (currently only llm-to-tts-node)
  • --skip-install - Skip dependency installation prompt
  • --force - Force refresh template cache (download fresh copy even if cached)

Working with Graphs

Once you have a graph.ts file (either from a template project or created manually), you can use the following commands to work with your graph:

Local Testing

Test your graph locally with instant feedback:
# Test locally with instant feedback
inworld run ./graph.ts '{"input": {"user_input": "test message"}}'

Visualization

Generate architectural diagrams of your graph:
# Visualize complex graph architectures  
inworld graph visualize ./graph.ts --output ./docs/architecture.png
Graph visualization requires Graphviz to be installed on your system.

Local Server

Serve your graph locally with support for both HTTP (with optional Swagger UI) and gRPC:
# Serve on HTTP Server with Swagger
inworld serve ./graph.ts --swagger  

# Serve on custom port
inworld serve ./graph.ts --port 8080

# Serve on custom host
inworld serve ./graph.ts --host 0.0.0.0 --port 3000

# Combine options
inworld serve ./graph.ts --host 0.0.0.0 --port 8080 --swagger

# gRPC server for high-performance applications
inworld serve ./graph.ts --transport grpc 

Cloud Deployment

Once you’ve successfully built your graph, you can deploy it to Inworld Cloud to create a persistent, production-ready endpoint. See Cloud Deployment for more details.
# Deploy to cloud with persistent endpoint
inworld deploy ./graph.ts

A/B Testing & Experimentation

You can use the CLI to create and manage graph variants, such as model or prompt changes, for A/B testing and experimentation. Your clients will automatically use the latest variants—no client-side updates required.
# Register different variants for testing
inworld graph variant register -d baseline ./graph-v1.ts
inworld graph variant register -d experiment ./graph-v2.ts

# Configure traffic splits in Portal, monitor results

TTS

Use the CLI to quickly get started with Inworld TTS. Generate speech content with direct TTS commands:
# Direct TTS synthesis for immediate use
inworld tts synthesize "Hello world" --voice Dennis --output audio.mp3
To create graphs that use TTS, initialize a template project with inworld init --template llm-to-tts-node (see Project Initialization above).

Telemetry

The Inworld CLI collects general usage data to help us improve the tool. Information such as the following are tracked:
  • Command execution time
  • CLI version
  • Command name
Managing Telemetry Inworld takes privacy and security seriously. You can opt-out if you prefer not to share any telemetry information.
# Disable telemetry collection
inworld auth disable_telemetry

# Enable telemetry collection
inworld auth enable_telemetry

Next Steps

Ready to start building with the Inworld CLI?

Need Help?

  • Troubleshooting Guide - Common issues and solutions
  • CLI Help: Run inworld help or inworld [command] --help for detailed command information