Axiom Client
A TypeScript client for the Axiom API — wraps the dataset and current-user endpoints.
Installation
Section titled “Installation”pnpm add @theholocron/axiom-clientimport { createAxiomClient } from "@theholocron/axiom-client";
const client = createAxiomClient({ token: process.env.AXIOM_TOKEN!,});
// Get the current token's user (token check)const me = await client.user.me();
// Find or create a datasetconst dataset = await client.datasets.get("my-logs").catch(() => client.datasets.create({ name: "my-logs" }));console.log(dataset.id);The full API reference is generated from the package’s TSDoc comments.