@lablm/infra
v0.1.0
Published
Standardized infrastructure toolkit, CI/CD templates, and developer workflow automation for LabLM
Maintainers
Readme
@lablm/infra
Standardized infrastructure toolkit, CI/CD templates, and developer workflow automation for the LabLM ecosystem.
⚡ Quick Start
Install as a development dependency:
pnpm add -D @lablm/infra
# or: npm i -D @lablm/infraInitialize Git hooks and developer workflow in your repository:
pnpm exec lablm-infra setup
# or: npx lablm-infra setupOr opt-in to install GitHub Actions workflows:
# For application monorepos / services (Continuous Integration)
npx lablm-infra setup --workflow=ci
# For standalone NPM packages (@lablm/contracts, @lablm/transport)
npx lablm-infra setup --workflow=npm🛠️ CLI Commands
| Command | Description |
| :--- | :--- |
| lablm-infra setup | Configures .husky/ hooks, permissions, and optional workflows |
| lablm-infra pre-commit | Runs sequential env scanning, validation, boundary checks, and lint-staged |
| lablm-infra commit-msg <file> | Validates Conventional Commits format with formatted error banner |
| lablm-infra pre-push | Prevents direct push to protected branches (main, prod) and runs linters |
| lablm-infra env scan | Scans source code for process.env references and appends them to .env.example |
| lablm-infra env check | Verifies that all local .env variables are documented in .env.example |
| lablm-infra check-boundaries | Guards against illegal internal imports across microservice directories |
| lablm-infra check-exports | Ensures shared packages strictly export compiled dist/ outputs |
🎛️ Configuration Presets
Conventional Commits (commitlint.config.js)
module.exports = {
extends: ['@lablm/infra/commitlint']
};📜 License
Apache-2.0 © NETLAB-41
