pipefarm
v0.0.3
Published
Invite-only CLI tunnels for Pipe Farm.
Readme
Pipe Farm
Pipe Farm is an invite-only CLI tunnel service. Users authenticate with the web app, create pipes from the CLI, and monitor active/history/traffic from the dashboard.
Beta User Flow
npm install -g pipefarm
pipefarm login
pipefarm 3000Hosted pipes are created only from the CLI. The CLI accepts local ports, not arbitrary remote URLs. The web dashboard shows active pipes, past pipes, and usage.
Runtime Environment
Production requires:
DATABASE_URL: Postgres connection string.BETTER_AUTH_SECRET: at least 32 characters.BETTER_AUTH_URL: public app URL, such ashttps://pipe.farm.PIPEFARM_ADMIN_EMAILS: comma-separated global admin emails.RESEND_API_KEY: Resend API key for verification, invite, access, and password reset emails.EMAIL_FROM: transactional sender, such asPipe Farm <[email protected]>.EMAIL_REPLY_TO: optional reply-to address.
Optional production tuning:
PIPEFARM_ADMIN_HOST: defaultadmin.${BASE_DOMAIN}.GRACEFUL_SHUTDOWN_MS: default25000.AUTH_RATE_LIMIT_PER_MINUTE: default30.CREATE_TUNNEL_LIMIT_PER_MINUTE: default20.AGENT_CONNECT_LIMIT_PER_MINUTE: default20.TUNNEL_REQUEST_LIMIT_PER_MINUTE: default600.USER_TUNNEL_REQUEST_LIMIT_PER_MINUTE: default1200.USER_DAILY_REQUEST_LIMIT: default100000.USER_DAILY_BYTES_LIMIT: default1073741824.MAX_ACTIVE_TUNNELS_PER_USER: default25.MAX_CONCURRENT_TUNNEL_REQUESTS: default100.MAX_CONCURRENT_TUNNEL_REQUESTS_PER_TUNNEL: default20.MAX_TUNNEL_RESPONSE_BYTES: default10485760.MAX_TUNNEL_HEADER_BYTES: default32768.MAX_TUNNEL_HEADER_COUNT: default80.TUNNEL_AUTH_FAIL_LIMIT_PER_MINUTE: default10.CLI_EXCHANGE_LIMIT_PER_MINUTE: default20.PIPEFARM_ALLOW_REMOTE_TARGETS: set to1only if remote proxy targets are intentionally allowed.
Local Development
npm install
npm run build
npm test
npm run devUse local mode when you do not want the CLI to talk to production:
PIPEFARM_MODE=local npm run devRun the bundled test app:
npm run test-appInvite-Only Beta Access
- A visitor requests access on
https://pipe.farm. - Pipe Farm sends a Resend verification email.
- The user verifies their email.
- The global admin reviews verified requests at
https://admin.pipe.farm. - Approval sends an invite email.
- The user can sign in and run
pipefarm login.
Health Checks
GET /healthz: process liveness.GET /readyz: readiness; fails while draining or when Postgres is unavailable.
Production Beta Checklist
- Supabase/Postgres configured and reachable from Coolify.
BETTER_AUTH_SECRET,BETTER_AUTH_URL,PIPEFARM_ADMIN_EMAILS, and Resend variables set in Coolify.- Resend domain has SPF, DKIM, bounce/MX, and one
_dmarcTXT record. pipe.farm,admin.pipe.farm, and wildcard pipe hosts route through the proxy.- Coolify health check uses
/readyz. npm run build,npm test, andnpm audit --omit=devpass before release.- The real CLI package is published to npm after smoke testing the production login and tunnel flow.
Publishing The CLI
The npm package name is pipefarm.
npm run build
npm test
npm audit --omit=dev
npm publish --access publicLocal Edge Utilities
The local edge scripts are for internal local development only:
npm run local-edge:install
npm run local-edge:status
npm run local-edge:uninstall