glyphsmith 0.1.0 → 0.1.1

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.ja.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="docs/images/app-icon.svg" alt="GlyphSmith" width="72" height="72" />
2
+ <img src="https://raw.githubusercontent.com/KobayashiRui/GlyphSmith/main/docs/images/app-icon.svg" alt="GlyphSmith" width="72" height="72" />
3
3
  </p>
4
4
 
5
5
  <h1 align="center">GlyphSmith</h1>
@@ -9,14 +9,14 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="README.md">English</a> | 日本語
12
+ <a href="https://github.com/KobayashiRui/GlyphSmith/blob/main/README.md">English</a> | 日本語
13
13
  </p>
14
14
 
15
15
  GlyphSmith は、手作業での編集と AI エージェントによる編集の両方を前提にした SVG エディタです。
16
16
  エージェントに SVG 文字列全体を書き換えさせるのではなく、SVG を Geometry AST に import し、
17
17
  対象を絞った patch operation を適用し、境界部分でだけ SVG として export します。
18
18
 
19
- ![GlyphSmith editor](docs/images/editor.png)
19
+ ![GlyphSmith editor](https://raw.githubusercontent.com/KobayashiRui/GlyphSmith/main/docs/images/editor.png)
20
20
 
21
21
  ```txt
22
22
  SVG
@@ -34,80 +34,26 @@ GlyphSmith は開発初期段階です。現在のリリースは CLI-first で
34
34
 
35
35
  ## Quick Start
36
36
 
37
- 依存関係をインストールします。
37
+ GlyphSmith をインストールします。
38
38
 
39
39
  ```sh
40
- pnpm install
40
+ npm install -g glyphsmith
41
41
  ```
42
42
 
43
43
  新規プロジェクトを開始します。
44
44
 
45
45
  ```sh
46
- npx glyphsmith my-logo
46
+ glyphsmith my-logo
47
47
  ```
48
48
 
49
49
  これは `./my-logo.gs.json` を開きます。ファイルが存在しない場合、GlyphSmith が自動で作成します。
50
50
 
51
- このリポジトリから実行する場合:
52
-
53
- ```sh
54
- pnpm run build:cli
55
- node apps/cli/dist/index.js my-logo
56
- ```
57
-
58
- デフォルトの開発用プロジェクトを起動します。
51
+ global install せずに実行することもできます。
59
52
 
60
53
  ```sh
61
- pnpm run dev
62
- ```
63
-
64
- 開発時のデフォルト:
65
-
66
- ```txt
67
- Project: examples/playground.gs.json
68
- UI: http://localhost:6201
69
- Host: ws://localhost:6202/ws
70
- MCP: http://localhost:6202/mcp
71
- ```
72
-
73
- 公式 GlyphSmith icon project を起動します。
74
-
75
- ```sh
76
- pnpm run dev:icons
77
- ```
78
-
79
- ## Export Icons
80
-
81
- icon project を web app の static directory に export します。
82
-
83
- ```sh
84
- pnpm run export:icons
85
- ```
86
-
87
- 生成された SVG ファイルはここに出力されます。
88
-
89
- ```txt
90
- apps/web/static/icons
91
- ```
92
-
93
- 同じコマンドを再実行すると、生成済みの icon output は上書きされます。
94
-
95
- ## Package
96
-
97
- 公開用の CLI package を build します。
98
-
99
- ```sh
100
- pnpm run build:cli
101
- ```
102
-
103
- 確認用の npm tarball を作成します。
104
-
105
- ```sh
106
- pnpm run pack:cli
54
+ npx glyphsmith my-logo
107
55
  ```
108
56
 
109
- package は `artifacts/npm` に出力され、bundle 済み CLI、build 済み web UI、GlyphSmith skills を含みます。
110
-
111
57
  ## Agent Workflow
112
58
 
113
59
  GlyphSmith では Geometry AST が source of truth です。AI エージェントは SVG ファイル全体を再生成するのではなく、patch operation または MCP tool を通じて project を変更します。
@@ -178,3 +124,71 @@ README 用の画像は `docs/images` に置きます。アプリ実行時の ass
178
124
  docs/images/app-icon.svg
179
125
  docs/images/editor.png
180
126
  ```
127
+
128
+ ## Developer Workflow
129
+
130
+ 依存関係をインストールします。
131
+
132
+ ```sh
133
+ pnpm install
134
+ ```
135
+
136
+ このリポジトリから GlyphSmith を実行します。
137
+
138
+ ```sh
139
+ pnpm run build:cli
140
+ node apps/cli/dist/index.js my-logo
141
+ ```
142
+
143
+ デフォルトの開発用プロジェクトを起動します。
144
+
145
+ ```sh
146
+ pnpm run dev
147
+ ```
148
+
149
+ 開発時のデフォルト:
150
+
151
+ ```txt
152
+ Project: examples/playground.gs.json
153
+ UI: http://localhost:6201
154
+ Host: ws://localhost:6202/ws
155
+ MCP: http://localhost:6202/mcp
156
+ ```
157
+
158
+ 公式 GlyphSmith icon project を起動します。
159
+
160
+ ```sh
161
+ pnpm run dev:icons
162
+ ```
163
+
164
+ ### Export Icons
165
+
166
+ icon project を web app の static directory に export します。
167
+
168
+ ```sh
169
+ pnpm run export:icons
170
+ ```
171
+
172
+ 生成された SVG ファイルはここに出力されます。
173
+
174
+ ```txt
175
+ apps/web/static/icons
176
+ ```
177
+
178
+ 同じコマンドを再実行すると、生成済みの icon output は上書きされます。
179
+
180
+ ### Package
181
+
182
+ 公開用の CLI package を build します。
183
+
184
+ ```sh
185
+ pnpm run build:cli
186
+ ```
187
+
188
+ 確認用の npm tarball を作成します。
189
+
190
+ ```sh
191
+ pnpm run pack:cli
192
+ ```
193
+
194
+ package は `artifacts/npm` に出力され、bundle 済み CLI、build 済み web UI、GlyphSmith skills を含みます。
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="docs/images/app-icon.svg" alt="GlyphSmith" width="72" height="72" />
2
+ <img src="https://raw.githubusercontent.com/KobayashiRui/GlyphSmith/main/docs/images/app-icon.svg" alt="GlyphSmith" width="72" height="72" />
3
3
  </p>
4
4
 
5
5
  <h1 align="center">GlyphSmith</h1>
@@ -9,14 +9,14 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- English | <a href="README.ja.md">日本語</a>
12
+ English | <a href="https://github.com/KobayashiRui/GlyphSmith/blob/main/README.ja.md">日本語</a>
13
13
  </p>
14
14
 
15
15
  GlyphSmith is an SVG editor designed for both manual editing and AI-assisted editing.
16
16
  Instead of asking agents to rewrite whole SVG strings, GlyphSmith imports SVG into a Geometry AST,
17
17
  applies targeted patch operations, and exports SVG only at the boundary.
18
18
 
19
- ![GlyphSmith editor](docs/images/editor.png)
19
+ ![GlyphSmith editor](https://raw.githubusercontent.com/KobayashiRui/GlyphSmith/main/docs/images/editor.png)
20
20
 
21
21
  ```txt
22
22
  SVG
@@ -34,80 +34,26 @@ GlyphSmith is in early development. The current release is CLI-first and focuses
34
34
 
35
35
  ## Quick Start
36
36
 
37
- Install dependencies:
37
+ Install GlyphSmith:
38
38
 
39
39
  ```sh
40
- pnpm install
40
+ npm install -g glyphsmith
41
41
  ```
42
42
 
43
43
  Start a new project:
44
44
 
45
45
  ```sh
46
- npx glyphsmith my-logo
46
+ glyphsmith my-logo
47
47
  ```
48
48
 
49
49
  This opens `./my-logo.gs.json`. If the file does not exist, GlyphSmith creates it automatically.
50
50
 
51
- When running from this repository:
52
-
53
- ```sh
54
- pnpm run build:cli
55
- node apps/cli/dist/index.js my-logo
56
- ```
57
-
58
- Run the default development project:
51
+ You can also run it without a global install:
59
52
 
60
53
  ```sh
61
- pnpm run dev
62
- ```
63
-
64
- Development defaults:
65
-
66
- ```txt
67
- Project: examples/playground.gs.json
68
- UI: http://localhost:6201
69
- Host: ws://localhost:6202/ws
70
- MCP: http://localhost:6202/mcp
71
- ```
72
-
73
- Run the official GlyphSmith icon project:
74
-
75
- ```sh
76
- pnpm run dev:icons
77
- ```
78
-
79
- ## Export Icons
80
-
81
- Export the icon project into the web app static directory:
82
-
83
- ```sh
84
- pnpm run export:icons
85
- ```
86
-
87
- The generated SVG files are written to:
88
-
89
- ```txt
90
- apps/web/static/icons
91
- ```
92
-
93
- Running the command again overwrites the generated icon output.
94
-
95
- ## Package
96
-
97
- Build the publishable CLI package:
98
-
99
- ```sh
100
- pnpm run build:cli
101
- ```
102
-
103
- Create a local npm tarball for inspection:
104
-
105
- ```sh
106
- pnpm run pack:cli
54
+ npx glyphsmith my-logo
107
55
  ```
108
56
 
109
- The package is written to `artifacts/npm` and contains the bundled CLI, built web UI, and GlyphSmith skills.
110
-
111
57
  ## Agent Workflow
112
58
 
113
59
  GlyphSmith keeps the Geometry AST as the source of truth. AI agents should modify projects through patch operations or MCP tools instead of regenerating SVG files.
@@ -178,3 +124,71 @@ Current README assets:
178
124
  docs/images/app-icon.svg
179
125
  docs/images/editor.png
180
126
  ```
127
+
128
+ ## Developer Workflow
129
+
130
+ Install dependencies:
131
+
132
+ ```sh
133
+ pnpm install
134
+ ```
135
+
136
+ Run GlyphSmith from this repository:
137
+
138
+ ```sh
139
+ pnpm run build:cli
140
+ node apps/cli/dist/index.js my-logo
141
+ ```
142
+
143
+ Run the default development project:
144
+
145
+ ```sh
146
+ pnpm run dev
147
+ ```
148
+
149
+ Development defaults:
150
+
151
+ ```txt
152
+ Project: examples/playground.gs.json
153
+ UI: http://localhost:6201
154
+ Host: ws://localhost:6202/ws
155
+ MCP: http://localhost:6202/mcp
156
+ ```
157
+
158
+ Run the official GlyphSmith icon project:
159
+
160
+ ```sh
161
+ pnpm run dev:icons
162
+ ```
163
+
164
+ ### Export Icons
165
+
166
+ Export the icon project into the web app static directory:
167
+
168
+ ```sh
169
+ pnpm run export:icons
170
+ ```
171
+
172
+ The generated SVG files are written to:
173
+
174
+ ```txt
175
+ apps/web/static/icons
176
+ ```
177
+
178
+ Running the command again overwrites the generated icon output.
179
+
180
+ ### Package
181
+
182
+ Build the publishable CLI package:
183
+
184
+ ```sh
185
+ pnpm run build:cli
186
+ ```
187
+
188
+ Create a local npm tarball for inspection:
189
+
190
+ ```sh
191
+ pnpm run pack:cli
192
+ ```
193
+
194
+ The package is written to `artifacts/npm` and contains the bundled CLI, built web UI, and GlyphSmith skills.
package/dist/index.js CHANGED
@@ -4036,6 +4036,7 @@ async function writeFetchResponse(response, fetchResponse) {
4036
4036
  var DEFAULT_PORT = "6201";
4037
4037
  var DEFAULT_HOST_PORT = "6202";
4038
4038
  var DEFAULT_HOST = "127.0.0.1";
4039
+ var DEFAULT_PUBLIC_HOST = "localhost";
4039
4040
  var DEV_BIND_HOST = "0.0.0.0";
4040
4041
  var DEV_PUBLIC_HOST = "localhost";
4041
4042
  var cliDirectory = fileURLToPath(new URL(".", import.meta.url));
@@ -4112,7 +4113,8 @@ async function main() {
4112
4113
  if (hostPort !== requestedHostPort) {
4113
4114
  console.log(`\u2713 Host port ${requestedHostPort} is unavailable, using ${hostPort}`);
4114
4115
  }
4115
- console.log(`\u2713 UI running on http://${DEFAULT_HOST}:${port}`);
4116
+ const uiUrl = `http://${DEFAULT_PUBLIC_HOST}:${port}/`;
4117
+ console.log(`\u2713 UI running on ${terminalLink(uiUrl)}`);
4116
4118
  console.log(`\u2713 Host running on ws://${DEFAULT_HOST}:${hostPort}/ws`);
4117
4119
  console.log(`\u2713 MCP running on ${mcpUrl}`);
4118
4120
  if (packagedWeb) {
@@ -4145,6 +4147,12 @@ async function main() {
4145
4147
  function packagedWebDirectoryExists() {
4146
4148
  return existsSync3(resolve2(packagedWebDirectory, "index.html"));
4147
4149
  }
4150
+ function terminalLink(url, label = url) {
4151
+ if (!process.stdout.isTTY || process.env.CI) {
4152
+ return label;
4153
+ }
4154
+ return `\x1B]8;;${url}\x07${label}\x1B]8;;\x07`;
4155
+ }
4148
4156
  async function findAvailablePort(startPort, reservedPorts = /* @__PURE__ */ new Set(), host = DEFAULT_HOST) {
4149
4157
  let port = Number(startPort);
4150
4158
  while (port <= 65535) {