@codemarc/blt 1.4.6 → 1.4.8
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/README.md +182 -5
- package/dist/blt +4 -0
- package/dist/blt.d.ts.map +1 -1
- package/dist/blt.js.map +1 -1
- package/dist/commands/init/config-templates.d.ts +18 -0
- package/dist/commands/init/config-templates.d.ts.map +1 -0
- package/dist/commands/init/config-templates.js +74 -0
- package/dist/commands/init/config-templates.js.map +1 -0
- package/dist/commands/init/config.d.ts +9 -0
- package/dist/commands/init/config.d.ts.map +1 -0
- package/dist/commands/init/config.js +92 -0
- package/dist/commands/init/config.js.map +1 -0
- package/dist/commands/pdf.js +1 -1
- package/dist/commands/show/info.d.ts +7 -0
- package/dist/commands/show/info.d.ts.map +1 -0
- package/dist/commands/show/info.js +52 -0
- package/dist/commands/show/info.js.map +1 -0
- package/dist/commands/wai/config-templates.d.ts +18 -0
- package/dist/commands/wai/config-templates.d.ts.map +1 -0
- package/dist/commands/wai/config-templates.js +136 -0
- package/dist/commands/wai/config-templates.js.map +1 -0
- package/dist/commands/wai/config.d.ts +9 -0
- package/dist/commands/wai/config.d.ts.map +1 -0
- package/dist/commands/wai/config.js +144 -0
- package/dist/commands/wai/config.js.map +1 -0
- package/dist/commands/wai.d.ts +7 -0
- package/dist/commands/wai.d.ts.map +1 -0
- package/dist/commands/wai.js +208 -0
- package/dist/commands/wai.js.map +1 -0
- package/dist/commands/workflow.d.ts +6 -0
- package/dist/commands/workflow.d.ts.map +1 -0
- package/dist/commands/workflow.js +291 -0
- package/dist/commands/workflow.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
# @codemarc/blt
|
|
2
2
|
|
|
3
3
|
> BLT CLI — Command-line tools for image processing, PDF manipulation, storage, schema/data build and deploy, and version management.
|
|
4
|
+
>
|
|
5
|
+
> Part of the [bltcore-com/tools](https://github.com/bltcore-com/tools) repository (BLT Core tools monorepo).
|
|
4
6
|
|
|
5
7
|
## Features
|
|
6
8
|
|
|
7
9
|
- **Image**: WebP conversion, sharpening, color manipulation, and enhancement
|
|
8
10
|
- **PDF**: Combine PDFs (binder), create folios with page numbers and table of contents
|
|
9
11
|
- **Version**: Update and manage `version.json`, format version strings, generate version SQL
|
|
12
|
+
- **Init**: Clone repo script for BLT repositories
|
|
13
|
+
- **WAI**: AI config templates (Claude + Codex: AGENTS.md, skills, rules, commands, settings, MCP, PLAN, IMPLEMENT) — bltwai.com
|
|
10
14
|
- **Build**: Build schema from DDL files, build data from instance directory
|
|
11
15
|
- **Deploy**: Deploy schema/data from SQL files, run a single SQL file
|
|
12
16
|
- **Bucket**: Supabase storage — list buckets, list/upload/download files, get URLs
|
|
17
|
+
- **Workflow**: List, show, delete, reload, and deploy GitHub Actions workflows (requires `gh`)
|
|
13
18
|
- **Show**: Schema info, row counts, env vars, DB version, repo list
|
|
14
19
|
- **Cleanup**: Remove generated SQL/instance files, clean infrequently used YAML tags
|
|
15
20
|
|
|
@@ -54,8 +59,11 @@ blt deploy schema
|
|
|
54
59
|
| `blt image` | Convert, sharpen, enhance, recolor |
|
|
55
60
|
| `blt pdf` | Binder (combine), folio (TOC + pages)|
|
|
56
61
|
| `blt version` | Update, string, sql |
|
|
62
|
+
| `blt init` | Clone script for BLT repos |
|
|
63
|
+
| `blt wai` | Claude Code config (claude, agents, skills, rules, commands, settings, mcp) |
|
|
57
64
|
| `blt build` | Schema (DDL), data (instance) |
|
|
58
65
|
| `blt deploy` | Schema, data, sql file |
|
|
66
|
+
| `blt workflow`| list, show, delete, reload, deploy |
|
|
59
67
|
| `blt bucket` | names, list, upload, download, url, clear |
|
|
60
68
|
| `blt show` | schema, counts, env, db, repo |
|
|
61
69
|
| `blt cleanup` | generated, tags |
|
|
@@ -315,6 +323,175 @@ blt deploy sql ./migrations/001_init.sql
|
|
|
315
323
|
|
|
316
324
|
---
|
|
317
325
|
|
|
326
|
+
## Init Commands
|
|
327
|
+
|
|
328
|
+
### `blt init [options]`
|
|
329
|
+
|
|
330
|
+
Create a shell script to clone or pull all BLT repositories.
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
blt init
|
|
334
|
+
blt init -w -c
|
|
335
|
+
./getblt.sh
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**Options:**
|
|
339
|
+
|
|
340
|
+
- `-o, --output <path>` — Output path for the script (default: ./getblt.sh)
|
|
341
|
+
- `-s, --ssh` — Use SSH URLs instead of HTTPS
|
|
342
|
+
- `-w, --workspace` — Also generate blt.code-workspace with folder entries
|
|
343
|
+
- `-c, --connections` — Add sqltools.connections from .env (requires -w)
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## WAI Commands (bltwai.com)
|
|
348
|
+
|
|
349
|
+
AI and agent configuration templates. Templates are pulled from the tools repo; uses built-in fallback if offline.
|
|
350
|
+
|
|
351
|
+
### `blt wai claude`
|
|
352
|
+
|
|
353
|
+
Create `CLAUDE.md` — primary project memory loaded every session.
|
|
354
|
+
|
|
355
|
+
### `blt wai agents`
|
|
356
|
+
|
|
357
|
+
Create `AGENTS.md` — open standard for AI agent config.
|
|
358
|
+
|
|
359
|
+
### `blt wai claude-local`
|
|
360
|
+
|
|
361
|
+
Create `CLAUDE.local.md` — local-only instructions (add to `.gitignore`).
|
|
362
|
+
|
|
363
|
+
### `blt wai skill <name>`
|
|
364
|
+
|
|
365
|
+
Create `.claude/skills/<name>/SKILL.md` — reusable workflow.
|
|
366
|
+
|
|
367
|
+
### `blt wai rule <name>`
|
|
368
|
+
|
|
369
|
+
Create `.claude/rules/<name>.md` — scoped instructions.
|
|
370
|
+
|
|
371
|
+
### `blt wai command <name>`
|
|
372
|
+
|
|
373
|
+
Create `.claude/commands/<name>.md` — legacy slash command.
|
|
374
|
+
|
|
375
|
+
### `blt wai settings`
|
|
376
|
+
|
|
377
|
+
Create `.claude/settings.json` — project settings.
|
|
378
|
+
|
|
379
|
+
### `blt wai settings-local`
|
|
380
|
+
|
|
381
|
+
Create `.claude/settings.local.json` — local overrides (add to .gitignore).
|
|
382
|
+
|
|
383
|
+
### `blt wai mcp`
|
|
384
|
+
|
|
385
|
+
Create `.mcp.json` — MCP server config (Jira, Slack, etc.).
|
|
386
|
+
|
|
387
|
+
### Codex equivalents (OpenAI Codex CLI)
|
|
388
|
+
|
|
389
|
+
- `blt wai agents-override` — AGENTS.override.md (local overrides, add to .gitignore)
|
|
390
|
+
- `blt wai plan` — PLAN.md (multi-step strategy)
|
|
391
|
+
- `blt wai implement` — IMPLEMENT.md (runbook)
|
|
392
|
+
- `blt wai codex` — CODEX.md (legacy)
|
|
393
|
+
|
|
394
|
+
```bash
|
|
395
|
+
blt wai claude
|
|
396
|
+
blt wai agents
|
|
397
|
+
blt wai claude-local
|
|
398
|
+
blt wai skill my-skill
|
|
399
|
+
blt wai rule typescript
|
|
400
|
+
blt wai command review
|
|
401
|
+
blt wai settings
|
|
402
|
+
blt wai mcp
|
|
403
|
+
blt wai agents-override
|
|
404
|
+
blt wai plan
|
|
405
|
+
blt wai implement
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**Options (all types):** `--overwrite`, `--branch <ref>`, `--output <path>`, `--claude-dir`
|
|
409
|
+
|
|
410
|
+
**Shared standard:** AGENTS.md works across Claude Code, Codex, and Cursor. Codex uses AGENTS.override.md for local overrides (similar to CLAUDE.local.md).
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Workflow Commands (GitHub Actions)
|
|
415
|
+
|
|
416
|
+
Manage deploy GitHub Actions workflows in the `bltcore-com/deploy` repository. **Requires:** [GitHub CLI (`gh`)](https://cli.github.com/) installed and authenticated.
|
|
417
|
+
|
|
418
|
+
**Environments:** `bae`, `joanne`, `demo`, `test`
|
|
419
|
+
|
|
420
|
+
### `blt workflow list [env]`
|
|
421
|
+
|
|
422
|
+
List recent workflow runs. Omit `env` to list available environments.
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
blt workflow list # List environments
|
|
426
|
+
blt workflow list bae # List runs for bae
|
|
427
|
+
blt workflow list bae --limit 10 --status completed
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
**Options:**
|
|
431
|
+
|
|
432
|
+
- `--limit <n>` — Maximum runs to show (default: 20)
|
|
433
|
+
- `--status <status>` — Filter: `queued`, `completed`, `in_progress`, `success`, `failure`
|
|
434
|
+
- `--json` — Output as JSON
|
|
435
|
+
|
|
436
|
+
### `blt workflow show <env>`
|
|
437
|
+
|
|
438
|
+
Show the latest run and the `gh run view` command plus URL for opening in the browser.
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
blt workflow show bae
|
|
442
|
+
blt workflow show bae --type reload # Last reload run only
|
|
443
|
+
blt workflow show bae --type deploy # Last deploy run only
|
|
444
|
+
blt workflow show bae --web # Open in browser
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
**Options:**
|
|
448
|
+
|
|
449
|
+
- `--type <reload|deploy>` — Show last reload or last deploy run (default: most recent of either)
|
|
450
|
+
- `--web` — Open the run in the browser
|
|
451
|
+
|
|
452
|
+
### `blt workflow delete <env>`
|
|
453
|
+
|
|
454
|
+
Delete old workflow runs, keeping the latest N per workflow.
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
blt workflow delete bae # Keep 5 runs per workflow (default)
|
|
458
|
+
blt workflow delete joanne --keep 10
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
**Options:**
|
|
462
|
+
|
|
463
|
+
- `--keep <n>` — Runs to keep per workflow (default: 5)
|
|
464
|
+
|
|
465
|
+
### `blt workflow reload <env>`
|
|
466
|
+
|
|
467
|
+
Load starter data to environment (deploy-initial-data-to-* workflow).
|
|
468
|
+
|
|
469
|
+
```bash
|
|
470
|
+
blt workflow reload bae
|
|
471
|
+
blt workflow reload bae --ref main --wait
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
**Options:**
|
|
475
|
+
|
|
476
|
+
- `--ref <branch>` — Git ref to run against (default: main)
|
|
477
|
+
- `--wait` — Block until workflow completes
|
|
478
|
+
|
|
479
|
+
### `blt workflow deploy <env>`
|
|
480
|
+
|
|
481
|
+
Deploy subdomain for environment (*.bltpos.com / *.bltcore.com).
|
|
482
|
+
|
|
483
|
+
```bash
|
|
484
|
+
blt workflow deploy bae
|
|
485
|
+
blt workflow deploy joanne --ref main --wait
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
**Options:**
|
|
489
|
+
|
|
490
|
+
- `--ref <branch>` — Git ref to run against (default: main)
|
|
491
|
+
- `--wait` — Block until workflow completes
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
318
495
|
## Bucket Commands (Supabase Storage)
|
|
319
496
|
|
|
320
497
|
### `blt bucket names`
|
|
@@ -524,13 +701,13 @@ Ensure `pdf-lib` is installed: `bun install` (or `npm install`). The CLI uses `p
|
|
|
524
701
|
|
|
525
702
|
## Development
|
|
526
703
|
|
|
527
|
-
Built with TypeScript and Bun.
|
|
704
|
+
Built with TypeScript and Bun. BLT CLI lives in the `cli/` directory of the tools repository.
|
|
528
705
|
|
|
529
706
|
### Build from source
|
|
530
707
|
|
|
531
708
|
```bash
|
|
532
|
-
git clone https://github.com/
|
|
533
|
-
cd
|
|
709
|
+
git clone https://github.com/bltcore-com/tools.git
|
|
710
|
+
cd tools/cli
|
|
534
711
|
bun install
|
|
535
712
|
bun run build
|
|
536
713
|
bun link
|
|
@@ -563,8 +740,8 @@ Marc J. Greenberg <marc@bltwai.com>
|
|
|
563
740
|
|
|
564
741
|
## Repository
|
|
565
742
|
|
|
566
|
-
https://github.com/
|
|
743
|
+
https://github.com/bltcore-com/tools (CLI is in `cli/`)
|
|
567
744
|
|
|
568
745
|
## Support
|
|
569
746
|
|
|
570
|
-
https://github.com/
|
|
747
|
+
https://github.com/bltcore-com/tools/issues
|
package/dist/blt
CHANGED
|
@@ -9,6 +9,8 @@ import pdfCommand from "./commands/pdf";
|
|
|
9
9
|
import versionCommand from "./commands/version";
|
|
10
10
|
import showCommand from "./commands/show";
|
|
11
11
|
import cleanupCommand from "./commands/cleanup";
|
|
12
|
+
import workflowCommand from "./commands/workflow";
|
|
13
|
+
import waiCommand from "./commands/wai";
|
|
12
14
|
import { join, dirname } from "node:path";
|
|
13
15
|
import { readFileSync } from "node:fs";
|
|
14
16
|
import { fileURLToPath } from "node:url";
|
|
@@ -31,6 +33,8 @@ deployCommand(program);
|
|
|
31
33
|
bucketCommand(program);
|
|
32
34
|
showCommand(program);
|
|
33
35
|
cleanupCommand(program);
|
|
36
|
+
workflowCommand(program);
|
|
37
|
+
waiCommand(program);
|
|
34
38
|
// If no command is provided, show help
|
|
35
39
|
const args = process.argv.slice(2);
|
|
36
40
|
if (args.length === 0) {
|
package/dist/blt.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blt.d.ts","sourceRoot":"","sources":["../src/blt.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"blt.d.ts","sourceRoot":"","sources":["../src/blt.ts"],"names":[],"mappings":";AAsBA,wBAAgB,iBAAiB,IAAI,MAAM,CAG1C"}
|
package/dist/blt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blt.js","sourceRoot":"","sources":["../src/blt.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,aAAa,MAAM,mBAAmB,CAAC;AAC9C,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,UAAU,MAAM,gBAAgB,CAAC;AACxC,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,cAAc,MAAM,oBAAoB,CAAC;
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O,CAAC,CAAC;AACtB,WAAW,CAAC,OAAO,CAAC,CAAC;AACrB,UAAU,CAAC,OAAO,CAAC,CAAC;AACpB,cAAc,CAAC,OAAO,CAAC,CAAC;AACxB,YAAY,CAAC,OAAO,CAAC,CAAC;AACtB,aAAa,CAAC,OAAO,CAAC,CAAC;AACvB,aAAa,CAAC,OAAO,CAAC,CAAC;AACvB,WAAW,CAAC,OAAO,CAAC,CAAC;AACrB,cAAc,CAAC,OAAO,CAAC,CAAC;AACxB,eAAe,CAAC,OAAO,CAAC,CAAC;AACzB,UAAU,CAAC,OAAO,CAAC,CAAC;AAEtB,uCAAuC;AACvC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;IACtB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC;AACD,OAAO,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code–aligned config template registry.
|
|
3
|
+
* Templates are fetched from the bltcore-com/tools repo at runtime.
|
|
4
|
+
*/
|
|
5
|
+
export interface ConfigTypeDef {
|
|
6
|
+
filename: string;
|
|
7
|
+
sourceFile: string;
|
|
8
|
+
needsName: boolean;
|
|
9
|
+
description: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const CONFIG_TYPES: Record<string, ConfigTypeDef>;
|
|
12
|
+
export declare function getTemplateUrl(type: string, branch: string, name?: string): string;
|
|
13
|
+
export declare function getOutputPath(type: string, cwd: string, options: {
|
|
14
|
+
output?: string;
|
|
15
|
+
claudeDir?: boolean;
|
|
16
|
+
}, name?: string): string;
|
|
17
|
+
export declare function fetchTemplate(url: string): Promise<string>;
|
|
18
|
+
//# sourceMappingURL=config-templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-templates.d.ts","sourceRoot":"","sources":["../../../src/commands/init/config-templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CA+BtD,CAAC;AAEF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,CAMR;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,EACjD,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,CAsBR;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhE"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code–aligned config template registry.
|
|
3
|
+
* Templates are fetched from the bltcore-com/tools repo at runtime.
|
|
4
|
+
*/
|
|
5
|
+
const TOOLS_REPO = "bltcore-com/tools";
|
|
6
|
+
const TEMPLATE_BASE = "cli/.trailz";
|
|
7
|
+
export const CONFIG_TYPES = {
|
|
8
|
+
claude: {
|
|
9
|
+
filename: "CLAUDE.md",
|
|
10
|
+
sourceFile: "CLAUDE.md",
|
|
11
|
+
needsName: false,
|
|
12
|
+
description: "Primary project memory (loaded every session)",
|
|
13
|
+
},
|
|
14
|
+
agents: {
|
|
15
|
+
filename: "AGENTS.md",
|
|
16
|
+
sourceFile: "AGENTS.md",
|
|
17
|
+
needsName: false,
|
|
18
|
+
description: "Open standard for AI agent config",
|
|
19
|
+
},
|
|
20
|
+
"claude-local": {
|
|
21
|
+
filename: "CLAUDE.local.md",
|
|
22
|
+
sourceFile: "CLAUDE.local.md",
|
|
23
|
+
needsName: false,
|
|
24
|
+
description: "Local-only instructions (add to .gitignore)",
|
|
25
|
+
},
|
|
26
|
+
skill: {
|
|
27
|
+
filename: "SKILL.md",
|
|
28
|
+
sourceFile: "SKILL.md",
|
|
29
|
+
needsName: true,
|
|
30
|
+
description: "Reusable workflow in .claude/skills/<name>/SKILL.md",
|
|
31
|
+
},
|
|
32
|
+
rule: {
|
|
33
|
+
filename: "<name>.md",
|
|
34
|
+
sourceFile: "rule-template.md",
|
|
35
|
+
needsName: true,
|
|
36
|
+
description: "Scoped instructions in .claude/rules/<name>.md",
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
export function getTemplateUrl(type, branch, name) {
|
|
40
|
+
const def = CONFIG_TYPES[type];
|
|
41
|
+
if (!def)
|
|
42
|
+
throw new Error(`Unknown config type: ${type}`);
|
|
43
|
+
const sourceFile = def.sourceFile;
|
|
44
|
+
return `https://raw.githubusercontent.com/${TOOLS_REPO}/${branch}/${TEMPLATE_BASE}/${sourceFile}`;
|
|
45
|
+
}
|
|
46
|
+
export function getOutputPath(type, cwd, options, name) {
|
|
47
|
+
if (options.output) {
|
|
48
|
+
return options.output.startsWith("/")
|
|
49
|
+
? options.output
|
|
50
|
+
: `${cwd}/${options.output}`.replace(/\/+/g, "/");
|
|
51
|
+
}
|
|
52
|
+
const def = CONFIG_TYPES[type];
|
|
53
|
+
if (!def)
|
|
54
|
+
throw new Error(`Unknown config type: ${type}`);
|
|
55
|
+
// skill and rule always live under .claude/
|
|
56
|
+
if (def.needsName && name) {
|
|
57
|
+
if (type === "skill") {
|
|
58
|
+
return `${cwd}/.claude/skills/${name}/SKILL.md`.replace(/\/+/g, "/");
|
|
59
|
+
}
|
|
60
|
+
if (type === "rule") {
|
|
61
|
+
return `${cwd}/.claude/rules/${name}.md`.replace(/\/+/g, "/");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const base = options.claudeDir ? ".claude" : ".";
|
|
65
|
+
return `${cwd}/${base}/${def.filename}`.replace(/\/+/g, "/");
|
|
66
|
+
}
|
|
67
|
+
export async function fetchTemplate(url) {
|
|
68
|
+
const res = await fetch(url);
|
|
69
|
+
if (!res.ok) {
|
|
70
|
+
throw new Error(`Failed to fetch template (${res.status}): ${url}\n${await res.text().catch(() => "")}`);
|
|
71
|
+
}
|
|
72
|
+
return res.text();
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=config-templates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-templates.js","sourceRoot":"","sources":["../../../src/commands/init/config-templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,GAAG,mBAAmB,CAAC;AACvC,MAAM,aAAa,GAAG,aAAa,CAAC;AASpC,MAAM,CAAC,MAAM,YAAY,GAAkC;IACzD,MAAM,EAAE;QACN,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,WAAW;QACvB,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,+CAA+C;KAC7D;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,WAAW;QACvB,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,mCAAmC;KACjD;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,iBAAiB;QAC3B,UAAU,EAAE,iBAAiB;QAC7B,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,6CAA6C;KAC3D;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,UAAU;QACpB,UAAU,EAAE,UAAU;QACtB,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,qDAAqD;KACnE;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,kBAAkB;QAC9B,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,gDAAgD;KAC9D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SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC;IACjD,OAAO,GAAG,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAW;IAC7C,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,6BAA6B,GAAG,CAAC,MAAM,MAAM,GAAG,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CACxF,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Logger } from "@caporal/core";
|
|
2
|
+
export interface InitConfigOptions {
|
|
3
|
+
overwrite: boolean;
|
|
4
|
+
branch: string;
|
|
5
|
+
output?: string;
|
|
6
|
+
claudeDir: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function initConfig(type: string, name: string | undefined, options: InitConfigOptions, logger: Logger): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/init/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AA2D5C,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CA+Cf"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { existsSync, mkdirSync } from "node:fs";
|
|
2
|
+
import { dirname } from "node:path";
|
|
3
|
+
import { CONFIG_TYPES, fetchTemplate, getOutputPath, getTemplateUrl, } from "./config-templates";
|
|
4
|
+
const DEFAULT_BRANCH = "main";
|
|
5
|
+
/** Fallback templates when GitHub fetch fails (e.g. before push, offline) */
|
|
6
|
+
const FALLBACK_TEMPLATES = {
|
|
7
|
+
"CLAUDE.md": `# Project Memory (CLAUDE.md)
|
|
8
|
+
|
|
9
|
+
Primary project context loaded at the start of every session.
|
|
10
|
+
|
|
11
|
+
## About This Project
|
|
12
|
+
|
|
13
|
+
## Build & Run
|
|
14
|
+
|
|
15
|
+
## Architecture
|
|
16
|
+
|
|
17
|
+
## Coding Standards
|
|
18
|
+
`,
|
|
19
|
+
"AGENTS.md": `# AGENTS.md
|
|
20
|
+
|
|
21
|
+
Open standard for AI agent configuration.
|
|
22
|
+
|
|
23
|
+
## Project Context
|
|
24
|
+
|
|
25
|
+
## Conventions
|
|
26
|
+
|
|
27
|
+
## Key Commands
|
|
28
|
+
`,
|
|
29
|
+
"CLAUDE.local.md": `# CLAUDE.local.md
|
|
30
|
+
|
|
31
|
+
Local-only instructions. Add to .gitignore. Do not commit.
|
|
32
|
+
`,
|
|
33
|
+
"SKILL.md": `---
|
|
34
|
+
name: Skill Name
|
|
35
|
+
description: What this skill does
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
# Skill
|
|
39
|
+
|
|
40
|
+
Reusable multi-step workflow. Add steps and notes below.
|
|
41
|
+
`,
|
|
42
|
+
"rule-template.md": `# Rule
|
|
43
|
+
|
|
44
|
+
Scoped instructions for specific file types or paths.
|
|
45
|
+
|
|
46
|
+
## Applies To
|
|
47
|
+
|
|
48
|
+
## Instructions
|
|
49
|
+
`,
|
|
50
|
+
};
|
|
51
|
+
export async function initConfig(type, name, options, logger) {
|
|
52
|
+
const def = CONFIG_TYPES[type];
|
|
53
|
+
if (!def) {
|
|
54
|
+
logger.error(`Unknown config type: '${type}'. Valid: ${Object.keys(CONFIG_TYPES).join(", ")}`);
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
if (def.needsName && !name?.trim()) {
|
|
58
|
+
logger.error(`Type '${type}' requires a name. Example: blt init config ${type} my-name`);
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
const cwd = process.cwd();
|
|
62
|
+
const targetPath = getOutputPath(type, cwd, options, name);
|
|
63
|
+
if (existsSync(targetPath) && !options.overwrite) {
|
|
64
|
+
logger.warn(`File already exists: ${targetPath}`);
|
|
65
|
+
logger.warn("Use --overwrite to replace it.");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const branch = options.branch || DEFAULT_BRANCH;
|
|
69
|
+
const sourceFile = def.sourceFile;
|
|
70
|
+
let content;
|
|
71
|
+
try {
|
|
72
|
+
const url = getTemplateUrl(type, branch, name);
|
|
73
|
+
content = await fetchTemplate(url);
|
|
74
|
+
}
|
|
75
|
+
catch (err) {
|
|
76
|
+
const fallback = FALLBACK_TEMPLATES[sourceFile];
|
|
77
|
+
if (fallback) {
|
|
78
|
+
logger.warn("Could not fetch from GitHub, using built-in template. Push templates to the tools repo for the latest versions.");
|
|
79
|
+
content = fallback;
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
83
|
+
logger.error(`Failed to fetch template: ${msg}`);
|
|
84
|
+
process.exit(1);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
const dir = dirname(targetPath);
|
|
88
|
+
mkdirSync(dir, { recursive: true });
|
|
89
|
+
await Bun.write(targetPath, content);
|
|
90
|
+
logger.info(`Created: ${targetPath}`);
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/commands/init/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,GACf,MAAM,oBAAoB,CAAC;AAE5B,MAAM,cAAc,GAAG,MAAM,CAAC;AAE9B,6EAA6E;AAC7E,MAAM,kBAAkB,GAA2B;IACjD,WAAW,EAAE;;;;;;;;;;;CAWd;IACC,WAAW,EAAE;;;;;;;;;CASd;IACC,iBAAiB,EAAE;;;CAGpB;IACC,UAAU,EAAE;;;;;;;;CAQb;IACC,kBAAkB,EAAE;;;;;;;CAOrB;CACA,CAAC;AASF,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,IAAY,EACZ,IAAwB,EACxB,OAA0B,EAC1B,MAAc;IAEd,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,CAAC,KAAK,CAAC,yBAAyB,IAAI,aAAa,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC/F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,GAAG,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QACnC,MAAM,CAAC,KAAK,CAAC,SAAS,IAAI,+CAA+C,IAAI,UAAU,CAAC,CAAC;QACzF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC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K,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACrC,MAAM,CAAC,IAAI,CAAC,YAAY,UAAU,EAAE,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/commands/pdf.js
CHANGED
|
@@ -15,7 +15,7 @@ Available operations:
|
|
|
15
15
|
Run 'blt pdf <operation> --help' for more information on a specific command.
|
|
16
16
|
`;
|
|
17
17
|
program
|
|
18
|
-
.command("pdf", "
|
|
18
|
+
.command("pdf", "pdf manipulation")
|
|
19
19
|
.help(pdfHelpText)
|
|
20
20
|
.action(() => {
|
|
21
21
|
console.log(pdfHelpText);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Logger } from "@caporal/core";
|
|
2
|
+
/**
|
|
3
|
+
* Fetch and display pos/data version strings for an environment (same format as login footer).
|
|
4
|
+
* Calls the info API at BLT_INFO_API_URL.
|
|
5
|
+
*/
|
|
6
|
+
export declare function showInfo(name: string, logger: Logger): Promise<void>;
|
|
7
|
+
//# sourceMappingURL=info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/commands/show/info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAU5C;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8C1E"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fetch and display pos/data version strings for an environment (same format as login footer).
|
|
3
|
+
* Calls the info API at BLT_INFO_API_URL.
|
|
4
|
+
*/
|
|
5
|
+
export async function showInfo(name, logger) {
|
|
6
|
+
const apiBase = process.env.BLT_INFO_API_URL?.trim();
|
|
7
|
+
if (!apiBase) {
|
|
8
|
+
logger.error("BLT_INFO_API_URL is not set.");
|
|
9
|
+
console.log("Set the info API base URL, e.g.:");
|
|
10
|
+
console.log(' export BLT_INFO_API_URL="https://<project-ref>.supabase.co/functions/v1/info"');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
const base = apiBase.replace(/\/$/, "");
|
|
14
|
+
const url = `${base}?name=${encodeURIComponent(name)}`;
|
|
15
|
+
try {
|
|
16
|
+
const res = await fetch(url);
|
|
17
|
+
if (!res.ok) {
|
|
18
|
+
const body = (await res.json().catch(() => ({})));
|
|
19
|
+
if (body.error) {
|
|
20
|
+
logger.error(body.error);
|
|
21
|
+
if (body.valid?.length) {
|
|
22
|
+
console.log(`Valid environments: ${body.valid.join(", ")}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
logger.error(`API returned ${res.status}: ${res.statusText}`);
|
|
27
|
+
}
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
const body = (await res.json());
|
|
31
|
+
if (body.lines?.length) {
|
|
32
|
+
for (const line of body.lines) {
|
|
33
|
+
console.log(line);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else if (body.pos || body.data) {
|
|
37
|
+
if (body.pos)
|
|
38
|
+
console.log(body.pos);
|
|
39
|
+
if (body.data)
|
|
40
|
+
console.log(body.data);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
logger.warn("No version data returned.");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
48
|
+
logger.error(`Failed to fetch info: ${message}`);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.js","sourceRoot":"","sources":["../../../src/commands/show/info.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,IAAY,EAAE,MAAc;IACzD,MAAM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CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAiB,CAAC;QAEhD,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC;YACvB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;gBAC9B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;aAAM,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACjC,IAAI,IAAI,CAAC,GAAG;gBAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACpC,IAAI,IAAI,CAAC,IAAI;gBAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,MAAM,CAAC,KAAK,CAAC,yBAAyB,OAAO,EAAE,CAAC,CAAC;QACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code–aligned config template registry for blt wai.
|
|
3
|
+
* Templates are fetched from the bltcore-com/tools repo at runtime.
|
|
4
|
+
*/
|
|
5
|
+
export interface ConfigTypeDef {
|
|
6
|
+
filename: string;
|
|
7
|
+
sourceFile: string;
|
|
8
|
+
needsName: boolean;
|
|
9
|
+
description: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const WAI_TYPES: Record<string, ConfigTypeDef>;
|
|
12
|
+
export declare function getTemplateUrl(type: string, branch: string, name?: string): string;
|
|
13
|
+
export declare function getOutputPath(type: string, cwd: string, options: {
|
|
14
|
+
output?: string;
|
|
15
|
+
claudeDir?: boolean;
|
|
16
|
+
}, name?: string): string;
|
|
17
|
+
export declare function fetchTemplate(url: string): Promise<string>;
|
|
18
|
+
//# sourceMappingURL=config-templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-templates.d.ts","sourceRoot":"","sources":["../../../src/commands/wai/config-templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAgFnD,CAAC;AAEF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,CAMR;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,EACjD,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,CAqCR;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhE"}
|