Skip to main content

Overview

The Lua CLI creates a clean, minimal project structure by default. You can optionally include examples with --with-examples.

Core Files

src/index.ts

Your agent’s main configuration file.

lua.skill.yaml

Auto-managed configuration file. Created during lua init, updated automatically by CLI commands.
Do not manually edit this file! The lua.skill.yaml is managed by the CLI and stores state only (IDs and versions). All configuration belongs in your code:
  • PersonaLuaAgent in src/index.ts
  • Tool definitions → Your tool files
  • Skill configurationLuaSkill in code
  • Environment variables.env file or lua env command
The only exception: you may manually increment the version number before pushing a new release.
IDs like skillId, webhookId, and jobId are auto-generated during compilation. Never edit these manually.

package.json

Standard Node.js package configuration:

Building Your Project

As your project grows, organize it like this:

File Naming Conventions

Auto-Generated Directories

dist/

Compiled JavaScript output. Created by lua compile.

.lua/

CLI cache directory. Safe to delete - will be regenerated.

Environment Files

.env

Your local environment variables (create this file):
Add .env to .gitignore - never commit secrets!

.env.example

Template for environment variables (commit this):

Git Configuration

✅ Commit These

❌ Don’t Commit These

Sample .gitignore

Project Size Patterns

Next Steps

Building Skills

Learn how to build custom skills

Best Practices

Follow recommended patterns

API Reference

Available platform APIs

Examples

See working code examples