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.

Options

Non-Interactive Mode

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

What Gets Created

A clean slate - build your agent from scratch!

Configuration File

lua.skill.yaml is created with:
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.

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

Example Output

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

Compile Options

Learn More

See lua sync for details on drift detection

lua test

Test individual tools locally in a sandboxed environment.

Options

Non-Interactive Mode

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

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

lua push

Push your compiled components to the Lua server.

Options

Auto-backup-push: Every lua push <primitive> now synchronously runs a fresh-from-disk backup as the final step. If the backup fails, the command exits non-zero β€” no more silent partial success where the primitive landed but local source never reached the canonical store.

Non-Interactive Mode

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
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)
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

Example: Push Only (Interactive)

Example: Push Only (Direct Mode)

Example: Push and Deploy

Version Management

The command auto-suggests the next patch version:
Press Enter to accept or type your own version
Version Conflict Avoidance: When using --force, the CLI automatically checks the server for the highest existing version and suggests the next available version. This prevents β€œVersion already exists” errors during automated deployments.

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:
Then 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 of a single primitive to production (all users).
type is optional β€” when omitted, an interactive menu lets you pick. Valid types: skill, webhook, job, preprocessor, postprocessor, persona, all.
lua deploy is the original, single-primitive release command and remains fully supported β€” but for agents already using agent versions, lua version create + lua version promote is the recommended flow: it snapshots and switches every primitive at once, atomically, instead of one at a time. See The release flow, end to end for how push, deploy, and version fit together.What lua deploy actually does depends on your agent’s history:
  • If the agent has promoted at least one agent version, lua deploy performs a scoped promote: it automatically creates and promotes a new agent version identical to the current one, except for the primitive you just deployed. The change is live immediately, and it still shows up in lua version list (tagged with a deploy … message) so your version history has no gaps.
  • If the agent has never created or promoted an agent version, lua deploy activates the primitive directly, exactly as described below.

Options

Deprecated flags β€” still accepted for backward compatibility but prefer the generic equivalents above:

Usage

Non-Interactive Mode

What It Does

1

Select Type

Choose the primitive type (or pass as argument to skip)
2

Select Entity

Pick which skill / webhook / job / etc. to deploy (auto-selected if only one exists)
3

Fetch Versions

Lists all pushed versions from the server
4

Select Version

Choose which version to deploy (or pass --set-version latest)
5

Confirm

Shows warning about production deployment (skip with --force)
6

Deploy

Publishes the selected version β€” immediately live for all users

Example

Features

  • Works for all primitive types β€” not just skills
  • Shows all available versions with currently deployed one highlighted
  • Requires explicit confirmation (skip with --force)
  • Immediate deployment (no rollback delay)
  • lua deploy all --force deploys latest version of every primitive in one command
  • For agents with agent-version history, performs a scoped promote behind the scenes β€” see the note above
Deployment is immediate! If lua deploy reports success, that exact code serves the very next invocation of the agent (allow up to roughly a minute for edge caches to catch up). All users will get the new version right away. Test thoroughly with lua chat first β€” sandbox testing never touches what’s live.

lua push backup

Backup your project source files to cloud storage for disaster recovery and team collaboration.
Push your project source files to cloud storage for safekeeping. Uses content-addressed storage with automatic deduplication for efficient backups.

Options

What Gets Backed Up

The backup includes all source files tracked in your compilation manifest:
  • Source Code: src/ directory (TypeScript files)
  • Configuration: lua.skill.yaml, tsconfig.json, package.json
  • Environment Template: .env.example (if exists)
  • Documentation: README.md (if exists)
NOT backed up: node_modules/, dist/, .env (secrets), .git/ (use Git for version control)

How It Works

1

Compile Project

Ensures manifest is fresh (runs lua compile if needed)
2

Calculate Project Hash

Creates a content hash of all source files for deduplication
3

Check Existing Backup

Verifies if this exact project state already exists on server
4

Upload New Files

Uploads only new/changed files (content-addressed storage)
  • Compares file hashes with server
  • Uploads missing blobs in batches
  • Deduplicates identical files across backups
5

Save Manifest

Saves the project structure and file references to MongoDB
6

Update Local Tracking

Updates lua.skill.yaml with backup hash for drift detection

Example Output

Restoring from Backup

To restore a backed-up project on a new machine:
This will:
  1. Create a new project directory
  2. Download all source files from cloud storage
  3. Restore the exact project state from backup
  4. Install dependencies
Interactive restore:

Use Cases

Recover from lost laptop or corrupted files:
All your source code is back!

Content-Addressed Storage

Backups use content-addressed storage (like Git):
  • Each file is stored by its SHA-256 hash
  • Identical files are stored only once
  • Subsequent backups only upload changed files
  • Extremely efficient for large projects with small changes
Example: If you change one line in one file, only that file is re-uploaded. The other 99 files reference existing blobs.

Best Practices

If something breaks, restore from backup.
Backup β‰  Version Control
  • Backup: Disaster recovery, single snapshot
  • Git: Full history, branching, collaboration
Use both:
Always have a recovery point before production changes.
Add to your deployment pipeline:

Complete Workflow

New Project Workflow

Development Workflow

Quick Fix Workflow

These workflows use lua push + lua deploy β€” the fastest path for a single primitive, and exactly how a brand-new agent’s first release works. Once an agent has releases it’s tracking as agent versions, prefer lua version create + lua version promote when you want several primitives to switch together atomically. lua deploy still works at that point too β€” it performs a scoped promote under the hood β€” see The release flow, end to end.

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:
Error: ❌ No index.ts foundSolution: Create src/index.ts with skill definition:
Error: ❌ Tool name invalidSolution: Tool names can only contain: a-z, A-Z, 0-9, -, _
Error: ❌ Cannot find module 'lua-cli'Solution: Install dependencies:

Best Practices

Always test locally first:
  • PATCH (1.0.1): Bug fixes
  • MINOR (1.1.0): New features
  • MAJOR (2.0.0): Breaking changes
Don’t delete old versions - they serve as rollback points

Next Steps

Development Mode

Learn about live development with auto-reload

Build Your First Skill

Follow a complete tutorial

Agent Versions

Snapshot and promote every primitive together, atomically