Appearance
Commands
Replora's server is run with Laravel's php artisan. This page lists every command Replora adds, with its options, what runs on a schedule, and the scripts of the source repository for building, checking and releasing.
Run artisan commands in the application folder, as the user the web server runs as (so files it creates stay writable), e.g. sudo -u www-data php artisan replora:health.
Installation and accounts
replora:install
Installs Replora from the command line (VPS, Docker, CI): checks the server, the purchase code (and downloads the modules it brings), writes .env, creates the tables and the first administrator. Asks for anything not given as an option; with --no-interaction every value must be passed. Refuses to run on an installed site.
| Option | What it does |
|---|---|
--url= | Site address, e.g. https://analytics.example.com, or http://127.0.0.1:8000 for php artisan serve. The license is attached to this domain. |
--db-host= | Database host (default 127.0.0.1). |
--db-port=, --db-database=, --db-username=, --db-password= | PostgreSQL connection. |
--admin-name=, --admin-email=, --admin-password= | The first administrator (password: 10+ characters). |
--mode= | single (self-hosted) or saas (sign-up, plans, billing; needs the saas/ folder). Change later with REPLORA_MODE. |
--purchase-code= | Your Replora purchase code. |
--skip-license | Go on without a code: only builds that allow it (REPLORA_LICENSE_REQUIRED=false, every module bundled). |
sh
php artisan replora:install --no-interaction \
--url=https://replora.example.com --mode=single --purchase-code=XXXX-XXXX \
--db-database=replora --db-username=replora --db-password=secret \
--admin-name="Ada Lovelace" [email protected] --admin-password='a-long-password'replora:admin
Creates an administrator with their own account (organization): the owner of a Single user installation, or the first operator of a SaaS installation. Asks for missing values unless --no-interaction.
| Option | What it does |
|---|---|
--name= | Full name |
--email= | Sign-in email |
--password= | Password (asked when missing) |
--organization= | Account name |
serve
php artisan serve behaves as usual on an installed site. While Replora isn't installed yet it never restarts itself when the installer writes .env (Laravel's restart would cut the installer's database step short); every request still reads .env afresh.
Updates and modules
| Command | Options | What it does |
|---|---|---|
replora:update | --check only looks for a new release · --yes installs without asking · --rollback puts the files of the previous version back | Checks the release feed and installs a new version: downloads the signed release, checks it, keeps the current files as a backup, then runs replora:upgrade in a fresh process. |
replora:upgrade | --no-maintenance keeps the site open while the update finishes | Finishes an update after new files are in place (uploaded by hand or installed by replora:update): new migrations, upgrade steps, fresh caches, restarted workers, behind the maintenance page. |
replora:core | --purchase-code= (default: the one saved at installation) · --force downloads and installs again even when the modules are current | Downloads and installs this version's modules (every module except Installer) with the purchase code: repairs a site whose module folders were deleted or not copied, or moves an installation to a new purchase code. |
Checks and maintenance
| Command | Options | What it does |
|---|---|---|
replora:doctor | --single-server only checks what a single-server installation needs | Checks the configuration for production and for several servers behind a load balancer: sessions, cache and rate limits not on one machine, recordings storage, ingest through a queue, WebSockets shared across servers, edition and module problems. Exits with 1 when something must be fixed, so a deploy pipeline can stop on it. |
replora:health | — | Runs the service checks (database, queue, email, website…) and emails the administrators when a check starts failing or recovers (once per change). Scheduled every five minutes. |
replora:recaptcha off | state: off | Switches reCAPTCHA off (keeps the keys), for when a wrong key keeps everyone from signing in. |
replora:geoip | — | Downloads the visitor-location databases that are switched on (MaxMind GeoLite2 City, DB-IP City Lite). Scheduled weekly. |
recordings:prune | — | Deletes recordings older than each site's retention (the site's choice capped by the plan; the public demo's after REPLORA_DEMO_RETENTION_DAYS): files first, then rows. Scheduled nightly. |
Scheduled commands
These run from Laravel's scheduler: add one cron line, * * * * * cd /path/to/replora && php artisan schedule:run >> /dev/null 2>&1. See Scheduler (cron).
| Command | When | Module | What it does |
|---|---|---|---|
| (heartbeat) | Every minute | Core | Notes that the scheduler runs (the "Scheduled tasks" check reads it) |
alerts:digest | Every minute | Alerts | Sends the matches an alert's quiet time held back, once it is over |
replora:health | Every 5 minutes | Core | Service checks, emails on changes |
tickets:remind | Every 5 minutes | Tickets (SaaS) | Reminds the support team of tickets about to miss their response time, alerts once one did |
summaries:digests | Hourly | Summaries | Writes the AI site summaries that are due |
tickets:auto-close | Hourly | Tickets (SaaS) | Closes answered tickets the customer didn't come back to |
replora:update --check | Twice a day | Core | Looks for a new release, so the dashboard can say one is waiting |
recordings:prune | Daily 03:00 | Recordings | Deletes expired recordings |
funnels:regressions | Daily 07:00 | Funnels | Emails account managers about funnel steps that convert worse than the week before (at most once a week per funnel) |
plans:trial-reminders | Daily 09:00 | Plans (SaaS) | Tells account managers their free trial ends soon (once per trial) |
replora:geoip | Tuesdays 04:00 | Recordings | Refreshes the location databases |
affiliates:payouts-due | 1st of the month 09:00 | Affiliates (SaaS) | Emails administrators the affiliates ready to be paid |
Each scheduled command runs without overlapping; the modules' commands run on one server only when several servers share a cache. All of them can also be run by hand.
Laravel commands you will use
| Command | When |
|---|---|
php artisan queue:work | The background worker that processes recordings, email, alerts and AI jobs. Keep it running with Supervisor or systemd. See Background worker. |
php artisan queue:work --queue=ingest | A worker for recording batches only, with RECORDINGS_INGEST_QUEUE=ingest. |
php artisan queue:restart | After an update or a .env change (the upgrade does it for you). |
php artisan schedule:run | Called by cron every minute. |
php artisan reverb:start | The WebSocket server, with REPLORA_REALTIME=websocket. |
php artisan migrate --force | New tables after adding a module by hand. |
php artisan config:cache, route:cache, optimize:clear | Cache configuration and routes; clear them after editing .env or modules. |
php artisan down / up | Laravel's maintenance mode (the dashboard has its own maintenance switch on the System page). |
Repository scripts (source)
At the repository root (see Building from source):
| Script | What it does |
|---|---|
pnpm build | Offline player, tracker (t.js), npm packages and the dashboard |
pnpm build:tracker | Only the tracker |
pnpm build:packages | Only @replora/browser and @replora/react |
pnpm dev | Vite dev server for the dashboard |
pnpm test | Vitest: UI kit, tracker, npm packages, dashboard logic |
pnpm test:coverage | The same with coverage; fails below 100 % |
pnpm typecheck | TypeScript checks |
pnpm i18n / pnpm i18n:write | Check translations / add missing keys and remove unused ones |
pnpm release | A signed release zip and update manifest (--edition=single|saas, --bundle, --url=, --notes=) |
pnpm release:keygen | Creates the release signing key |
pnpm release:core | Builds the signed module pack on its own |
pnpm release:core-keygen | Creates the module-pack signing key |
In apps/standalone:
| Script | What it does |
|---|---|
composer check | tools/check-imports.php, tools/check-docs.php, tools/check-modules.php, Pint, PHPUnit with coverage, tools/check-coverage.php (100 %) |
composer test | Clears the config cache and runs php artisan test |
composer setup | Installs dependencies, creates .env and the app key, migrates and builds |
The tools/ scripts can also run directly:
| Script | What it does |
|---|---|
node tools/release.mjs | Same as pnpm release |
node tools/release-core.mjs | Same as pnpm release:core |
node tools/release-keygen.mjs, node tools/core-keygen.mjs | The key generators |
node tools/check-i18n.mjs [--write] | The translation check |
node tools/i18n-pending.mjs export <dir> / import <dir> | Hand untranslated texts to translators and take them back |
node tools/i18n-reuse.mjs <other repo> | Fill empty translations from another product's catalogs |
node tools/offline-player.mjs | Builds the offline player for recording downloads |
php tools/check-modules.php (in apps/standalone) | Modules don't depend on each other; shared code never on saas/ |
php tools/check-imports.php, php tools/check-docs.php, php tools/check-coverage.php [clover.xml] [min %] | The other PHP checks |
