Skip to content

pubflow/pubflow-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 and backend projects quickly.

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 create
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 inspect
pubflow docs [topic]
pubflow hints [topic]

You can also use the short alias:

pbfl init
pbfl add env
pbfl inspect

pubflow init is the friendliest entry point. 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

Examples

pubflow init
pubflow create
pubflow create python-backend my-api
pubflow create rust-backend my-api
pubflow create react my-web
pubflow create react-native my-mobile-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 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
  • 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

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

Watchers

Forks

Packages

 
 
 

Contributors