Install
Install the px402 command or the SDK with npm, pnpm, Yarn or Bun.
You need Node 22.13 or later, or Bun 1.4.4 or later. Use whichever package manager you like: the packages are the same.
The command
npm install -g @px402-tech/cli px402 --help yarn global is Yarn 1. With Yarn 2 or later, run the command without installing it.
Without installing
npx @px402-tech/cli --help The library
npm install @px402-tech/sdk If you only talk to the HTTP API, the wire types are enough:
npm install @px402-tech/types The three packages
| Package | What it is |
|---|---|
@px402-tech/cli | The px402 command |
@px402-tech/sdk | The library behind it: wallet, paying fetch, caps, journal, hosted and platform clients |
@px402-tech/types | Wire types and zod schemas of the public API |
cli depends on sdk, and sdk on types. They are ES modules with TypeScript declarations, under Apache-2.0, built
with Bun and run on Node or Bun. The px402 service itself is closed source. The SDK and CLI send no telemetry.
On Node
Nothing is compiled when you install. The payment journal uses the SQLite built into the runtime: node:sqlite on Node,
bun:sqlite on Bun. Node calls its SQLite experimental. The px402 command hides that one warning; your own program
may print it once when it opens the journal.