Axiom Plugin
Install
pnpm add -D @theholocron/holocron-plugin-axiom
Capabilities
| Capability | Token |
|---|---|
logs | HOLOCRON_AXIOM_TOKEN (axiom) |
Self-contained activation
Section titled “Self-contained activation”Structured log output to Axiom is handled by
@theholocron/logger — its Axiom transport reads
HOLOCRON_AXIOM_TOKEN + HOLOCRON_AXIOM_DATASET (fallbacks: AXIOM_TOKEN +
AXIOM_DATASET) directly at startup. This plugin does not ship log lines.
The logs provider entry is used only by holocron setup (to provision the
holocron-ci and holocron-local datasets) and holocron doctor (to verify the
configured dataset is reachable).
# CI — one org secret, inherited by every repoexport HOLOCRON_AXIOM_DATASET=holocron-ci# Local — optional; leave unset to skip Axiom entirelyexport HOLOCRON_AXIOM_DATASET=holocron-localHOLOCRON_AXIOM_DATASET is not a secret.
Config
Section titled “Config”providers: { logs: "axiom",}No options are required. To pin the dataset that holocron doctor checks
independent of the env var:
providers: { logs: ["axiom", { dataset: "holocron-ci" }],}Options
Section titled “Options”| Option | Required | Description |
|---|---|---|
dataset |
No | Dataset name for whoami. Defaults to HOLOCRON_AXIOM_DATASET / AXIOM_DATASET |
Authentication
Section titled “Authentication”- Go to app.axiom.co/settings/api-tokens
- Create an API token with permission to read and create datasets
- Store it:
holocron auth set axiom <TOKEN>Or via env var:
export HOLOCRON_AXIOM_TOKEN=<TOKEN># Also recognized:export AXIOM_TOKEN=<TOKEN>What logs provides
Section titled “What logs provides”describe()— returns the provider name and required env var keys (HOLOCRON_AXIOM_TOKEN,HOLOCRON_AXIOM_DATASET)whoami()— fetches the configured dataset to verify the token and its reachabilityensureDataset(name)— create the dataset if it does not exist; returns whether it already existed. Idempotent.
Example
Section titled “Example”import { createPlugin } from "@theholocron/holocron-plugin-axiom";
const plugin = createPlugin({ token: process.env.HOLOCRON_AXIOM_TOKEN });const logs = plugin.capabilities.logs();
const { alreadyExists } = await logs.ensureDataset("holocron-ci");console.log(alreadyExists ? "dataset exists" : "dataset created");