Skip to main content

CLI tool for streamlined Frappe/ERPNext site setup with PostgreSQL and bundled binaries support

Project description

Realtimex Frappe

A CLI tool to set up Frappe/ERPNext sites with PostgreSQL, external Redis, and bundled binaries.

Platforms: macOS, Linux


🚀 Quick Setup for RealTimeX Local App

[!IMPORTANT] Follow this section to run Frappe inside the RealTimeX Local App environment.

Step 1: Install Prerequisites

Prerequisite Check Command macOS Install
Git git --version xcode-select --install
Node.js 18+ node --version brew install node@18 or bundled
pkg-config which pkg-config xcode-select --install
wkhtmltopdf wkhtmltopdf --version brew install wkhtmltopdf
Redis redis-cli ping brew install redis && brew services start redis

[!TIP] Using a remote database? Skip PostgreSQL installation and configure REALTIMEX_DB_HOST to point to your remote server (e.g., Supabase).

For local PostgreSQL:

brew install postgresql@15 && brew services start postgresql@15

Step 2: Configure RealTimeX App

Add this to your RealTimeX Local App configuration:

{
  "command": "uvx",
  "args": ["realtimex-frappe", "run"],
  "env": {
    "REALTIMEX_SITE_NAME": "mysite.localhost",
    "REALTIMEX_ADMIN_PASSWORD": "admin",
    "REALTIMEX_DB_NAME": "frappe_mysite",
    "REALTIMEX_DB_USER": "postgres",
    "REALTIMEX_DB_PASSWORD": "postgres"
  },
  "working_dir": "",
  "port": 8000
}

For remote database (e.g., Supabase):

{
  "command": "uvx",
  "args": ["realtimex-frappe", "run"],
  "env": {
    "REALTIMEX_SITE_NAME": "mysite.localhost",
    "REALTIMEX_ADMIN_PASSWORD": "admin",
    "REALTIMEX_DB_NAME": "frappe_prod",
    "REALTIMEX_DB_USER": "postgres.xxxx",
    "REALTIMEX_DB_PASSWORD": "your-password",
    "REALTIMEX_DB_HOST": "db.xxxx.supabase.co",
    "REALTIMEX_DB_PORT": "5432"
  },
  "working_dir": "",
  "port": 8000
}

Step 3: Run

Option A: Via RealTimeX App

Simply start the app through the RealTimeX interface. The JSON configuration above handles all environment variables automatically.

Option B: Direct Command Line

Set environment variables and run manually:

export REALTIMEX_SITE_NAME=mysite.localhost
export REALTIMEX_ADMIN_PASSWORD=admin
export REALTIMEX_DB_NAME=frappe_mysite
export REALTIMEX_DB_USER=postgres
export REALTIMEX_DB_PASSWORD=postgres

# For remote database, also set:
# export REALTIMEX_DB_HOST=db.xxxx.supabase.co

uvx realtimex-frappe run

Result: Your site will be available at http://mysite.localhost:8000


Environment Variables

Variable Required Default Description
REALTIMEX_SITE_NAME - Site name (e.g., mysite.localhost)
REALTIMEX_ADMIN_PASSWORD - Admin password
REALTIMEX_DB_NAME - Database name
REALTIMEX_DB_USER - PostgreSQL username (root credentials)
REALTIMEX_DB_PASSWORD - PostgreSQL password
REALTIMEX_NODE_BIN_DIR ⚠️ - Path to Node.js bin directory
REALTIMEX_DB_HOST - localhost PostgreSQL host
REALTIMEX_DB_PORT - 5432 PostgreSQL port
REALTIMEX_REDIS_HOST - 127.0.0.1 Redis host
REALTIMEX_BENCH_PATH - ~/.realtimex.ai/storage/local-apps/frappe-bench Bench installation path

Run realtimex-frappe env-help for the complete list.


⚠️ Database Configuration

[!CAUTION] REALTIMEX_DB_NAME controls which database Frappe will CREATE. Use unique, dedicated names.

# ✅ Good: Unique database name
REALTIMEX_DB_NAME="frappe_mysite_001"

# ❌ Bad: Generic or shared names
REALTIMEX_DB_NAME="postgres"

Notes:

  • REALTIMEX_DB_USER and REALTIMEX_DB_PASSWORD are used as root credentials to create the database
  • For remote databases, ensure the user has CREATE DATABASE privileges

Storage Location

Bench data is stored persistently at:

~/.realtimex.ai/storage/local-apps/frappe-bench/

This location persists across restarts and is independent of the working directory.


Linux Setup

# System dependencies
sudo apt update && sudo apt install git pkg-config curl

# Redis
sudo apt install redis-server && sudo systemctl enable --now redis-server

# PostgreSQL (skip if using remote database)
sudo apt install postgresql postgresql-contrib && sudo systemctl enable --now postgresql

# wkhtmltopdf
sudo apt install xvfb libfontconfig
# Download from https://wkhtmltopdf.org/downloads.html
sudo dpkg -i wkhtmltox_*.deb

# Node.js 18+
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install nodejs

Commands

Command Description
run Setup and start (production)
env-help Show environment variables
validate Check prerequisites

Requirements

  • Python 3.11+
  • Node.js 18+
  • Redis 6+
  • PostgreSQL 13+ (local or remote)
  • Git, pkg-config, wkhtmltopdf

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

realtimex_frappe-0.1.0.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

realtimex_frappe-0.1.0-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file realtimex_frappe-0.1.0.tar.gz.

File metadata

  • Download URL: realtimex_frappe-0.1.0.tar.gz
  • Upload date:
  • Size: 44.5 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

Hashes for realtimex_frappe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc96b58c73ec28f3ecd8009b71b22717e8b0fb56feb7bcf681210c0ca2d40e54
MD5 bdf579f7adb7e229638c34bbe14abb04
BLAKE2b-256 36dfaf3829237531b887c8c34ae96381aafb4692c145939e50fb88af21fa0391

See more details on using hashes here.

File details

Details for the file realtimex_frappe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: realtimex_frappe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.5 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

Hashes for realtimex_frappe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e968995faa45138a21e9391786eadcde206ab1360353d78b1e316b538ac19754
MD5 f44ca191658b73168168d91218ce016f
BLAKE2b-256 1960bf7f1e99ce3bd130c308e1f8dba74fcea8ed5c7e466d9a2a0aae8b54e6f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page