Skip to main content

Lua AI CLI

Build and deploy AI agents with superpowers.
Looking for what’s new? See the changelog for release notes.

Options

All Commands

AI Agent Building Guide

For AI IDEs: Complete workflow for Cursor, Windsurf, GitHub Copilot

Non-Interactive Mode

Command reference for automation, CI/CD, and scripting

Quick Examples

Get help for any command: lua [command] --help or lua help [command]Documentation: https://docs.heylua.ai
Support: https://heylua.ai/support

Quick Command Reference

lua init

Initialize new skill project

lua skills

View and manage skills

lua env

Manage environment variables

lua persona

Configure agent personality

lua features

Manage agent capabilities

lua mcp

Manage MCP servers

lua integrations

Connect third-party accounts

lua sync

Detect and resolve drift

lua test

Test tools interactively

lua chat

Interactive chat with your agent

lua push

Upload version to server

lua deploy

Deploy to production

lua completion

Shell autocomplete setup

Shell Autocomplete

Enable tab completion for all Lua CLI commands and arguments:

Learn More

Direct Mode

Skip interactive prompts by specifying your target directly:

Command Categories

Authentication

Set up API key authentication
Choose between:
  • Email: OTP verification
  • API Key: Existing key

Learn More

Skill Management

Create new skill project
Default (minimal):
  • Clean agent ready to customize
  • TypeScript configuration
  • lua.skill.yaml config
With —with-examples:
  • 30+ example tools
  • Example webhooks, jobs, processors
  • Complete e-commerce flow examples

Learn More

Common Workflows

New Project Workflow

1

Authenticate

2

Initialize

3

Configure Environment

Add API keys and configuration to .env file
4

Configure Persona

Define your agent’s personality in local file
5

Test Your Agent

Interactive chat in sandbox mode
Optional: Use lua test to test individual tools with specific inputs
6

Deploy

Development Workflow

1

Configure Environment (if needed)

Add any new API keys or configuration needed
2

Update Persona (if needed)

Refine agent personality based on feedback
3

Make Changes

Edit your tools in src/tools/*.ts
4

Test Your Agent

Select sandbox mode to test with local changes
Pro tip: Use lua test to debug specific tool logic if needed
5

Push Persona to Production (if changed)

Or use: lua push persona
6

Push Skill When Ready

Upload new skill version
7

Deploy to Production

Make available to all users

Quick Fix Workflow

Global Flags

All commands support:

Environment Variables

Commands automatically load environment variables from:
1

System Environment

Variables from your shell
2

.env File

Variables from project .env
3

lua.skill.yaml

Variables from skill config

Learn More

Error Handling

All commands include:
  • ✅ Descriptive error messages
  • ✅ Exit codes (0 = success, 1 = error)
  • ✅ Troubleshooting hints

Common Errors

Solution: Run lua auth configure
Solution: Run command from skill directory or run lua init first
Solution: Increment the version number in lua.skill.yaml (this is the only field you should manually edit)
Solution: Create index.ts or src/index.ts with skill definition

More Troubleshooting

Agent Structure

Project Code Pattern

Use LuaAgent for unified configuration:

Project Structure

Configuration File

lua.skill.yaml

Auto-managed state manifest (IDs and versions only):
Auto-managed fields:
  • skillId - Created during compilation
  • webhookId - Created during compilation
  • jobId - Created during compilation
  • mcpServerId - Created during compilation
  • skills, webhooks, jobs, mcpServers arrays - Populated from code
  • Versions/IDs are tracked here; persona/env/schedule live in code (sandbox) or server (production)
Manual fields:
  • agentId - Set during lua init
  • orgId - Set during lua init
  • version - Update when releasing (for each component)

System Requirements

Node.js

Version 16.0.0 or higher

npm

Version 7.0.0 or higher

TypeScript

Included in template (knowledge helpful)

Git

Optional but recommended

Storage Locations

System Keychain
  • macOS: Keychain
  • Windows: Credential Vault
  • Linux: libsecret

Next Steps

Authentication

Set up API key authentication

Skill Management

Learn all skill management commands

Sync Command

Detect and resolve drift

Environment Command

Manage sandbox and production variables

Persona Command

Configure agent personality

Features Command

Manage agent capabilities

MCP Command

Manage MCP servers for external tools

Integrations Command

Connect third-party accounts

Chat Command

Interactive chat with your agent

Utility Commands

Shell autocomplete and more