Lua AI CLI
Build and deploy AI agents with superpowers.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:
Support: https://heylua.ai/support
lua [command] --help or lua help [command]Documentation: https://docs.heylua.aiSupport: 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:- Bash
- Zsh
- Fish
Learn More
Direct Mode
Skip interactive prompts by specifying your target directly:- Push Commands
- Environment Commands
- Persona Commands
- Skills Commands
Command Categories
Authentication
- configure
- key
- logout
Set up API key authenticationChoose between:
- Email: OTP verification
- API Key: Existing key
Learn More
Skill Management
- init
- compile
- test
- push
- deploy
- chat
Create new skill projectDefault (minimal):
- Clean agent ready to customize
- TypeScript configuration
lua.skill.yamlconfig
- 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
4
Configure Persona
5
Test Your Agent
Optional: Use
lua test to test individual tools with specific inputs6
Deploy
Development Workflow
1
Configure Environment (if needed)
2
Update Persona (if needed)
3
Make Changes
Edit your tools in
src/tools/*.ts4
Test Your Agent
Pro tip: Use
lua test to debug specific tool logic if needed5
Push Persona to Production (if changed)
lua push persona6
Push Skill When Ready
7
Deploy to Production
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
.env3
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
No API key found
No API key found
lua auth configureNo lua.skill.yaml found
No lua.skill.yaml found
lua init firstVersion already exists
Version already exists
lua.skill.yaml (this is the only field you should manually edit)Compilation failed
Compilation failed
index.ts or src/index.ts with skill definitionMore Troubleshooting
Agent Structure
Project Code Pattern
UseLuaAgent for unified configuration:
Project Structure
Configuration File
lua.skill.yaml
Auto-managed state manifest (IDs and versions only):skillId- Created during compilationwebhookId- Created during compilationjobId- Created during compilationmcpServerId- Created during compilationskills,webhooks,jobs,mcpServersarrays - Populated from code- Versions/IDs are tracked here; persona/env/schedule live in code (sandbox) or server (production)
agentId- Set duringlua initorgId- Set duringlua initversion- 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
- Credentials
- Project Files
- Temporary
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

