Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pubflow CLI

Official Pubflow Platform CLI to create apps and manage projects.

Use the guided flow or direct commands to start frontend, backend, and Native projects quickly.

Install

Package: pubflow. Bins: pubflow and pbfl. Node 18.17+.

Global (pick the manager you use):

npm install -g pubflow
pnpm add -g pubflow
yarn global add pubflow
bun add -g pubflow

One-shot (no global install):

npx pubflow start
pnpm dlx pubflow start
yarn dlx pubflow start
bunx pubflow start

How Pubflow Apps Work

Pubflow apps are built around two simple pieces:

  • Flowless handles auth, sessions, users, login, registration, 2FA, and password reset.
  • Flowfull is your backend(s): routes, database, business logic, roles, permissions, and app data.

Frontend apps authenticate with Flowless and store the returned sessionId.

Authenticated requests to Flowfull send:

X-Session-ID: <sessionId>

Flowfull validates that session with Flowless through Bridge Validation:

POST {FLOWLESS_URL}/auth/bridge/validate
X-Session-ID: <sessionId>
X-Bridge-Secret: <BRIDGE_VALIDATION_SECRET>

Then Flowfull decides what the user can do.

That means frontend starters can use Flowless auth and Flowfull APIs together with the same session flow.

Commands

pubflow init
pubflow start
pubflow create
pubflow start <template> [name]
pubflow create <template> [name]
pubflow list
pubflow doctor
pubflow context init
pubflow context init --agents
pubflow context init --cursor
pubflow context init --copilot
pubflow context init --claude
pubflow context init --all
pubflow add context
pubflow add env
pubflow add client [client]
pubflow add middleware
pubflow add shadcn
pubflow inspect
pubflow docs [topic]
pubflow hints [topic]

You can also use the short alias:

pbfl init
pbfl start
pbfl add env
pbfl inspect

pubflow start is a full alias of pubflow create (same templates and flags). pubflow init, pubflow start, and pubflow create with no template all open the guided selector. Direct: pubflow start native my-app is the same as pubflow create native my-app.

pubflow init is the friendliest named entry for “new vs existing project”. It asks whether you are starting a new project or adding Pubflow to the current project.

For a new project, it opens the starter selector.

For an existing project, it lets you add:

AI context
Env vars
Flowfull client
Bridge middleware
Pages (Pubflow Native)
Native (Vite)
shadcn/ui (Native)

Examples

pubflow init
pubflow start
pubflow create
pubflow create python-backend my-api
pubflow start native my-app
pubflow create native my-app
pubflow create native-minimal my-app
pubflow create native-custom-hono my-app
pubflow context init
pubflow context init --full --all
pubflow add context
pubflow add env
pubflow add client react
pubflow add client rust
pubflow add middleware
pubflow add shadcn
pubflow inspect
pubflow docs bridge
pubflow hints clients

Env Vars

pubflow add env adapts env names to the detected project.

Frontend apps 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_SECRET

Backends get Bridge Validation env vars:

FLOWLESS_URL
BRIDGE_VALIDATION_SECRET
FLOWFULL_API_URL
PUBFLOW_VALIDATION_MODE

AI Context

Install compact Pubflow context for coding agents:

pubflow context init

Fast default:

pubflow context init --yes

This creates:

.pubflow/context/pubflow-context.md
AGENTS.md

For deeper project docs:

pubflow context init --full

For editor/agent references:

pubflow context init --agents
pubflow context init --cursor
pubflow context init --copilot
pubflow context init --claude
pubflow context init --all

Templates

Supported starter kits today:

Frontend starters:

  • react - install with bun install, run with bun run dev
  • next - install with npm install, run with npm run dev
  • react-native - install with npm install, run with npx expo start

Backend starters:

  • node-backend - install with npm install, run with npm run dev
  • python-backend - install with pip install -r requirements.txt, run with uvicorn app.main:app --reload --host 0.0.0.0 --port 3001
  • go-backend - install with go mod download, run with go run cmd/server/main.go
  • rust-backend - install with cargo fetch, run with cargo run
  • elixir-backend - install with mix deps.get, run with mix phx.server

Full-stack (Pubflow Native — one process, not apps/web + apps/api):

  • native - Default (starter/). install with bun install, run with bun run dev
  • native-minimal - examples/minimal. install with bun install, run with bun run dev
  • native-custom-hono - examples/custom-hono-server. install with bun install, run with bun run dev

Aliases: flowloft, flowstack, pubflow-nativenative. custom-hono, native-custom-hono-servernative-custom-hono.

Local Development

npm install
npm link
pubflow list

Or run without linking:

npm run pubflow -- list

More Docs

About

Official Pubflow Platform CLI to create apps and manage projects.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages