@airig/cli 0.0.4 → 0.0.6

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.
Files changed (3) hide show
  1. package/README.md +21 -1
  2. package/dist/index.js +12 -8
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -58,8 +58,28 @@ Package releases are separate from Setup Releases. `airig publish [tag]` creates
58
58
  4. Run `airig publish` to upload `ai.zip` to an immutable GitHub Setup Release.
59
59
  5. Share `airig add yourname/repo`.
60
60
 
61
+ For AI Setup repositories, use [`bumpp`](https://github.com/antfu-collective/bumpp)
62
+ to create and push release tags from a package script:
63
+
64
+ ```json
65
+ {
66
+ "scripts": {
67
+ "release": "bumpp"
68
+ }
69
+ }
70
+ ```
71
+
72
+ To publish Setup Releases from your AI Setup repository with GitHub Actions, copy
73
+ `resources/templates/publish.yml` to `.github/workflows/publish.yml` in that
74
+ repository. The workflow publishes when `bumpp` pushes a `v*` tag and expects an
75
+ `AIRIG_PUBLISH_TOKEN` repository secret. Create that secret from a fine-grained
76
+ GitHub PAT scoped only to the Setup Release repository with:
77
+
78
+ - `Contents`: Read and write
79
+ - `Administration`: Read-only
80
+
61
81
  ## Requirements
62
82
 
63
83
  - Node.js `24.11.0` or newer in the Node 24 release line.
64
84
  - GitHub immutable releases enabled for repositories that publish Setup Releases.
65
- - `GITHUB_TOKEN` with repository write access when running `publish`.
85
+ - `GITHUB_TOKEN` when running `publish`. For local use or custom GitHub Actions workflows, use a fine-grained GitHub PAT scoped to the Setup Release repository with `Contents` read/write access to create releases and `Administration` read-only access so `airig publish` can verify immutable releases are enabled before publishing.
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import { execSync, spawn } from "node:child_process";
4
4
  import { cp, lstat, mkdir, mkdtemp, readFile, readdir, readlink, rm, symlink, unlink, writeFile } from "node:fs/promises";
5
5
  import path, { join } from "node:path";
6
6
  import { parseEnv } from "node:util";
7
- import archiver from "archiver";
7
+ import { ZipArchive } from "archiver";
8
8
  import { createWriteStream, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
9
9
  import { Octokit } from "@octokit/rest";
10
10
  import { checkbox } from "@inquirer/prompts";
@@ -15,7 +15,7 @@ import { fileURLToPath } from "node:url";
15
15
  function create(sourceDir, outputPath) {
16
16
  return new Promise((resolve, reject) => {
17
17
  const output = createWriteStream(outputPath);
18
- const archive = archiver("zip", { zlib: { level: 9 } });
18
+ const archive = new ZipArchive({ zlib: { level: 9 } });
19
19
  const sourceBaseName = path.basename(sourceDir);
20
20
  output.on("close", resolve);
21
21
  archive.on("error", reject);
@@ -408,6 +408,10 @@ const PROVIDER_REGISTRY = {
408
408
  {
409
409
  source: ".ai/.claude/commands",
410
410
  target: ".claude/commands"
411
+ },
412
+ {
413
+ source: ".ai/skills",
414
+ target: ".claude/skills"
411
415
  }
412
416
  ]
413
417
  },
@@ -425,16 +429,16 @@ const PROVIDER_REGISTRY = {
425
429
  {
426
430
  source: ".ai/.codex/commands",
427
431
  target: ".codex/prompts"
432
+ },
433
+ {
434
+ source: ".ai/skills",
435
+ target: ".agents/skills"
428
436
  }
429
437
  ]
430
438
  }
431
439
  };
432
- const SKILLS_RULE = {
433
- source: ".ai/skills",
434
- target: ".agents/skills"
435
- };
436
440
  function rulesFor(providers) {
437
- return [...providers.flatMap((p) => PROVIDER_REGISTRY[p].rules), SKILLS_RULE];
441
+ return providers.flatMap((p) => PROVIDER_REGISTRY[p].rules);
438
442
  }
439
443
  function targetPathsForArtifact(artifact, providers = Object.keys(PROVIDER_REGISTRY)) {
440
444
  const targets = /* @__PURE__ */ new Set();
@@ -1052,7 +1056,7 @@ function formatUpdateMessage(opts) {
1052
1056
  }
1053
1057
  //#endregion
1054
1058
  //#region src/index.ts
1055
- const program = new Command("airig").description("Manage project-scoped AI Setup artifacts");
1059
+ const program = new Command("airig").description("Manage project-scoped AI Setup artifacts").version("0.0.6");
1056
1060
  program.addCommand(publishCommand);
1057
1061
  program.addCommand(addCommand);
1058
1062
  program.addCommand(updateCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@airig/cli",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Distribute and manage AI setups across providers",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,12 +38,12 @@
38
38
  "dependencies": {
39
39
  "@inquirer/prompts": "^7.5.2",
40
40
  "@octokit/rest": "^21.1.1",
41
- "archiver": "^7.0.1",
41
+ "archiver": "^8.0.0",
42
42
  "commander": "^14.0.0",
43
43
  "extract-zip": "^2.0.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@types/archiver": "^6.0.3",
46
+ "@types/archiver": "^8.0.0",
47
47
  "@types/node": "^22.15.21",
48
48
  "bumpp": "^11.1.0",
49
49
  "tsdown": "^0.12.6",