@zabaca/zbc 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/init.ts +8 -0
- package/templates/CLAUDE.md +23 -0
- package/templates/claude/settings.json +11 -0
package/package.json
CHANGED
package/src/commands/init.ts
CHANGED
|
@@ -111,6 +111,14 @@ export const initCommand = defineCommand({
|
|
|
111
111
|
console.warn(` warn: unknown --ci=${args.ci} (only "github" supported)`)
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
// 7. Claude Code scaffolding (greenfield only — don't touch existing setups)
|
|
115
|
+
if (mode.kind === 'greenfield') {
|
|
116
|
+
await copyTemplateFile(path.join(tplRoot, 'CLAUDE.md'), path.join(cwd, 'CLAUDE.md'), {
|
|
117
|
+
vars,
|
|
118
|
+
})
|
|
119
|
+
await copyTemplateDir(path.join(tplRoot, 'claude'), path.join(cwd, '.claude'))
|
|
120
|
+
}
|
|
121
|
+
|
|
114
122
|
console.log('')
|
|
115
123
|
console.log('✓ init done')
|
|
116
124
|
console.log('')
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
This project uses [zbc](https://github.com/Zabaca/zbc) for infrastructure scaffolding.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
|
|
7
|
+
- `packages/infra/` — infrastructure code (zbc modules)
|
|
8
|
+
- `packages/infra/environments/` — per-environment config (`production`, `preview`)
|
|
9
|
+
- `packages/infra/modules/` — vendored infra modules (do not edit by hand)
|
|
10
|
+
- `zbc.config.ts` — project-level zbc config
|
|
11
|
+
- `.sops.yaml` — SOPS encryption rules for secrets
|
|
12
|
+
|
|
13
|
+
## Common commands
|
|
14
|
+
|
|
15
|
+
- `bun install` — install dependencies
|
|
16
|
+
- `bunx @zabaca/zbc add <module>` — vendor an infra module (`turso`, `vercel`, `nats-server`)
|
|
17
|
+
- `bunx @zabaca/zbc apply <env>` — apply infrastructure for an environment
|
|
18
|
+
- `bunx @zabaca/zbc destroy <env>` — tear down an ephemeral environment
|
|
19
|
+
|
|
20
|
+
## Conventions
|
|
21
|
+
|
|
22
|
+
- `packages/infra/modules/*` is vendored from `@zabaca/zbc`. Re-vendor with `zbc add` rather than editing in place.
|
|
23
|
+
- Secrets are SOPS-encrypted under `packages/infra/environments/<env>/`. Decrypt only when needed; never commit plaintext.
|