The Pubflow CLI helps you create apps, add project context, configure env vars, inspect setup, and jump into docs.
You can use either binary:
pubflow init
pbfl initGuided flow:
pubflow initpubflow init asks whether you want a new project or want to add Pubflow to the current project.
For a new project, it opens the starter selector.
For an existing project, it opens an add selector for context, env, client, and middleware.
Project-only guided flow:
pubflow createDirect flow:
pubflow create react my-web
pubflow create react-native my-mobile
pubflow create node-backend my-api
pubflow create python-backend my-api
pubflow create go-backend my-api
pubflow create rust-backend my-api
pubflow create elixir-backend my-apiSkip setup steps:
pubflow create python-backend my-api --no-install --no-gitpubflow listShows supported frontend and backend starter kits.
Recommended default:
pubflow context initNo-prompt default:
pubflow context init --yesFull context folder:
pubflow context init --fullReference specific agent files:
pubflow context init --agents
pubflow context init --cursor
pubflow context init --copilot
pubflow context init --claude
pubflow context init --allpubflow add envAdds Pubflow env vars to .env.example and can optionally update .env.
Frontend projects get public-safe env vars:
Vite / React: VITE_FLOWLESS_URL, VITE_FLOWFULL_API_URL, VITE_BRIDGE_VALIDATION_SECRET
Expo: EXPO_PUBLIC_FLOWLESS_URL, EXPO_PUBLIC_FLOWFULL_API_URL, EXPO_PUBLIC_BRIDGE_VALIDATION_SECRET
Next.js: NEXT_PUBLIC_FLOWLESS_URL, NEXT_PUBLIC_FLOWFULL_API_URL, NEXT_PUBLIC_BRIDGE_VALIDATION_SECRETBackend projects get Bridge Validation env vars:
FLOWLESS_URL=https://your-flowless-instance.com
BRIDGE_VALIDATION_SECRET=replace-me
FLOWFULL_API_URL=http://localhost:3001
PUBFLOW_VALIDATION_MODE=standardBridge validation uses:
POST {FLOWLESS_URL}/auth/bridge/validate
X-Session-ID: <user-session-id>
X-Bridge-Secret: <BRIDGE_VALIDATION_SECRET>X-Session-ID carries the user's opaque session. BRIDGE_VALIDATION_SECRET is sent as the required X-Bridge-Secret header. Prefer sending it from Flowfull/backend; frontend/mobile usage should only be used when the project intentionally supports a public/client-side bridge validation design.
Interactive:
pubflow add clientDirect:
pubflow add client react
pubflow add client react-native
pubflow add client universal-js
pubflow add client python
pubflow add client go
pubflow add client rust
pubflow add client elixirThe CLI detects the project and recommends the best client. JavaScript installs use @latest and adapt to npm, bun, pnpm, or yarn when detected. Rust installs use cargo add flowfull.
pubflow add middlewareAdds Bridge Validation middleware for supported backend projects:
- Node / TypeScript
- Python / FastAPI
- Go / Gin
- Rust / Axum
- Elixir / Phoenix
Generated middleware uses a bridge namespace first and falls back to pubflow if needed.
Rust middleware is generated for Axum and may require:
cargo add axum chrono reqwest serde serde_json thiserror towerFlowless is created from Pubflow Platform and provides managed auth.
Frontend flow:
- Call Flowless, for example
POST /auth/login. - Store the returned
sessionIdin local/secure storage. - Send the session to Flowfull APIs, usually as
X-Session-ID.
Flowfull backend flow:
- Middleware reads session from
X-Session-ID, cookie, or an app-selected source. - Middleware calls
POST {FLOWLESS_URL}/auth/bridge/validate. - Middleware sends
X-Bridge-Secret. - Route handlers use normalized auth context.
Recommended middleware:
optionalAuth()
requireAuth()
requireUserType() / require_roles()
requirePermission()
requireAdmin() / require_admin()pubflow inspectChecks for:
.pubflow/context- agent/editor references
.env.exampleFLOWLESS_URL- bridge validation secret
- project manifests
- detected stack
pubflow docs
pubflow docs bridge
pubflow docs context
pubflow docs starters
pubflow docs flowfull
pubflow docs flowless
pubflow docs clientsOpen the first docs link:
pubflow docs bridge --openShow friendly next-step hints:
pubflow hints
pubflow hints clients
pubflow hints middleware
pubflow hints env
pubflow hints contextThese hints are also shown at the end of pubflow add client and pubflow add middleware.
pubflow doctorChecks common local tools: Node.js, npm, Bun, git, Python, Go, Cargo, rustc, and Elixir Mix.