Skip to main content

Requirements

  • Bun ≥ 1.0 (runs TypeScript functions + codegen)
  • Rust ≥ 1.85 (required to build the CLI from source — edition 2024)
  • Node.js ≥ 18 (optional, for client tooling)

Install the CLI

Pylon is currently installed from source. A one-line install script and Homebrew tap are on the roadmap but not yet shipped.
git clone https://github.com/pylonsync/pylon
cd pylon
cargo install --path crates/cli --locked
This compiles and places a pylon binary in ~/.cargo/bin/. Verify:
pylon --version
pylon doctor
pylon doctor checks that bun, node, and the supporting tooling are available.

Install Bun

Pylon uses Bun to run TypeScript server functions and to bundle the client code generator. If you don’t have it:
curl -fsSL https://bun.sh/install | bash

Client SDKs

Install into your web app:
bun add @pylonsync/sdk @pylonsync/react

Directory conventions

A Pylon app usually looks like this:
my-app/
  app.ts                 # schema + policies + manifest
  functions/             # server functions (*.ts)
  client/                # your React components
  web/                   # Vite app (or Next.js, etc.)
    package.json
    vite.config.ts
    src/main.tsx
  package.json
  pylon.manifest.json    # generated
  pylon.client.ts        # generated
pylon dev app.ts watches app.ts + functions/ and regenerates pylon.manifest.json + pylon.client.ts on every change.

Environment variables

VariableDefaultPurpose
PYLON_DB_PATH.pylon/dev.dbSQLite file location (ignored if DATABASE_URL is set)
DATABASE_URL(unset)postgres://... connection string. When set, Pylon uses the Postgres adapter instead of SQLite
PYLON_FILES_DIR.pylon/uploadsFile upload storage
PYLON_CORS_ORIGIN* (dev only)Allowed origin in prod
PYLON_DEV_MODEtrueDev-only behavior (generous rate limits, CORS *)
PYLON_PORT4321HTTP port
PYLON_RATE_LIMIT_MAX100Requests per window
PYLON_FN_RATE_LIMIT_MAX30Function calls per window
See Reference → CLI for the full list.