@bimsystems/core
v0.0.13
Published
Core utilities for BIMSystems
Downloads
21
Readme
@bimsystems/core
Core CLI & utilities for BIMSystems
This package provides the foundational CLI and utilities for initializing and configuring BIMSystems modules (e.g., inventory, ERP, etc.).
Features
- Interactive CLI (
bim) to bootstrap your inventory project - Database selection prompt (BimDB, SQLite)
- Generates
.env.localentries andbimsystems.config.json
Installation
# Install locally as dev dependency
npm install --save-dev @bimsystems/core
# Or install globally for system-wide CLI
npm install -g @bimsystems/coreUsage
via npx (local install)
npx bimvia global install or npm script
# if installed globally:
bim
# or add to package.json:
# "scripts": { "bims": "bim" }
npm run bimsCLI Walkthrough
Select database
- BIM Database: our hosted Supabase instance
- SQLite (local file): zero-configuration local file (default)
Fill in credentials (if needed)
- Prompts will collect URL, keys, or connection string
Configuration files
- Appends env variables to
.env.local - Writes a
bimsystems.config.jsonwith your selection
- Appends env variables to
Apply migrations
- Run your migration command (e.g.,
npm run bim:migrateorsupabase db push)
- Run your migration command (e.g.,
Example
# initialize config
npx bimsystems
# sample output:
# ? Which database? (Use arrow keys)
# BIM Database
# › SQLite (local file)
# ✔ Will use SQLite at ./bim.db
# 🎉 Configuration saved to bimsystems.config.json
# now run migrations
npm run bim:migrateContributing
BIMSystems is open source! Feel free to file issues or submit PRs to improve the CLI or add new modules.
License
MIT © BIMSystems
