@ala/sdk
SDK examples
Typed TypeScript recipes for the Launch Auditor API. Install with npm i @ala/sdk and set ALA_API_KEY. Base URL: https://api.launchauditor.com/v1.
Quickstart — scan & clearance
Create a scan, poll until complete, and read the clearance verdict with blocker count.
Quickstart — scan & clearance
import { LaunchAuditorClient } from "@ala/sdk";
const client = new LaunchAuditorClient({
apiKey: process.env.ALA_API_KEY!,
baseUrl: "https://api.launchauditor.com/v1",
});
const { id } = await client.createScan({ url: "https://example.com" });
const scan = await client.pollScan(id, {
onProgress: (s) => console.log(s.status, s.progress),
});
const clearance = await client.getClearance(id);
console.log(clearance.verdict, clearance.blockers.length);CI gate script
Exit non-zero when verdict is HOLD or NO-GO. Mark scans public to embed the launch score badge in PR comments.
CI gate script
import { LaunchAuditorClient } from "@ala/sdk";
const client = new LaunchAuditorClient({
apiKey: process.env.ALA_API_KEY!,
baseUrl: "https://api.launchauditor.com/v1",
});
const { id } = await client.createScan({
url: "https://staging.example.com",
depth: 3,
isPublic: true,
});
const scan = await client.pollScan(id, {
intervalMs: 10_000,
onProgress: (s) => console.log(`${s.status} ${s.progress ?? 0}%`),
});
const clearance = await client.getClearance(id);
if (clearance.verdict === "no_go" || clearance.verdict === "hold") {
console.error("Launch gate failed:", clearance.verdictLabel);
process.exit(1);
}
console.log("Cleared:", clearance.launchScore);Filter critical issues
Paginate issues by severity and category for fix-queue automation.
Filter critical issues
import { LaunchAuditorClient } from "@ala/sdk";
const client = new LaunchAuditorClient({
apiKey: process.env.ALA_API_KEY!,
baseUrl: "https://api.launchauditor.com/v1",
});
const { issues, total } = await client.getIssues("YOUR_SCAN_ID", {
severity: "critical",
pageSize: 50,
});
for (const issue of issues) {
console.log(`[${issue.severity}] ${issue.checkId}: ${issue.title}`);
}
console.log(`${total} critical issues`);Executive PDF report
Queue an investor-ready executive PDF, wait for generation, and download the artifact.
Executive PDF report
import { LaunchAuditorClient } from "@ala/sdk";
import { writeFileSync } from "node:fs";
const client = new LaunchAuditorClient({
apiKey: process.env.ALA_API_KEY!,
baseUrl: "https://api.launchauditor.com/v1",
});
const report = await client.createReport({
scanId: "YOUR_SCAN_ID",
format: "executive",
});
const ready = await client.waitForReport(report.id);
const { data, contentType } = await client.downloadReport(ready.id);
writeFileSync("executive-summary.pdf", data);
console.log("Saved", contentType);List launches
Enumerate projects in your org for portfolio dashboards or batch scans.
List launches
import { LaunchAuditorClient } from "@ala/sdk";
const client = new LaunchAuditorClient({
apiKey: process.env.ALA_API_KEY!,
baseUrl: "https://api.launchauditor.com/v1",
});
const projects = await client.listProjects();
for (const project of projects) {
console.log(project.name, project.url, "latest scan:", project.latestScanId ?? "none");
}