Welcome to the LocalScript documentation. This directory contains detailed reference material for the LocalScript service that generates validated Lua code from natural-language descriptions.
- Architecture — System components, the session state machine, the generation pipeline, the validation pipeline, and the optional RAG flow.
- API Reference — Complete HTTP API specification for both
llm-service(port8080) andsandbox-service(port6778), including request/response schemas and JSON examples. - Configuration — Every environment variable and Docker Compose option needed to tune the system.
- Sandbox Security — The Lua security model in depth: static AST checks, forbidden calls, runtime limits, and the error taxonomy.
- Development — How to run and build each service locally without Docker, plus how to verify your changes.
- TUI Client — Using the Ratatui-based terminal client, its key bindings, and the code export feature.
| Document | Read it for |
|---|---|
architecture.md |
How the pieces fit together and the end-to-end flow |
api-reference.md |
Exact request/response JSON contracts |
configuration.md |
Environment variables and defaults |
sandbox-security.md |
How untrusted Lua is kept safe |
development.md |
Setting up a local development environment |
tui.md |
Operating the terminal client |