CLI tool for streamlined Frappe/ERPNext site setup with PostgreSQL and bundled binaries support
Project description
Realtimex Frappe
Run Frappe/ERPNext with PostgreSQL, schema-based isolation, and external Redis.
Quick Start
You have a PostgreSQL database ready. Here's what to do:
Step 1: Admin Setup (Once)
Run this once on any machine to initialize the database and install apps:
RealTimeX Local App JSON:
{
"command": "uvx",
"args": ["realtimex-frappe", "setup"],
"env": {
"REALTIMEX_MODE": "admin",
"REALTIMEX_SITE_NAME": "mysite.localhost",
"REALTIMEX_SITE_PASSWORD": "admin",
"REALTIMEX_DB_HOST": "db.xxxx.supabase.co",
"REALTIMEX_DB_PORT": "5432",
"REALTIMEX_DB_NAME": "postgres",
"REALTIMEX_DB_SCHEMA": "mysite_schema",
"REALTIMEX_DB_USER": "mysite_schema",
"REALTIMEX_DB_PASSWORD": "your_site_password",
"REALTIMEX_ADMIN_DB_USER": "postgres",
"REALTIMEX_ADMIN_DB_PASSWORD": "your_admin_password"
},
"port": 8000
}
Or via command line:
export REALTIMEX_MODE=admin
export REALTIMEX_SITE_NAME=mysite.localhost
export REALTIMEX_SITE_PASSWORD=admin
export REALTIMEX_DB_HOST=db.xxxx.supabase.co
export REALTIMEX_DB_PORT=5432
export REALTIMEX_DB_NAME=postgres
export REALTIMEX_DB_SCHEMA=mysite_schema
export REALTIMEX_DB_USER=mysite_schema
export REALTIMEX_DB_PASSWORD=your_site_password
export REALTIMEX_ADMIN_DB_USER=postgres
export REALTIMEX_ADMIN_DB_PASSWORD=your_admin_password
realtimex-frappe setup
What happens:
- Creates the schema
mysite_schemain your PostgreSQL database - Creates a database user
mysite_schema(same name as schema) - Installs Frappe and ERPNext
- Outputs credentials to share with your team
Step 2: User Mode (Run Anywhere)
Use the credentials output from admin setup to run on any machine:
RealTimeX Local App JSON (use values from admin setup output):
{
"command": "uvx",
"args": ["realtimex-frappe", "run"],
"env": {
"REALTIMEX_MODE": "user",
"REALTIMEX_SITE_NAME": "mysite.localhost",
"REALTIMEX_DB_HOST": "db.xxxx.supabase.co",
"REALTIMEX_DB_PORT": "5432",
"REALTIMEX_DB_NAME": "postgres",
"REALTIMEX_DB_SCHEMA": "mysite_schema",
"REALTIMEX_DB_USER": "mysite_schema",
"REALTIMEX_DB_PASSWORD": "your_site_password"
},
"port": 8000
}
Or via command line (use values from admin setup output):
export REALTIMEX_MODE=user
export REALTIMEX_SITE_NAME=mysite.localhost
export REALTIMEX_DB_HOST=db.xxxx.supabase.co
export REALTIMEX_DB_PORT=5432
export REALTIMEX_DB_NAME=postgres
export REALTIMEX_DB_SCHEMA=mysite_schema
export REALTIMEX_DB_USER=mysite_schema
export REALTIMEX_DB_PASSWORD=your_site_password
realtimex-frappe run
What happens:
- Downloads apps locally (if not already present)
- Creates local site configuration pointing to remote database
- Starts the Frappe server
Result: Your site is available at http://mysite.localhost:8000
Understanding the Two Modes
| Admin Mode | User Mode | |
|---|---|---|
| Purpose | Initialize database and install apps | Run the server |
| Command | realtimex-frappe setup |
realtimex-frappe run |
| When | Once, by the project admin | Anytime, by any team member |
| Requires | Admin database credentials | Shared credentials from admin |
| Creates | Schema, tables, initial data | Local config only |
Workflow:
- Admin runs
setuponce → creates database schema and installs apps - Admin shares the output credentials with team
- Team members copy those credentials and run
run
Environment Variables
Required for Both Modes
| Variable | Description |
|---|---|
REALTIMEX_MODE |
admin or user |
REALTIMEX_SITE_NAME |
Site name (e.g., mysite.localhost) |
REALTIMEX_DB_HOST |
PostgreSQL host |
REALTIMEX_DB_PORT |
PostgreSQL port (default: 5432) |
REALTIMEX_DB_NAME |
Database name (e.g., postgres for Supabase) |
REALTIMEX_DB_SCHEMA |
Schema name (e.g., mysite_schema) |
REALTIMEX_DB_USER |
Site database user (created by admin setup) |
REALTIMEX_DB_PASSWORD |
Site database password |
Required for Admin Mode Only
| Variable | Description |
|---|---|
REALTIMEX_SITE_PASSWORD |
Frappe administrator password |
REALTIMEX_ADMIN_DB_USER |
Root database user (e.g., postgres) |
REALTIMEX_ADMIN_DB_PASSWORD |
Root database password |
Optional
| Variable | Default | Description |
|---|---|---|
REALTIMEX_PORT |
8000 |
Webserver port |
REALTIMEX_REDIS_HOST |
127.0.0.1 |
Redis host |
REALTIMEX_REDIS_CACHE_PORT |
13001 |
Redis cache port |
REALTIMEX_REDIS_QUEUE_PORT |
11001 |
Redis queue port |
REALTIMEX_BENCH_PATH |
~/.realtimex.ai/storage/local-apps/frappe-bench |
Installation path |
REALTIMEX_FORCE_REINSTALL |
false |
Delete and reinstall (for recovery) |
Run realtimex-frappe env-help for the complete list.
Commands
| Command | Description |
|---|---|
setup |
Admin mode: create database, install apps, output credentials |
run |
User mode: start the server (auto-setup local config if needed) |
env-help |
Show all environment variables |
validate |
Check if prerequisites are installed |
Prerequisites
macOS
| Prerequisite | Check | Install |
|---|---|---|
| Git | git --version |
brew install git |
| Node.js 18+ | node --version |
brew install node@18 |
| npm | npm --version |
(included with Node.js) |
| pkg-config | which pkg-config |
brew install pkg-config |
| Redis | which redis-server |
brew install redis && brew services start redis |
wkhtmltopdf (macOS):
curl -L https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-2/wkhtmltox-0.12.6-2.macos-cocoa.pkg -O
sudo installer -pkg wkhtmltox-0.12.6-2.macos-cocoa.pkg -target /
Linux
# System dependencies
sudo apt update && sudo apt install git pkg-config curl
# Redis
sudo apt install redis-server && sudo systemctl enable --now redis-server
# Node.js 18+
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install nodejs
# wkhtmltopdf and dependencies
sudo apt install xvfb libfontconfig wkhtmltopdf
Storage
All data is stored at:
~/.realtimex.ai/storage/local-apps/frappe-bench/
This persists across restarts and is independent of your working directory.
Security Model
Schema-based isolation provides security boundaries:
| What the site user CAN do | What the site user CANNOT do |
|---|---|
| All operations within their schema | Access other schemas |
| CREATE/ALTER/DROP tables in schema | DROP the schema itself |
| Run migrations, install apps | Create new schemas |
The admin user (postgres) owns the schema; the site user operates within it.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file realtimex_frappe-0.5.0.tar.gz.
File metadata
- Download URL: realtimex_frappe-0.5.0.tar.gz
- Upload date:
- Size: 69.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb2b627707b2cb2019022f6fe46ccf185f5d9f71142b43a05a15bc942c756c3c
|
|
| MD5 |
0e94facac0ffa5237b186dedf47f0650
|
|
| BLAKE2b-256 |
cb7605e42b687f62c22554265b836a3a09f7ca5e7f9d40d4098927e6fe99b1d8
|
File details
Details for the file realtimex_frappe-0.5.0-py3-none-any.whl.
File metadata
- Download URL: realtimex_frappe-0.5.0-py3-none-any.whl
- Upload date:
- Size: 30.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e6052a4b2133fb7c27b4fe50a53ce102cff697c60b18bed91200ab85997e9c9
|
|
| MD5 |
0b98565482cf7ca7e74dce7ba501ef8a
|
|
| BLAKE2b-256 |
9d9f112b4471c5a6b557b2ad99bad45bfe6d646f277a3bac71e4e945963695d3
|