Operate
Artisan commands
Pitchbar ships a handful of php artisan commands beyond
the standard Laravel surface — they handle queue ticks, vector
rebuilds, source freshness, demo seeding, and a few admin
convenience wrappers. Run any of them with --help to
see options.
Operational
| Command | What it does |
|---|---|
php artisan pitchbar:queue-tick |
Process a bounded batch of queued jobs and exit. Designed
for external-cron-driven processing on shared hosting
(Cloudflare Worker → POST /api/v1/internal/queue-tick
→ this command). See
Deployment for
the full external-cron setup.
Flags: --queues=analytics,default,integrations,index,crawl,
--max-jobs=20, --max-time=55.
|
php artisan documents:purge-superseded |
One-off cleanup for knowledge bases built before the
supersede fix. A re-crawl whose content had changed
used to create a new document and leave the previous one
behind, with its chunks still embedded — so an agent
accumulated a stale copy of every page it re-crawled, and
those old chunks kept competing in retrieval (a re-crawled
product page could still answer from the older copy). New
crawls retire the superseded version themselves; this clears
what already piled up. Keeps the newest document per
source + URL and deletes the rest along with their vectors.
Flags: --agent={uuid} to restrict to one agent,
--dry-run to report without deleting.
|
php artisan vector:setup |
Idempotently create the vector index/collection — Vectorize
on Cloudflare, or Qdrant. Run once on a fresh install
before the first crawl. Safe to re-run; it short-circuits
when the index already exists. The legacy
qdrant:setup alias still works.
|
php artisan vector:rebuild-index |
Recovery flow for embedding-model changes. Drops the
Vectorize index, deletes every local Chunk, resets every
Source to pending, recreates the index at
the dim that matches the currently-configured embedding
model, and re-dispatches IndexDocumentJob
for every Document with persisted text. Use this after
switching CLOUDFLARE_EMBED_MODEL between
models of different dimensions (e.g. bge-base 768 →
bge-m3 1024). Flags: --force to skip the
confirmation prompt, --dim=N to override
the resolved dim. See
Knowledge for the
full model→dim map.
|
php artisan pitchbar:audit-vectors |
Compare DB chunks against the vector index and report drift (chunks present in DB but missing in the index, and vice versa). Read-only. Useful after a Vectorize re-provision or when investigating "the bot doesn't know about page X." |
php artisan pitchbar:refresh-stale-sources |
Re-crawl sources whose content is older than N days (default 7). Schedule this nightly via your external cron if you want auto-refresh; without it, sources only re-sync when the operator clicks Refresh. |
php artisan pitchbar:resolve-stale-events |
Close Widget Monitor events old enough to be history, so
real incidents stand out. --dry-run shows
what would close; --days=N sets the cutoff
(default 2). Recent events are never touched — they may
still be live. See
Widget Monitor.
|
php artisan attribution:report |
Per-agent revenue-attribution report:
--agent=<uuid> --days=30. Prints
direct / influenced / unmatched / reversed totals
(the two tiers are never summed) plus one evidence
line per direct match — the hand-audit surface for
the silent collection phase. See
Revenue attribution.
|
php artisan pitchbar:sync-oauth-sources |
Re-ingest Notion / Google Doc sources whose content
might be stale. Same idea as
refresh-stale-sources but only walks
OAuth-backed integrations (where the file may have
changed inside Notion / Drive without a webhook).
|
php artisan pitchbar:suggest-from-gaps |
Walk recurring unanswered questions (logged by
DetectGapJob) and draft
CuratedAnswer suggestions. Generates an
admin notification; the curated answer is created as a
draft, never published.
|
Admin convenience
| Command | What it does |
|---|---|
php artisan pitchbar:make-admin {email} |
Promote an existing user to super_admin.
Pass --demote to flip them back to
customer. Use this for your very first super_admin
after signup — there's no UI for the role bump.
|
php artisan pitchbar:build-wp-plugin |
Package wp-plugin/pitchbar/ into an
install-ready zip for distribution. Compiles every
.po language file to .mo
automatically before zipping.
|
php artisan pitchbar:seed-demo-agent |
Create or refresh the demo agent used by the marketing
site widget. Only meaningful on installs with
DEMO=true (the public pitchbar.io demo).
Idempotent.
|
php artisan pitchbar:seed-local-test |
Create a published "Local Test" agent + script snippet for embedding on a sibling project during dev. Useful when you're building the widget locally and want a consistent agent across restarts. |
php artisan docs:migrate-blade |
One-shot bulk-import of every shipped Blade documentation
partial under resources/views/documentation/pages/
into the doc_pages table.
Flags: --dry-run previews what would change,
--publish marks imported rows as published,
--force overwrites existing rows (use with
care — clobbers operator edits). Idempotent on slug. See
Migrating Blade
docs into the database for the full guide.
|
Internal board (Kanban)
The internal admin board at /admin/board is backed by
these commands. See Admin board
for the full workflow. Quick reference:
php artisan board:add "Title" --body="..." --label=...— append a card to the backlog.php artisan board:start <id-or-title>— move a card to In Progress.php artisan board:done <id-or-title> --test="..." --release="v2.0.0"— close the card with a UI test plan and stamp the release version.php artisan board:stamp-version vX.Y.Z --status=done— backfill release version on all freshly-Done cards.php artisan board:seed— seed the initial backlog (idempotent).
Changelog
See Changelog for the public release-notes page. The maintainer-side commands:
php artisan changelog:add— append a new entry interactively. Writes a newdatabase/changelog-entries/v{version}.mdfile; the running site reads those Markdown files directly viaChangelogStore(no DB table — the originalchangelog_entriestable was dropped in2026_05_09_120539in favour of the file-based store).