Skip to main content

Overview

Skill management commands help you build, test, and deploy your AI skills.

lua init

Create new skill project

lua compile

Compile TypeScript code

lua test

Test tools interactively

lua push

Upload version to server

lua deploy

Deploy to production

lua init

Initialize a new Lua skill project in the current directory.
mkdir my-skill && cd my-skill
lua init                    # Minimal project (recommended)
lua init --with-examples    # Include 30+ example tools

Options

OptionDescription
--with-examplesInclude example skills, tools, jobs, webhooks, and processors

What It Does

1

Choose Agent

Select existing agent or create new one
2

Configure Agent (if new)

  • Enter business name
  • Enter agent name
  • Select business type
  • Select brand personality
  • Enter brand traits
  • Configure features
3

Create Project

  • Copies template files
  • Creates lua.skill.yaml
  • Installs dependencies
  • Ready to customize!

Interactive Prompts

$ lua init
? What would you like to do? Create new agent
? Enter business name: My Coffee Shop
? Enter agent name: CoffeeBot
? Select business type: Food & Beverage
? Select brand personality: Friendly
? Enter brand traits: Warm, welcoming, knowledgeable
πŸ”„ Creating agent...
βœ… Agent created successfully!
βœ… Created lua.skill.yaml
βœ… Copied template files
βœ… Updated LuaAgent configuration
πŸ“¦ Installing dependencies...
βœ… Lua skill project initialized successfully!
πŸ’‘ Tip: Use `lua init --with-examples` to include example code

What Gets Created

your-skill/
β”œβ”€β”€ src/
β”‚   └── index.ts              # Empty agent ready to customize
β”œβ”€β”€ lua.skill.yaml            # Configuration (auto-managed)
β”œβ”€β”€ package.json              # Dependencies
β”œβ”€β”€ tsconfig.json             # TypeScript config
β”œβ”€β”€ .env.example              # Environment variables template
└── README.md                 # Quick start guide
A clean slate - build your agent from scratch!

Configuration File

lua.skill.yaml is created with:
agent:
  agentId: agent_abc123
  orgId: org_xyz789

skills: []  # Auto-populated during compilation
The lua.skill.yaml file is auto-managed by the CLI. Do not manually edit it except for incrementing version numbers. All configuration belongs in your code (src/index.ts).
Persona is stored in your LuaAgent code (in src/index.ts), not in YAML. The YAML file is state-only and tracks IDs and versions.

lua compile

Compile TypeScript skill into deployable JavaScript bundles.
lua compile

What It Does

1

Analyze Code

Detects all tools from your src/index.ts file
2

Bundle Tools

Uses esbuild to create optimized JavaScript bundles
3

Extract Metadata

Extracts tool names, descriptions, and schemas
4

Create Deployment

Generates deployment artifacts in dist/ directory
5

Update Config

Creates/updates skills in lua.skill.yaml

Output

dist/
β”œβ”€β”€ deployment.json          # Deployment metadata
β”œβ”€β”€ index.js                 # Main skill bundle
└── tools/                   # Individual tool bundles
    β”œβ”€β”€ GetWeatherTool.js
    β”œβ”€β”€ UserDataTool.js
    └── ...

.lua/
β”œβ”€β”€ deploy.json              # Legacy format
β”œβ”€β”€ get_weather.js           # Uncompressed (debugging)
└── ...

Example Output

$ lua compile
πŸ”¨ Compiling Lua skill...
πŸ“¦ Found 15 tools to bundle...
πŸ“¦ Bundling GetWeatherTool...
πŸ“¦ Bundling UserDataTool...
πŸ“¦ Bundling ProductsTool...
... (more tools)
πŸ“¦ Bundling main index...
βœ… Skill compiled successfully - 15 tools bundled

Features

  • βœ… Automatic Detection - Finds all tools in your code
  • βœ… Fast Bundling - Uses esbuild for speed
  • βœ… Type Safety - Validates TypeScript
  • βœ… Dependency Management - Bundles all dependencies
  • βœ… Skill Creation - Auto-creates skills in config
  • βœ… Drift Detection - Checks for server/local differences

Sync Options

Control drift detection during compile:
lua compile              # Default: check for drift, prompt if found
lua compile --no-sync    # Skip drift check entirely
lua compile --force-sync # Auto-update local from server if drift found
FlagDescription
--no-syncSkip drift detection (useful for CI/CD)
--force-syncAutomatically sync from server without prompting

Learn More

See lua sync for details on drift detection

lua test

Test individual tools locally in a sandboxed environment.
lua test

How It Works

1

Compile

Compiles your skill first
2

List Tools

Shows all available tools
3

Select Tool

Choose which tool to test
4

Enter Inputs

Dynamic prompts based on tool’s schema
5

Execute

Runs tool in secure VM sandbox
6

View Results

Shows output or error messages

Example Session

$ lua test
πŸ§ͺ Testing Lua skill...
πŸ“¦ Compiling code first...
βœ… Skill compiled successfully
πŸ“„ Loaded environment variables from .env file

? πŸ”§ Select a tool to test:
❯ get_weather - Get the weather for a given city
  create_product - Create a new product
  search_products - Search products
  get_user_data - Get user data
  
βœ… Selected tool: get_weather

πŸ“ Enter input values:
? city (required): London

πŸš€ Executing tool...
Input: {
  "city": "London"
}
βœ… Tool execution successful!
Output: {
  "weather": "3",
  "city": "London",
  "temperature": 15.2,
  "description": "Windspeed 12.3 km/h"
}

Features

  • βœ… Dynamic Prompts - Based on Zod schema
  • βœ… Type Validation - Validates inputs automatically
  • βœ… Environment Loading - Loads .env and lua.skill.yaml variables
  • βœ… Secure Sandbox - Isolated VM execution
  • βœ… Detailed Errors - Clear error messages

Testing Complex Inputs

# Nested objects
? shippingAddress.street (required): 123 Main St
? shippingAddress.city (required): New York
? shippingAddress.zip (required): 10001

# Arrays
? items[0].id (required): product_123
? items[0].quantity (required): 2
? Add another item? No

# Optional fields
? description (optional): [Press Enter to skip]

lua push

Push your compiled components to the Lua server.
lua push                 # Interactive selection
lua push skill           # Push a skill
lua push persona         # Push persona
lua push webhook         # Push a webhook
lua push job             # Push a job
lua push preprocessor    # Push a preprocessor
lua push postprocessor   # Push a postprocessor
lua push mcp             # Push an MCP server
lua push all --force     # Push all components
Push All: Use lua push all --force to push all components at once. Add --auto-deploy to also activate/deploy them.

Usage Modes

Default behavior - prompts for selection
$ lua push
? What would you like to push?
  β€Ί skill
    persona
Best for: When you’re not sure or want to see options

What It Does (Skills)

1

Select Skill (if interactive)

Choose which skill to push (if multiple)
2

Enter Version

Enter new version number (auto-suggests next patch)
Current version: 1.0.0
? Enter new version to push: (1.0.1)
3

Update Configuration

Updates version in lua.skill.yaml
4

Authenticate

Validates your API key
5

Compile

Automatically compiles the skill
6

Upload

Uploads bundles to server
7

Optional Deploy

Choose to deploy immediately or later
? Would you like to deploy this version to production now? (y/N)

Example: Push Only (Interactive)

$ lua push
? What would you like to push?
  β€Ί skill
    persona

πŸ“¦ Pushing skill: customer-service

Current version: 1.0.0
? Enter new version to push: (1.0.1) ⏎

πŸ“ Updating version from 1.0.0 to 1.0.1
βœ… Authenticated
πŸ”„ Compiling skill...
βœ… Skill compiled successfully - 10 tools bundled
πŸ”„ Pushing version to server...
βœ… Version 1.0.1 of "customer-service" pushed successfully

? Would you like to deploy this version to production now? No

[Version pushed, use 'lua deploy' to deploy later]

Example: Push Only (Direct Mode)

$ lua push skill
πŸ“¦ Pushing skill: customer-service

Current version: 1.0.0
? Enter new version to push: (1.0.1) ⏎

πŸ“ Updating version from 1.0.0 to 1.0.1
βœ… Authenticated
πŸ”„ Compiling skill...
βœ… Skill compiled successfully - 10 tools bundled
πŸ”„ Pushing version to server...
βœ… Version 1.0.1 of "customer-service" pushed successfully

? Would you like to deploy this version to production now? No

[Version pushed, use 'lua deploy' to deploy later]

Example: Push and Deploy

$ lua push
πŸ“¦ Pushing skill: order-management

Current version: 0.5.0
? Enter new version to push: 1.0.0

πŸ“ Updating version from 0.5.0 to 1.0.0
βœ… Authenticated
πŸ”„ Compiling skill...
βœ… Skill compiled successfully - 8 tools bundled
πŸ”„ Pushing version to server...
βœ… Version 1.0.0 of "order-management" pushed successfully

? Would you like to deploy this version to production now? Yes

⚠️  WARNING: You are about to deploy to PRODUCTION!
⚠️  This will affect ALL users immediately.

? Are you absolutely sure you want to deploy? Yes

πŸ”„ Publishing version...
βœ… Version 1.0.0 deployed successfully to production

Version Management

The command auto-suggests the next patch version:
Current: 1.0.0  β†’ Suggests: 1.0.1
Current: 1.5.9  β†’ Suggests: 1.5.10
Current: 2.0.0  β†’ Suggests: 2.0.1
Press Enter to accept or type your own version

Deploy Now or Later?

Important Notes

Version Management:
  • Always increments version (cannot overwrite)
  • Version is updated in lua.skill.yaml
  • All versions are preserved on server
  • Can deploy any previous version
Immediate Deployment:
  • Requires two confirmations for safety
  • Affects all users immediately
  • Have rollback plan ready
  • Monitor after deployment

Version Management

The version number is the only field in lua.skill.yaml you should manually edit:
skills:
  - name: my-skill
    version: 1.0.1  # Increment this before pushing
Then push:
lua push

Requirements

  • Must be in skill directory with lua.skill.yaml
  • Must have valid API key (lua auth configure)
  • Version must not already exist on server

lua deploy

Deploy a specific version to production (all users).
lua deploy

What It Does

1

Fetch Versions

Lists all pushed versions from server
2

Select Version

Choose which version to deploy
3

Confirm

Shows warning about production deployment
4

Deploy

Publishes selected version
5

Live!

Version is immediately available to all users

Example

$ lua deploy
βœ… Authenticated
πŸ”„ Fetching available versions...

? Select a version to deploy:
  1.0.2 - Created: Oct 3, 2025 by [email protected]
  1.0.1 - Created: Oct 2, 2025 by [email protected]
❯ 1.0.0 (CURRENT) - Created: Oct 1, 2025 by [email protected]

? ⚠️  Warning: This version will be deployed to all users. Do you want to proceed? Yes
πŸ”„ Publishing version...
βœ… Version 1.0.0 deployed successfully

Features

  • Shows all available versions
  • Indicates currently deployed version
  • Requires explicit confirmation
  • Immediate deployment (no rollback delay)
Deployment is immediate!All users will get the new version right away. Test thoroughly with lua chat first!

Complete Workflow

New Project Workflow

# 1. Authenticate
lua auth configure

# 2. Initialize
mkdir my-skill && cd my-skill
lua init

# 3. Test
lua test

# 4. Push
lua push

# 5. Deploy
lua deploy

Development Workflow

# Configure environment if needed
lua env sandbox        # Add new API keys locally
lua env production     # Update production env vars

# Make changes to src/tools/*.ts

# Test your agent
lua chat  # Choose sandbox mode

# Optional: Test specific tools
lua test  # For debugging individual tools

# When satisfied, push (direct mode - faster!)
lua push skill

# Update production persona if needed
lua persona production # Or: lua push persona

# Deploy to production
lua deploy

Quick Fix Workflow

# 1. Edit file
vim src/tools/MyTool.ts

# 2. Test
lua test

# 3. Push and deploy (direct mode)
lua push skill
lua deploy

Troubleshooting

Error: ❌ No lua.skill.yaml foundSolution: Run command from skill directory or run lua init first
Error: ❌ Version 1.0.0 already exists on the serverSolution: Increment version in lua.skill.yaml:
skills:
  - version: 1.0.1  # Increment this
Error: ❌ No index.ts foundSolution: Create src/index.ts with skill definition:
import { LuaSkill } from "lua-cli";
const skill = new LuaSkill({...});
Error: ❌ Tool name invalidSolution: Tool names can only contain: a-z, A-Z, 0-9, -, _
// βœ… Good
name = "get_weather"

// ❌ Bad
name = "get weather"  // No spaces
Error: ❌ Cannot find module 'lua-cli'Solution: Install dependencies:
npm install

Best Practices

Always test locally first:
lua test     # Test individual tools
lua chat     # Test conversationally
lua push     # Then push
  • PATCH (1.0.1): Bug fixes
  • MINOR (1.1.0): New features
  • MAJOR (2.0.0): Breaking changes
lua push     # Upload version
lua chat     # Test in sandbox
# If good, then:
lua deploy   # Deploy to production
Don’t delete old versions - they serve as rollback points

Next Steps