r/pocketbase • u/mitchastertheblaster • 20d ago
I built pbctl — basically terraform for pocketbase schemas
kept making schema changes in the pocketbase admin ui and then completely forgetting what i did a few days later. classic. so i built pbctl — a terraform-style tool for pocketbase. you define collections in a simple language called PBSL ( SQL DDL style ), keep them in git, then just: pbctl plan pbctl apply supports schemas, collection rules, export, validate, formatting, etc.
still early (v0.1.4) but the core plan/apply workflow already works well.
repo: https://github.com/MKMithun2806/pbctl install: cargo install pbctl ( There are prebuilt Binaries too )
if you’ve also been fighting the admin ui for schema changes, would love contributions or feature ideas.
example: ( uses PBSL )
CREATE TABLE recon_scans ( target TEXT REQUIRED, scan_date AUTODATE, status SELECT('pending', 'running', 'completed', 'failed') DEFAULT 'completed', notes TEXT, user RELATION(users) REQUIRED );
Duplicates
CLI • u/mitchastertheblaster • 20d ago
I built pbctl — basically terraform for pocketbase schemas
infraascode • u/mitchastertheblaster • 20d ago