SDKs and CLI
Install the official @luaward/sdk, Python luaward, and @luaward/cli packages from npm and PyPI.
Verify official package names before installing
Only install packages published under the official links below and github.com/luaward. Check the credential type required for each tool: SDKs use a workspace Developer API key (lwa_live_...), while the CLI uses a Personal token (lwm_...).
Official packages
| Tool | Registry & Package | Authentication | Runtime requirement |
|---|---|---|---|
| JavaScript / TypeScript SDK | npm @luaward/sdk | Developer API key (lwa_live_...) | Node.js / modern fetch |
| Python SDK | PyPI luaward | Developer API key (lwa_live_...) | Python 3.10+, zero dependencies |
| Luaward CLI | npm @luaward/cli | Personal token (lwm_...) | Node.js 20+ |
| Official GitHub | github.com/luaward | Repository & docs links | Organization profile |
JavaScript / TypeScript SDK (@luaward/sdk)
Install from npm:
npm install @luaward/sdkInitialize LuawardClient on a server with your workspace Developer API key (lwa_live_...) and project ID:
import { LuawardClient } from "@luaward/sdk";
const lw = new LuawardClient({
apiKey: process.env.LUAWARD_API_KEY,
projectId: process.env.LUAWARD_PROJECT_ID,
});
const created = await lw.keys.create({
discord_id: "123456789012345678",
key_days: 30,
note: "Monthly access",
});
const queued = await lw.scripts.upload(process.env.LUAWARD_SCRIPT_ID, {
source: 'print("Hello from SDK")',
preset: "balanced",
});- Base URL: Defaults to
https://api.luaward.comand appends/v3automatically. - Included helpers:
projects,keys,scripts,stats, genericlw.request(), andLuarmorCompat(compare fields before migrating). - Retries and errors: Automatically retries HTTP
429and503responses up to 3 times while honoringRetry-After, and throws typed errors (LuawardAuthError,LuawardRateLimitError,LuawardPlanLimitError,LuawardNotFoundError,LuawardError).
See Developer API Overview and API v3 Reference for endpoint scopes and payload details.
Python SDK (luaward)
Install from PyPI:
pip install luawardUse LuawardClient for synchronous server scripts or AsyncLuawardClient for async workflows:
import os
from luaward import LuawardClient
lw = LuawardClient(
api_key=os.environ["LUAWARD_API_KEY"],
project_id=os.environ["LUAWARD_PROJECT_ID"],
)
created = lw.keys.create(
discord_id="123456789012345678",
key_days=30,
note="Monthly access",
)
print(created["user_key"])- Zero external dependencies: Uses Python's standard
urllib; requires Python 3.10+.AsyncLuawardClientwraps synchronous requests usingasyncio.to_thread(). - Sync and async coverage: The sync client exposes
keys,scripts,stats, andrequest(), while the async client exposeskeysandrequest(). BothLuarmorCompatandAsyncLuarmorCompatare included. - Retries and exceptions: Automatically retries HTTP
429and503responses up to 3 times and raises typed exceptions fromluaward.exceptions.
Luaward CLI (@luaward/cli)
Install globally from npm (requires Node.js 20+):
npm install -g @luaward/cli
luaward --versionOr install from the hosted tarball on luaward.com:
npm install -g https://luaward.com/luaward-cli.tgz
luaward --version- Credentials and Early Access: Authenticates with a Personal token (
lwm_...) againsthttps://luaward.com/api/ide(a Developer API keylwa_live_...will not work here). Dashboard IDE access is currently in Early Access for allowlisted accounts. - Credential storage: Stored at
~/.config/luaward/credentials.json(override withLUAWARD_CONFIG_DIR) or supplied per invocation viaLUAWARD_TOKEN. - Core commands:
login,init,scripts,pull,push,toggle,sessions,pair,dev,exec,stop,keys, anderrors. All commands support--json/-jfor CI pipelines.
IDE, AI and MCP
- VS Code / Cursor extension: The editor extension is not yet published on the VS Code Marketplace or Open VSX. Contact support to request a tested
.vsixpackage during Early Access. - AI and MCP: Connect Claude, ChatGPT, Claude Code, or Cursor to your active game sessions and scripts via Workspace MCP.