SearchCtrlK

  • ↑↓navigate
  • ↵open
  • escclose

Can’t find it? Contact us

Use a package from the terminal

Run a package's own command line with sdxc pkg to decode a token, check a domain, render a diagram or convert a contact card, and script it with --json and exit codes.

After reading this guide, you will know

  • How to run any package's command line with sdxc pkg, without installing the package
  • How every package command line reads input, prints reports and exits, so scripts and CI can rely on it
  • Which packages ship a command line and what each one does

Many packages do work you also want at a terminal: generating a key pair, decoding a token someone pasted into a ticket, checking a domain's mail records before a launch. Those packages ship a small command line beside the library that calls the same functions your app does, and the sdxc command runs any of them. This guide runs one, scripts it, and lists every package that has one.

Run one with sdxc pkg

Install sdxc once, as The sdxc command shows:

Terminal
npm add -g @sdxc/kit

sdxc pkg followed by a package's name runs that package's command line, with everything after the name passed to it as typed:

Terminal
sdxc pkg jwt decode eyJhbGciOiJFUzI1NiJ9.eyJzdWIiOiIxMjMifQ.c2ln

Inside a project that installs @sdxc/jwt, it runs that version. Anywhere else it downloads the published package with bunx, or with npx when Bun is missing, so nothing needs installing first. sdxc pkg alone lists every package with a command line.

A project that pins its @sdxc packages to a release gets the command line from that same release. In a project on 2026.10.25, sdxc pkg jwt runs the newest @sdxc/jwt published on or before that date, so the command line decodes and signs tokens the way your app's code does. Outside a project, or in one that pins no @sdxc package, it runs the newest version.

A mistyped name runs nothing and suggests the closest match, arguments included:

No @sdxc package command line is named "uiid". Did you mean `sdxc pkg uuid v4 -n 3`?

Script it with --json and exit codes

Every package command line behaves the same way, so a script written against one reads the others:

  • Input comes from a path argument, or from stdin when the argument is - or left out, so commands chain with pipes.

  • Output goes to stdout, and diagnostics to stderr.

  • --json prints any report as JSON with a stable shape, for scripts and agents. Without it the output is meant for people.

  • Exit codes: 0 the command did its work, 1 it ran and found a problem (an invalid signature, a missing DMARC record, a domain about to expire), 2 the arguments or the input could not be read.

  • Secrets such as signing keys and passwords are read from a file, stdin or a named environment variable, never from an argument, so they stay out of shell history.

  • --help on any command lists its arguments and flags.

Exit code 1 makes a check usable in CI as it is:

Terminal
sdxc pkg email-auth check example.com --json > email-auth.json

The step fails when a policy is missing, and the JSON report is there to read.

Find the command line you need

PackageCommandWhat it does
@sdxc/cronsdxc pkg cronNext occurrences of a schedule, a plain-English description, validation
@sdxc/cryptosdxc pkg cryptoRandom tokens, hashes, HMACs, TOTP codes, scrypt password hashes
@sdxc/diagramsdxc pkg diagramRender a Mermaid file to SVG, or check it
@sdxc/distillsdxc pkg distillExtract the article from a web page
@sdxc/dohsdxc pkg dohDNS lookups over HTTPS
@sdxc/email-addresssdxc pkg email-addressCheck addresses for syntax, disposable domains and mail servers
@sdxc/email-authsdxc pkg email-authCheck a domain's DMARC, SPF, MTA-STS, TLS-RPT, BIMI and DKIM
@sdxc/fontsdxc pkg fontInspect a font, or subset it to the characters a page uses
@sdxc/htmlsdxc pkg htmlQuery a page by role and accessible name, or print its outline
@sdxc/http-signaturessdxc pkg http-signaturesSign a request, or verify a signed one
@sdxc/icalendarsdxc pkg icalendarValidate a calendar, expand its recurrences, try out an RRULE
@sdxc/ipsdxc pkg ipClassify an address, check whether a range contains it
@sdxc/jscalendarsdxc pkg jscalendarConvert to and from iCalendar, expand recurrences, validate
@sdxc/jscontactsdxc pkg jscontactConvert between vCard, jCard and JSContact, validate
@sdxc/jsdocsdxc pkg jsdocExtract JSDoc from source files into a documentation model
@sdxc/json-canonicalsdxc pkg json-canonicalCanonicalize JSON, hash the canonical form
@sdxc/json-patchsdxc pkg json-patchApply, diff and validate JSON Patch documents
@sdxc/jsoncsdxc pkg jsoncCheck JSON with comments, strip it to plain JSON
@sdxc/jsonpathsdxc pkg jsonpathQuery JSON with JSONPath
@sdxc/jwtsdxc pkg jwtDecode, verify and sign tokens, generate signing keys
@sdxc/merge-patchsdxc pkg merge-patchApply and diff JSON Merge Patch documents
@sdxc/openapisdxc pkg openapiCheck an OpenAPI document
@sdxc/openpgpsdxc pkg openpgpGenerate keys, sign, verify, inspect a key
@sdxc/qrsdxc pkg qrEncode text as a QR code, to SVG or PNG
@sdxc/rdapsdxc pkg rdapLook up a domain's registration, fail when it expires soon
@sdxc/robotssdxc pkg robotsCheck a URL against robots.txt, parse a robots.txt
@sdxc/security-headerssdxc pkg security-headersAudit a page's security headers, parse a CSP
@sdxc/semversdxc pkg semverValidate, compare and sort versions
@sdxc/sitemapsdxc pkg sitemapList and validate a sitemap's URLs
@sdxc/typeidsdxc pkg typeidGenerate, parse and encode TypeIDs
@sdxc/user-agentsdxc pkg user-agentParse User-Agent strings, one per line from a log
@sdxc/uuidsdxc pkg uuidGenerate v4 and v7 UUIDs, validate one
@sdxc/web-pushsdxc pkg web-pushGenerate VAPID keys, send a test notification
@sdxc/webmentionsdxc pkg webmentionDiscover an endpoint, send and verify Webmentions
@sdxc/well-knownsdxc pkg well-knownCheck a security.txt, fetch and validate well-known documents
@sdxc/zone-filesdxc pkg zone-fileValidate, parse and format DNS zone files

The guide for each package shows its command line where it helps, and --help lists the rest.

Where to go next

Documentation

Can’t find it? Contact us