@series-inc/stowkit-cli 0.1.23 → 0.1.24

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/dist/cli.js CHANGED
@@ -38,6 +38,7 @@ function printUsage() {
38
38
  console.log(`
39
39
  Usage:
40
40
  stowkit init [dir] Initialize a StowKit project
41
+ stowkit init --update [dir] Update AI skill files to match installed CLI version
41
42
  stowkit build [dir] Full build: scan + process + pack
42
43
  stowkit scan [dir] Detect new assets, generate .stowmeta defaults
43
44
  stowkit process [dir] Compress assets (respects cache)
@@ -96,7 +97,7 @@ async function main() {
96
97
  try {
97
98
  switch (command) {
98
99
  case 'init':
99
- await initProject(projectDir);
100
+ await initProject(projectDir, { update: args.includes('--update') });
100
101
  break;
101
102
  case 'build':
102
103
  await fullBuild(projectDir, opts);
package/dist/init.d.ts CHANGED
@@ -1 +1,4 @@
1
- export declare function initProject(projectDir: string): Promise<void>;
1
+ export interface InitOptions {
2
+ update?: boolean;
3
+ }
4
+ export declare function initProject(projectDir: string, opts?: InitOptions): Promise<void>;
package/dist/init.js CHANGED
@@ -1,10 +1,26 @@
1
1
  import * as fs from 'node:fs/promises';
2
2
  import * as path from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
- export async function initProject(projectDir) {
4
+ export async function initProject(projectDir, opts) {
5
5
  const absDir = path.resolve(projectDir);
6
- // Check if already initialized
7
6
  const configPath = path.join(absDir, '.felicityproject');
7
+ const update = opts?.update ?? false;
8
+ if (update) {
9
+ // --update: only refresh AI skill files, project must already exist
10
+ try {
11
+ await fs.access(configPath);
12
+ }
13
+ catch {
14
+ console.error('No StowKit project found. Run `stowkit init` first.');
15
+ process.exit(1);
16
+ }
17
+ await copySkillFiles(absDir);
18
+ console.log('Updated AI skill files:');
19
+ console.log(' .claude/skills/stowkit/SKILL.md');
20
+ console.log(' .cursor/rules/stowkit.mdc');
21
+ return;
22
+ }
23
+ // Check if already initialized
8
24
  try {
9
25
  await fs.access(configPath);
10
26
  console.log(`Project already initialized at ${absDir}`);
@@ -49,7 +65,18 @@ export async function initProject(projectDir) {
49
65
  catch {
50
66
  await fs.writeFile(gitignorePath, stowkitIgnores + '\n');
51
67
  }
52
- // Copy AI skill/rule files (CLI skill only — loader skills are installed locally with their packages)
68
+ // Copy AI skill/rule files
69
+ await copySkillFiles(absDir);
70
+ console.log(`Initialized StowKit project at ${absDir}`);
71
+ console.log(` Source art dir: ${srcArtDir}/`);
72
+ console.log(` Output dir: public/cdn-assets/`);
73
+ console.log(` Config: .felicityproject`);
74
+ console.log(` AI skills: .claude/skills/stowkit/SKILL.md, .cursor/rules/stowkit.mdc`);
75
+ console.log('');
76
+ console.log('Drop your assets (PNG, JPG, FBX, WAV, etc.) into assets/');
77
+ console.log('Then run: stowkit build');
78
+ }
79
+ async function copySkillFiles(absDir) {
53
80
  const thisDir = path.dirname(fileURLToPath(import.meta.url));
54
81
  const skillSrc = path.resolve(thisDir, '../skill.md');
55
82
  try {
@@ -64,12 +91,4 @@ export async function initProject(projectDir) {
64
91
  catch {
65
92
  // Skill file not found in package — skip silently
66
93
  }
67
- console.log(`Initialized StowKit project at ${absDir}`);
68
- console.log(` Source art dir: ${srcArtDir}/`);
69
- console.log(` Output dir: public/cdn-assets/`);
70
- console.log(` Config: .felicityproject`);
71
- console.log(` AI skills: .claude/skills/stowkit/SKILL.md, .cursor/rules/stowkit.mdc`);
72
- console.log('');
73
- console.log('Drop your assets (PNG, JPG, FBX, WAV, etc.) into assets/');
74
- console.log('Then run: npx stowkit build');
75
94
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@series-inc/stowkit-cli",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "stowkit": "./dist/cli.js"
@@ -17,7 +17,7 @@
17
17
  "dev": "tsc --watch"
18
18
  },
19
19
  "dependencies": {
20
- "@series-inc/stowkit-packer-gui": "^0.1.11",
20
+ "@series-inc/stowkit-packer-gui": "^0.1.12",
21
21
  "@series-inc/stowkit-editor": "^0.1.2",
22
22
  "draco3d": "^1.5.7",
23
23
  "fbx-parser": "^2.1.3",
package/skill.md CHANGED
@@ -37,6 +37,7 @@ A StowKit project has a `.felicityproject` JSON file at its root:
37
37
 
38
38
  ```bash
39
39
  stowkit init [dir] # Scaffold a new project (creates .felicityproject, assets/, public/cdn-assets/)
40
+ stowkit init --update [dir] # Update AI skill files to match installed CLI version
40
41
  stowkit build [dir] # Full build: scan + process + pack
41
42
  stowkit scan [dir] # Detect new assets and generate .stowmeta defaults
42
43
  stowkit process [dir] # Compress assets (respects cache)
@@ -505,6 +506,18 @@ PerfLogger.enable();
505
506
  PerfLogger.disable();
506
507
  ```
507
508
 
509
+ ## Updating This Skill File
510
+
511
+ This skill file is bundled with the `@series-inc/stowkit-cli` package. When the CLI is updated to a newer version, the local copy of this file may become outdated. To refresh it:
512
+
513
+ ```bash
514
+ stowkit init --update
515
+ ```
516
+
517
+ This overwrites `.claude/skills/stowkit/SKILL.md` and `.cursor/rules/stowkit.mdc` with the version shipped in the currently installed CLI. It does not touch the project config, directories, or any asset files.
518
+
519
+ **When to run this:** After upgrading the CLI (`npm install -g @series-inc/stowkit-cli@latest`), or if you notice this skill file is missing documentation for commands that exist in `stowkit --help`.
520
+
508
521
  ## Common Tasks for AI Agents
509
522
 
510
523
  ### Adding a GLB model (recommended 3D workflow)