All inclusive toolkit to build complex apps
Install task. Then run task setup & follow instructions until it says ✔️ you are setup.
Run task to see all possible commands.
1focus ships an ergonomic logging helper that wraps @axiomhq/js so you can ship events to Axiom from Node or browser code.
import { log } from "1focus"
await log("hello world")
await log("user signed in", { userId: "123" })Need more control? Create a scoped logger that bundles defaults and context:
import { createLogger } from "1focus"
const logger = createLogger({
metadata: { service: "api" },
flush: true,
})
await logger.info("order placed", { orderId: "ord_123", value: 42.5 })
await logger.error(new Error("checkout failed"), { orderId: "ord_123" })
const requestLogger = logger.with({ requestId: "req_abc" })
await requestLogger.debug("db.query", { durationMs: 32 })Set the following environment variables (or supply overrides when calling log):
AXIOM_TOKEN– API token with ingest permissions.AXIOM_DATASET– Dataset name to receive the events.AXIOM_ORG_ID(optional) – Only required when using personal tokens.AXIOM_URL(optional) – Set when using a self-hosted Axiom instance.
For front-end apps built with Vite, use the VITE_ prefixed variants (e.g. VITE_AXIOM_TOKEN).
Any PR to improve is welcome. codex & cursor are nice for dev. Great working & useful patches are most appreciated (ideally). Issues with bugs or ideas are welcome too.