Application Manifest
manifest.lua
The manifest is a Lua file that returns a table describing the application. It's located at the root of each app directory:
/apps/com.developer.appname/manifest.lua
Required Fields
| Field | Type | Description |
|---|---|---|
name |
string | Short identifier for the app (e.g., "shell", "explorer") |
Common Fields
| Field | Type | Default | Description |
|---|---|---|---|
pretty |
string | name | Human-readable display name (e.g., "File Explorer") |
developer |
string | — | Developer/author name |
version |
string | — | Version string (e.g., "1.0.0") |
description |
string | — | Brief description of the app |
category |
string | "Other" | Category for start menu grouping (e.g., "system", "utilities", "games") |
entry |
string | "init.lua" | Main entry point file in src/ directory |
mode |
string | "gui" | App mode: "gui", "cli", or "background" |
type |
string | — | Special type: "html" for HTML-based apps |
Permissions
| Field | Type | Description |
|---|---|---|
permissions |
table | Array of permission strings the app requires |
Available Permissions
Path Restrictions
| Field | Type | Description |
|---|---|---|
allowedPaths |
table | Array of glob patterns for filesystem access |
Example: { "/home/*", "/apps/*" } — App can only access files under /home/ and /apps/
Lifecycle Scripts
| Field | Type | Description |
|---|---|---|
postInstall |
string | Script to run after installation (relative to src/) |
preUninstall |
string | Script to run before uninstallation |
Example Manifest
return {
name = "explorer";
pretty = "File Explorer";
developer = "luajitos";
version = "1.2.0";
category = "system";
description = "Browse and manage files on the system";
entry = "explorer.lua";
mode = "gui";
permissions = {
"filesystem";
"system";
};
allowedPaths = {
"/home/*";
"/apps/*";
};
}
HTML App Example
return {
name = "htmltest";
pretty = "HTML Test App";
developer = "luajitos";
version = "1.0.0";
type = "html";
entry = "index.html";
permissions = {
"filesystem";
};
}
Example HTML entry file (index.html):
<!DOCTYPE html>
<html>
<head>
<title>HTML Test App</title>
</head>
<body>
<h1>HTML App Test</h1>
<p>This app uses type="html" in its manifest.</p>
<p><a href="about.html">Go to About page</a></p>
<button onclick="alert('Hello from HTML app!')">Show Alert</button>
<button onclick="setName()">Set Name</button>
<h2>Form Test</h2>
<form>
<label>Name:</label>
<input type="text" id="name" name="name">
<br>
<input type="submit" value="Submit">
</form>
<p>Uses the app's own permissions and context!</p>
<script>
console.log("HTML Test App loaded!")
function setName()
query("#name").value = "Test User"
end
</script>
</body>
</html>
Embedded Manifest
For standalone Lua scripts, you can embed the manifest directly in the file using a special comment block:
--[[MANIFEST
{
permissions = {"filesystem", "draw"}
}
]]
-- Your script code starts here
print("Hello from script!")
The embedded manifest uses the same fields as manifest.lua, but is parsed from the comment at the top of the script.
CLI App Example
return {
name = "lam";
pretty = "Application Manager";
developer = "luajitos";
version = "2.0.0";
category = "system";
description = "Package and install applications";
entry = "init.lua";
mode = "cli";
permissions = {
"filesystem";
"system";
"load";
};
allowedPaths = {
"/apps/*";
"/home/*";
"/keys/*";
};
}