LuawardDocs

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

ToolRegistry & PackageAuthenticationRuntime requirement
JavaScript / TypeScript SDKnpm @luaward/sdkDeveloper API key (lwa_live_...)Node.js / modern fetch
Python SDKPyPI luawardDeveloper API key (lwa_live_...)Python 3.10+, zero dependencies
Luaward CLInpm @luaward/cliPersonal token (lwm_...)Node.js 20+
Official GitHubgithub.com/luawardRepository & docs linksOrganization profile

JavaScript / TypeScript SDK (@luaward/sdk)

Install from npm:

npm install @luaward/sdk

Initialize 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.com and appends /v3 automatically.
  • Included helpers: projects, keys, scripts, stats, generic lw.request(), and LuarmorCompat (compare fields before migrating).
  • Retries and errors: Automatically retries HTTP 429 and 503 responses up to 3 times while honoring Retry-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 luaward

Use 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+. AsyncLuawardClient wraps synchronous requests using asyncio.to_thread().
  • Sync and async coverage: The sync client exposes keys, scripts, stats, and request(), while the async client exposes keys and request(). Both LuarmorCompat and AsyncLuarmorCompat are included.
  • Retries and exceptions: Automatically retries HTTP 429 and 503 responses up to 3 times and raises typed exceptions from luaward.exceptions.

Luaward CLI (@luaward/cli)

Install globally from npm (requires Node.js 20+):

npm install -g @luaward/cli
luaward --version

Or 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_...) against https://luaward.com/api/ide (a Developer API key lwa_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 with LUAWARD_CONFIG_DIR) or supplied per invocation via LUAWARD_TOKEN.
  • Core commands: login, init, scripts, pull, push, toggle, sessions, pair, dev, exec, stop, keys, and errors. All commands support --json / -j for 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 .vsix package during Early Access.
  • AI and MCP: Connect Claude, ChatGPT, Claude Code, or Cursor to your active game sessions and scripts via Workspace MCP.