A collection of small utility scripts.
Run ./setup.sh to install Claude commands, skills, and npm dependencies.
Then configure credentials for each tool:
Copy .env.template to .env and fill in:
| Variable | Description |
|---|---|
GRAFANA_URL_DEV |
Dev Grafana base URL |
GRAFANA_URL_PROD |
Prod Grafana base URL |
GRAFANA_TOKEN_DEV |
Dev Grafana API token |
GRAFANA_TOKEN_PROD |
Prod Grafana API token |
Copy .env.template to .env and fill in:
| Variable | Description |
|---|---|
MONGO_URL_DEV |
Dev MongoDB connection string |
MONGO_URL_PROD |
Prod MongoDB connection string |
MONGO_URL_LOCAL |
Local MongoDB connection string (e.g. mongodb://localhost:27017) |
Copy .env.template to .env and fill in:
| Variable | Description |
|---|---|
COUCH_URL_DEV |
Dev CouchDB API base URL (no /_utils path) |
COUCH_URL_PROD |
Prod CouchDB API base URL |
COUCH_USER_DEV / COUCH_PASSWORD_DEV |
Dev basic-auth credentials |
COUCH_USER_PROD / COUCH_PASSWORD_PROD |
Prod basic-auth credentials |
Add service account JSON files to firebase/:
firebaseKey-dev.json— dev Firebase service accountfirebaseKey-prod.json— prod Firebase service account
Requires GitHub CLI installed and authenticated:
brew install gh && gh auth loginFirebase Admin SDK utilities for user management:
- phoneNumber.js — Look up users by phone number or list all users
- updateUser.js — Update user display name, email, or role
All scripts support --prod flag to target the production Firebase project. See firebase/README.md for detailed usage.
MongoDB utilities for querying and updating data:
- index.js — List available databases
- query.js — Run find queries against a collection
- update.js — Preview and apply MongoDB updates safely
- portal-user.js — Resolve a portal user's full permission chain (Users → PermissionUsers → PermissionAssignments → PermissionSets)
- sync-to-local.js — Copy collections from DEV or PROD (
--prod) to local MongoDB (drop & replace)
Read-only CouchDB utilities (sync-internal servers):
- index.js — List databases; connection module with basic auth and
--prod/--region <code>support - query.js — Fetch a doc by
_id, list docs by_idprefix (--prefix role_), run Mango_findselectors, or list docs via_all_docs
HRM version lookup utilities:
- hrmVersion.js — Fetch HRM frontend and backend versions for dev or prod, plus the Go module versions (
go-permission,go-permission-portal-enums,go-actionguard) from hrm-service git tags, and resolve the git branch each version was published from (via hrm-service publish workflow runs;--no-branchto skip)
Grafana connection utilities:
- connect.js — Test Grafana connectivity and query Grafana HTTP APIs
Android emulator utilities (requires adb, no credentials):
- fix-time.sh — Sync the emulator clock to real time via NTP force-refresh. Fixes the stale quickboot-snapshot clock that makes FeedMe POS refuse to boot with "This Device has incorrect time". Works on production images (no root needed), no emulator restart required.
- hrm-version — Look up HRM frontend, backend, and Go module versions for both dev and prod, including the source branch each version was published from (marked
(latest)when that commit is still the branch tip) - mongo — Query MongoDB databases and collections
- mongo-update — Update MongoDB documents with preview and confirmation; includes permission-aware workflow for portal users
- portal-user — Look up portal users with full permission resolution (Users → PermissionUsers → PermissionAssignments → PermissionSets)
- grafana — Connect to Grafana and query Grafana HTTP APIs
- mongo-sync — Copy MongoDB collections from dev or prod to local with confirmation workflow
- couchdb — Query CouchDB (read-only): list databases or fetch documents
- emulator-time — Sync the Android emulator clock to real time (fixes stale quickboot-snapshot clock that blocks POS boot)
- firebase — Firebase user management helpers for user lookup and updates
- mongo-sync — Copy and dump MongoDB collections from prod/dev to local
- dedup-portal-user — Option A fix for duplicate
companyDB.Usersdocs caused by Firebase phone re-linking (back up → migrate PermissionUsers → clear stale phoneNumber → verify)
- Custom
.claudeskills and commands should be reflected in bothREADME.mdandCLAUDE.mdonce the user confirms the change is wanted.
MIT