npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codai/axiom-axm

v2.4.0

Published

AXIOM v2 `.axm` front-end: Chevrotain lexer + CST parser that compiles the .axm DSL 1:1 into a Plan, with position-bearing diagnostics and a deterministic inverse printer

Readme

@codai/axiom-axm

The .axm v2 front-end for AXIOM: a Chevrotain 13 lexer + CST parser that compiles the DSL 1:1 into a PlanSchema-validated Plan, plus the deterministic inverse printer.

import { formatAxm, parseAxm } from "@codai/axiom-axm";

const { plan, diagnostics } = parseAxm(source); // never throws
// diagnostics: { severity, code: ERR_*, message, range: { start: {line, column}, end } }[]
if (plan) console.error(formatAxm(plan) === source); // canonical form roundtrips

plan is present only when there are no error diagnostics. Positions are 1-based. CRLF input is normalised to LF before lexing (heredoc contents included). Full semantics: docs/reference/axm-syntax.md.

Grammar

File        = Header, { Statement } ;
Header      = "axiom", Version ;                      Version = '"2"' ;
Statement   = PlanDecl ;
PlanDecl    = "plan", Ident, "{", { PlanItem } "}" ;
PlanItem    = "intent", String
            | "profile", Ident
            | "capabilities", "[", [ Cap { "," Cap } ], "]"
            | "artifact", String, ArtifactBody
            | "check", Ident, "using", QualIdent, [ Json ]
            | "meta", Json ;
Cap         = "fs" | "net" | "secret" | "ai" | "compute" | "git" ;
ArtifactBody= "{", { "mode", ("0644"|"0755") | "op", ("create"|"overwrite"|"delete") | Source }, "}" ;
Source      = "inline", HereDoc | "template", QualIdent, String, [ Json ] | "cas", Digest | "ref", String, Digest ;
HereDoc     = "<<", Ident, NEWLINE, { ANY }, NEWLINE, Ident ;
QualIdent   = Ident, { ".", Ident } ;          Digest = '"sha256:' 64*HEXDIG '"' ;
Json        = ? RFC 8259 object or array ? ;   Comment = "//" … EOL | "/*" … "*/" ;

Heredoc: the terminator must be alone on its line at column 1; the content excludes the newline before it (<<EOF\nEOF → ""; add an empty line for a trailing \n). formatAxm uses EOF, or EOF_n when a content line equals the terminator.

Example (examples/notes.axm)

axiom "2"

plan notes-app {
  intent "Scaffold a notes CLI with a README and drop the legacy shim"
  profile strict
  capabilities [fs]

  artifact "src/notes.ts" {
    mode 0644
    op create
    inline <<TS
export interface Note { id: string; body: string }
TS
  }

  artifact "bin/notes" {
    mode 0755
    cas "sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
  }

  artifact "legacy/shim.js" { op delete }

  check no-secrets using content.noSecrets {}
  check readme-with-src using repo.requireCompanion {"rules":[{"when":"src/**","expect":[{"name":"readme","match":"README.md"}]}]}

  meta {"ticket":"S-204","tags":["example","golden"]}
}

examples/notes.plan.json is the compiled Plan, pinned by the golden test.

Errors

Every diagnostic carries a code from the closed ERROR_CODES enum — lexer/parser/semantic errors are ERR_INVALID_PLAN; schema issues keep their own code (e.g. ERR_PATH_SEGMENT). Unknown predicate ids are not an error here — the checks registry decides at runtime.

Integration

MCP: axiom_axm_parse { source } → { plan?, diagnostics[] } (read-only). CLI: axiom compile plan.axm parses first and exits 2 with the diagnostics as JSON on any error. Both load this package lazily so the CLI cold start and bundle budget are unaffected.

Depends only on @codai/axiom-schema and chevrotain.