shipfolio 1.0.9 → 1.1.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/README.md +246 -145
- package/dist/cli.js +1212 -441
- package/dist/cli.js.map +1 -1
- package/dist/lib/orchestrator/detect.js +3 -1
- package/dist/lib/orchestrator/detect.js.map +1 -1
- package/dist/lib/orchestrator/prompt-builder.js +93 -174
- package/dist/lib/orchestrator/prompt-builder.js.map +1 -1
- package/dist/lib/scanner/git.js +1 -1
- package/dist/lib/scanner/git.js.map +1 -1
- package/dist/lib/scanner/index.js +42 -18
- package/dist/lib/scanner/index.js.map +1 -1
- package/dist/lib/spec/builder.js +100 -3
- package/dist/lib/spec/builder.js.map +1 -1
- package/dist/lib/spec/diff.js +179 -15
- package/dist/lib/spec/diff.js.map +1 -1
- package/package.json +6 -4
- package/prompts/fresh-build.md +15 -0
- package/prompts/update.md +5 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
## What is shipfolio?
|
|
10
10
|
|
|
11
|
-
A CLI tool that turns your local projects into a personal portfolio website. It scans your git repositories, uses your local AI tools (Claude Code, Codex, or v0) to generate a production-ready site, and deploys it to Cloudflare Pages or Vercel -- all in one command.
|
|
11
|
+
A CLI tool that turns your local projects into a personal portfolio website. It scans your git repositories, uses your local AI tools (Claude Code, Codex, or v0) to generate a production-ready Next.js site, and deploys it to Cloudflare Pages or Vercel -- all in one command.
|
|
12
12
|
|
|
13
13
|
Built for developers who ship fast and need a way to showcase their work without spending hours on a portfolio.
|
|
14
14
|
|
|
@@ -18,156 +18,198 @@ Built for developers who ship fast and need a way to showcase their work without
|
|
|
18
18
|
npx shipfolio --scan ~/Projects
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
The tool walks you through everything interactively: project selection, personal info, design preferences, and deployment.
|
|
22
22
|
|
|
23
23
|
## Prerequisites
|
|
24
24
|
|
|
25
25
|
- Node.js >= 18
|
|
26
|
-
- At least one AI engine
|
|
26
|
+
- At least one AI engine:
|
|
27
27
|
|
|
28
|
-
| Engine |
|
|
28
|
+
| Engine | How to get it | Notes |
|
|
29
29
|
|---|---|---|
|
|
30
30
|
| Claude Code | `npm install -g @anthropic-ai/claude-code` | Recommended. Best overall generation quality. |
|
|
31
31
|
| Codex | `npm install -g @openai/codex` | Alternative. |
|
|
32
|
-
| v0 | Set `V0_API_KEY`
|
|
32
|
+
| v0 | Set `V0_API_KEY` environment variable | Best UI design quality. Requires paid v0 plan. Get your key at [v0.dev](https://v0.dev). |
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
No need to install `wrangler` or `vercel` CLI -- shipfolio calls them via `npx` automatically.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
## Commands
|
|
37
|
+
|
|
38
|
+
### Generate a New Site
|
|
37
39
|
|
|
38
40
|
```bash
|
|
39
|
-
# Interactive mode (recommended for first use)
|
|
40
41
|
npx shipfolio --scan ~/Projects
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
npx shipfolio --scan ~/Projects --
|
|
42
|
+
npx shipfolio --scan ~/Projects --output ./my-site
|
|
43
|
+
npx shipfolio --scan ~/Projects --engine claude --deploy cloudflare --style dark-minimal --accent '#10b981'
|
|
44
|
+
npx shipfolio --scan ~/Projects --auto --no-pdf
|
|
45
|
+
npx shipfolio --scan ~/Projects --no-pdf --no-preview
|
|
44
46
|
```
|
|
45
47
|
|
|
46
|
-
The
|
|
47
|
-
1.
|
|
48
|
-
2.
|
|
49
|
-
3.
|
|
50
|
-
4.
|
|
51
|
-
5.
|
|
52
|
-
6.
|
|
53
|
-
7. Deploy to your chosen platform
|
|
54
|
-
|
|
55
|
-
Output directory: `./shipfolio-site/` (override with `--output <dir>`)
|
|
48
|
+
The pipeline:
|
|
49
|
+
1. Scans directories for git repos (and non-git projects with package.json, Cargo.toml, etc.)
|
|
50
|
+
2. Interactive interview: select projects, optionally merge related ones (e.g. web + mobile), enter personal info, pick theme/colors/font, and optionally enrich key projects with case-study details
|
|
51
|
+
3. Generates the site using your local AI engine
|
|
52
|
+
4. Builds, previews locally, exports PDF
|
|
53
|
+
5. Deploys to Cloudflare Pages or Vercel
|
|
54
|
+
6. Optionally creates a GitHub repo with a CI/CD workflow for auto-deploy on push
|
|
56
55
|
|
|
57
|
-
###
|
|
56
|
+
### Update an Existing Site
|
|
58
57
|
|
|
59
58
|
```bash
|
|
59
|
+
npx shipfolio update --site ./shipfolio-site
|
|
60
60
|
npx shipfolio update --site ./shipfolio-site --scan ~/Projects
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Detects new/changed/removed projects and applies incremental updates. Preserves
|
|
63
|
+
Detects new/changed/removed projects and applies incremental updates. Preserves existing design, layout, and custom modifications.
|
|
64
64
|
|
|
65
|
-
###
|
|
65
|
+
### Generate Spec Only
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
For use inside an existing Claude Code or Codex session:
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
70
|
npx shipfolio spec --scan ~/Projects --output ./
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
Outputs `shipfolio-spec.json` and `shipfolio-prompt.md`. Feed the prompt to your
|
|
73
|
+
Outputs `shipfolio-spec.json` and `shipfolio-prompt.md`. Feed the prompt to your AI session to generate the site directly.
|
|
74
74
|
|
|
75
|
-
###
|
|
75
|
+
### Deploy
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
78
|
npx shipfolio deploy --site ./shipfolio-site --platform cloudflare
|
|
79
79
|
npx shipfolio deploy --site ./shipfolio-site --platform vercel
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
###
|
|
82
|
+
### Export PDF
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
85
|
npx shipfolio pdf --site ./shipfolio-site
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
Requires Playwright
|
|
88
|
+
Requires Playwright: `npx playwright install chromium`
|
|
89
89
|
|
|
90
|
-
###
|
|
90
|
+
### Preview
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
|
-
npx shipfolio preview --site ./shipfolio-site
|
|
93
|
+
npx shipfolio preview --site ./shipfolio-site --port 3000
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
##
|
|
96
|
+
## CLI Reference
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
### `shipfolio init` (default)
|
|
99
|
+
|
|
100
|
+
| Flag | Description | Default |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| `-s, --scan <dirs...>` | Directories to scan for projects | Current directory |
|
|
103
|
+
| `-e, --engine <name>` | `claude`, `codex`, or `v0` | Auto-detect |
|
|
104
|
+
| `-d, --deploy <platform>` | `cloudflare`, `vercel`, or `local` | Prompted |
|
|
105
|
+
| `--style <theme>` | `dark-minimal`, `light-clean`, `monochrome`, or `custom` | Prompted |
|
|
106
|
+
| `--accent <hex>` | Accent color like `#10b981` | Prompted |
|
|
107
|
+
| `--auto` | Use safe defaults and skip prompts | `false` |
|
|
108
|
+
| `-o, --output <dir>` | Output directory | `./shipfolio-site` |
|
|
109
|
+
| `--no-pdf` | Skip PDF export | |
|
|
110
|
+
| `--no-preview` | Skip local preview | |
|
|
111
|
+
|
|
112
|
+
### `shipfolio update`
|
|
113
|
+
|
|
114
|
+
| Flag | Description |
|
|
99
115
|
|---|---|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
| `
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
-
| `shipfolio preview --site <path>` | Start local preview server |
|
|
116
|
+
| `--site <path>` | Path to existing site directory (required) |
|
|
117
|
+
| `-s, --scan <dirs...>` | Directories to scan |
|
|
118
|
+
| `--no-pdf` | Skip PDF export |
|
|
119
|
+
| `--no-preview` | Skip preview |
|
|
120
|
+
| `--no-deploy` | Skip deployment |
|
|
106
121
|
|
|
107
|
-
|
|
122
|
+
### `shipfolio deploy`
|
|
108
123
|
|
|
109
|
-
| Flag |
|
|
110
|
-
|
|
111
|
-
| `--
|
|
112
|
-
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
|
117
|
-
|
|
118
|
-
|
|
|
119
|
-
|
|
|
124
|
+
| Flag | Description |
|
|
125
|
+
|---|---|
|
|
126
|
+
| `--site <path>` | Path to site directory (required) |
|
|
127
|
+
| `-p, --platform <name>` | `cloudflare` or `vercel` |
|
|
128
|
+
|
|
129
|
+
### `shipfolio spec`
|
|
130
|
+
|
|
131
|
+
| Flag | Description |
|
|
132
|
+
|---|---|
|
|
133
|
+
| `-s, --scan <dirs...>` | Directories to scan |
|
|
134
|
+
| `-o, --output <dir>` | Output directory for spec files |
|
|
135
|
+
|
|
136
|
+
### `shipfolio pdf`
|
|
137
|
+
|
|
138
|
+
| Flag | Description |
|
|
139
|
+
|---|---|
|
|
140
|
+
| `--site <path>` | Path to site directory (required) |
|
|
141
|
+
| `-o, --output <path>` | PDF output path |
|
|
142
|
+
|
|
143
|
+
### `shipfolio preview`
|
|
144
|
+
|
|
145
|
+
| Flag | Description |
|
|
146
|
+
|---|---|
|
|
147
|
+
| `--site <path>` | Path to site directory (required) |
|
|
148
|
+
| `--port <port>` | Port number (default: 3000, auto-fallback if in use) |
|
|
149
|
+
|
|
150
|
+
## Features
|
|
151
|
+
|
|
152
|
+
### Project Merging
|
|
153
|
+
|
|
154
|
+
When you have related projects (e.g. a web app and its mobile companion), shipfolio lets you merge them into a single portfolio entry. Tech stacks, commit histories, and READMEs are combined automatically, and update detection now tracks every merged project path instead of only the first one.
|
|
155
|
+
|
|
156
|
+
### Featured Projects And Case Studies
|
|
157
|
+
|
|
158
|
+
You can mark projects as featured and optionally add richer case-study inputs such as audience, problem, solution, impact, evidence, and screenshot URLs. These fields are passed directly into the generation prompt so the resulting site can emphasize your strongest work instead of flattening every project into the same card style.
|
|
120
159
|
|
|
121
|
-
|
|
160
|
+
### Draft Recovery
|
|
122
161
|
|
|
123
|
-
|
|
162
|
+
If the process crashes or you cancel after the interview step, your answers are saved to `~/.shipfolio/draft.json`. Next time you run shipfolio, it offers to restore them.
|
|
124
163
|
|
|
125
|
-
|
|
164
|
+
### i18n
|
|
165
|
+
|
|
166
|
+
The CLI detects your system locale. Chinese (zh-CN, zh-TW) users see Chinese prompts; everyone else sees English.
|
|
167
|
+
|
|
168
|
+
### Custom Domain
|
|
169
|
+
|
|
170
|
+
During the deploy step, you can specify a custom domain. For Vercel, it is configured automatically via `vercel domains add`. For Cloudflare Pages, shipfolio prints a direct link to the dashboard with instructions.
|
|
171
|
+
|
|
172
|
+
### GitHub Auto-Deploy
|
|
173
|
+
|
|
174
|
+
After deployment, shipfolio can create a GitHub repo and add a `.github/workflows/deploy.yml` that redeploys on every push. You just need to add one or two secrets to the repo:
|
|
175
|
+
|
|
176
|
+
**Cloudflare Pages:**
|
|
177
|
+
```bash
|
|
178
|
+
gh secret set CLOUDFLARE_API_TOKEN
|
|
179
|
+
gh secret set CLOUDFLARE_ACCOUNT_ID
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Vercel:**
|
|
183
|
+
```bash
|
|
184
|
+
gh secret set VERCEL_TOKEN
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Generated Site Stack
|
|
188
|
+
|
|
189
|
+
- Next.js 15 (App Router, static export `output: 'export'`)
|
|
126
190
|
- Tailwind CSS v4
|
|
127
191
|
- shadcn/ui components
|
|
128
192
|
- TypeScript
|
|
129
193
|
- Responsive (desktop + tablet + mobile)
|
|
130
194
|
- Print-optimized CSS for PDF export
|
|
195
|
+
- Build output: static `out/` directory
|
|
131
196
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
## Deployment
|
|
197
|
+
## Deployment Platforms
|
|
135
198
|
|
|
136
199
|
### Cloudflare Pages
|
|
137
200
|
|
|
138
|
-
|
|
201
|
+
No CLI pre-install needed. On first run, `npx wrangler login` opens a browser for authentication. The project is auto-created. Your site gets a `<project-name>.pages.dev` URL.
|
|
139
202
|
|
|
140
203
|
Free tier: unlimited sites, 500 builds/month, unlimited bandwidth.
|
|
141
204
|
|
|
142
205
|
### Vercel
|
|
143
206
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
### GitHub Auto-Deploy
|
|
147
|
-
|
|
148
|
-
After initial deployment, the tool optionally sets up a GitHub repo. Connect it to Cloudflare Pages or Vercel for push-to-deploy.
|
|
149
|
-
|
|
150
|
-
## Project Structure
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
shipfolio/
|
|
154
|
-
src/
|
|
155
|
-
scanner/ -- Git repo detection, tech stack extraction
|
|
156
|
-
interviewer/ -- Interactive CLI prompts
|
|
157
|
-
spec/ -- Spec builder, diff computation
|
|
158
|
-
orchestrator/ -- AI engine dispatch (Claude/Codex/v0)
|
|
159
|
-
deployer/ -- Cloudflare Pages, Vercel, GitHub
|
|
160
|
-
pdf/ -- Playwright PDF export
|
|
161
|
-
commands/ -- CLI command handlers
|
|
162
|
-
utils/ -- Logger, exec, fs helpers
|
|
163
|
-
prompts/ -- AI prompt templates
|
|
164
|
-
bin/ -- CLI entry point
|
|
165
|
-
```
|
|
207
|
+
No CLI pre-install needed. On first run, `npx vercel login` opens a browser for authentication. Your site gets a `<project-name>.vercel.app` URL.
|
|
166
208
|
|
|
167
209
|
## Links
|
|
168
210
|
|
|
169
211
|
- GitHub: [github.com/Octo-o-o-o/shipfolio](https://github.com/Octo-o-o-o/shipfolio)
|
|
170
|
-
- npm:
|
|
212
|
+
- npm: [npmjs.com/package/shipfolio](https://www.npmjs.com/package/shipfolio)
|
|
171
213
|
- Issues: [github.com/Octo-o-o-o/shipfolio/issues](https://github.com/Octo-o-o-o/shipfolio/issues)
|
|
172
214
|
|
|
173
215
|
## License
|
|
@@ -180,7 +222,7 @@ MIT
|
|
|
180
222
|
|
|
181
223
|
## shipfolio 是什么?
|
|
182
224
|
|
|
183
|
-
一个 CLI 工具,将你本地的项目转化为个人作品集网站。它扫描你的 git 仓库,使用你本地的 AI 工具(Claude Code、Codex 或 v0
|
|
225
|
+
一个 CLI 工具,将你本地的项目转化为个人作品集网站。它扫描你的 git 仓库,使用你本地的 AI 工具(Claude Code、Codex 或 v0)生成生产级 Next.js 网站,并一键部署到 Cloudflare Pages 或 Vercel。
|
|
184
226
|
|
|
185
227
|
为快速交付项目但没时间做作品集的开发者而建。
|
|
186
228
|
|
|
@@ -190,12 +232,12 @@ MIT
|
|
|
190
232
|
npx shipfolio --scan ~/Projects
|
|
191
233
|
```
|
|
192
234
|
|
|
193
|
-
|
|
235
|
+
工具会以交互方式引导你完成所有步骤:项目选择、个人信息、设计偏好、部署。
|
|
194
236
|
|
|
195
237
|
## 前置条件
|
|
196
238
|
|
|
197
239
|
- Node.js >= 18
|
|
198
|
-
-
|
|
240
|
+
- 至少一个 AI 引擎:
|
|
199
241
|
|
|
200
242
|
| 引擎 | 安装方式 | 说明 |
|
|
201
243
|
|---|---|---|
|
|
@@ -203,126 +245,185 @@ npx shipfolio --scan ~/Projects
|
|
|
203
245
|
| Codex | `npm install -g @openai/codex` | 备选。 |
|
|
204
246
|
| v0 | 设置 `V0_API_KEY` 环境变量 | UI 设计质量最佳。需要 v0 付费订阅。在 [v0.dev](https://v0.dev) 获取 API key。 |
|
|
205
247
|
|
|
206
|
-
|
|
248
|
+
不需要预装 `wrangler` 或 `vercel` CLI -- shipfolio 通过 `npx` 自动调用。
|
|
249
|
+
|
|
250
|
+
## 命令
|
|
207
251
|
|
|
208
|
-
###
|
|
252
|
+
### 生成新网站
|
|
209
253
|
|
|
210
254
|
```bash
|
|
211
|
-
# 交互模式(首次使用推荐)
|
|
212
255
|
npx shipfolio --scan ~/Projects
|
|
213
|
-
|
|
214
|
-
#
|
|
215
|
-
npx shipfolio --scan ~/Projects --
|
|
256
|
+
npx shipfolio --scan ~/Projects --output ./my-site
|
|
257
|
+
npx shipfolio --scan ~/Projects --engine claude --deploy cloudflare --style dark-minimal --accent '#10b981'
|
|
258
|
+
npx shipfolio --scan ~/Projects --auto --no-pdf
|
|
259
|
+
npx shipfolio --scan ~/Projects --no-pdf --no-preview
|
|
216
260
|
```
|
|
217
261
|
|
|
218
|
-
|
|
219
|
-
1.
|
|
220
|
-
2.
|
|
221
|
-
3.
|
|
222
|
-
4.
|
|
223
|
-
5.
|
|
224
|
-
6.
|
|
225
|
-
7. 部署到选定平台
|
|
226
|
-
|
|
227
|
-
输出目录: `./shipfolio-site/`(可通过 `--output <dir>` 修改)
|
|
262
|
+
流程:
|
|
263
|
+
1. 扫描目录中的 git 仓库(也支持没有 git 但有 package.json、Cargo.toml 等的项目)
|
|
264
|
+
2. 交互式问答:选择项目、可选合并相关项目(如 web + mobile)、填写个人信息、选择主题/颜色/字体,并可为重点项目补充更完整的案例信息
|
|
265
|
+
3. 调用本地 AI 引擎生成网站
|
|
266
|
+
4. 构建、本地预览、导出 PDF
|
|
267
|
+
5. 部署到 Cloudflare Pages 或 Vercel
|
|
268
|
+
6. 可选创建 GitHub 仓库并配置 CI/CD workflow,实现 push 自动部署
|
|
228
269
|
|
|
229
|
-
###
|
|
270
|
+
### 更新已有网站
|
|
230
271
|
|
|
231
272
|
```bash
|
|
273
|
+
npx shipfolio update --site ./shipfolio-site
|
|
232
274
|
npx shipfolio update --site ./shipfolio-site --scan ~/Projects
|
|
233
275
|
```
|
|
234
276
|
|
|
235
|
-
|
|
277
|
+
检测新增/变更/移除的项目,增量更新。保留现有设计、布局和自定义修改。
|
|
236
278
|
|
|
237
|
-
###
|
|
279
|
+
### 仅生成 Spec
|
|
238
280
|
|
|
239
|
-
|
|
281
|
+
在 Claude Code 或 Codex 会话中使用:
|
|
240
282
|
|
|
241
283
|
```bash
|
|
242
284
|
npx shipfolio spec --scan ~/Projects --output ./
|
|
243
285
|
```
|
|
244
286
|
|
|
245
|
-
输出 `shipfolio-spec.json` 和 `shipfolio-prompt.md`。将 prompt
|
|
287
|
+
输出 `shipfolio-spec.json` 和 `shipfolio-prompt.md`。将 prompt 输入 AI 会话即可直接生成网站。
|
|
246
288
|
|
|
247
|
-
###
|
|
289
|
+
### 部署
|
|
248
290
|
|
|
249
291
|
```bash
|
|
250
292
|
npx shipfolio deploy --site ./shipfolio-site --platform cloudflare
|
|
251
293
|
npx shipfolio deploy --site ./shipfolio-site --platform vercel
|
|
252
294
|
```
|
|
253
295
|
|
|
254
|
-
###
|
|
296
|
+
### 导出 PDF
|
|
255
297
|
|
|
256
298
|
```bash
|
|
257
299
|
npx shipfolio pdf --site ./shipfolio-site
|
|
258
300
|
```
|
|
259
301
|
|
|
260
|
-
需要 Playwright
|
|
302
|
+
需要 Playwright: `npx playwright install chromium`
|
|
261
303
|
|
|
262
|
-
###
|
|
304
|
+
### 本地预览
|
|
263
305
|
|
|
264
306
|
```bash
|
|
265
|
-
npx shipfolio preview --site ./shipfolio-site
|
|
307
|
+
npx shipfolio preview --site ./shipfolio-site --port 3000
|
|
266
308
|
```
|
|
267
309
|
|
|
268
|
-
##
|
|
310
|
+
## CLI 参考
|
|
311
|
+
|
|
312
|
+
### `shipfolio init`(默认命令)
|
|
269
313
|
|
|
270
|
-
|
|
|
314
|
+
| 参数 | 说明 | 默认值 |
|
|
315
|
+
|---|---|---|
|
|
316
|
+
| `-s, --scan <dirs...>` | 扫描目录 | 当前目录 |
|
|
317
|
+
| `-e, --engine <name>` | `claude`、`codex` 或 `v0` | 自动检测 |
|
|
318
|
+
| `-d, --deploy <platform>` | `cloudflare`、`vercel` 或 `local` | 交互选择 |
|
|
319
|
+
| `--style <theme>` | `dark-minimal`、`light-clean`、`monochrome` 或 `custom` | 交互选择 |
|
|
320
|
+
| `--accent <hex>` | 强调色,如 `#10b981` | 交互选择 |
|
|
321
|
+
| `--auto` | 使用安全默认值并跳过问答 | `false` |
|
|
322
|
+
| `-o, --output <dir>` | 输出目录 | `./shipfolio-site` |
|
|
323
|
+
| `--no-pdf` | 跳过 PDF 导出 | |
|
|
324
|
+
| `--no-preview` | 跳过本地预览 | |
|
|
325
|
+
|
|
326
|
+
### `shipfolio update`
|
|
327
|
+
|
|
328
|
+
| 参数 | 说明 |
|
|
271
329
|
|---|---|
|
|
272
|
-
|
|
|
273
|
-
|
|
|
274
|
-
| `
|
|
275
|
-
| `
|
|
276
|
-
| `
|
|
277
|
-
| `shipfolio preview --site <path>` | 启动本地预览服务器 |
|
|
330
|
+
| `--site <path>` | 已有网站目录(必填) |
|
|
331
|
+
| `-s, --scan <dirs...>` | 扫描目录 |
|
|
332
|
+
| `--no-pdf` | 跳过 PDF 导出 |
|
|
333
|
+
| `--no-preview` | 跳过预览 |
|
|
334
|
+
| `--no-deploy` | 跳过部署 |
|
|
278
335
|
|
|
279
|
-
|
|
336
|
+
### `shipfolio deploy`
|
|
280
337
|
|
|
281
|
-
| 参数 |
|
|
282
|
-
|
|
283
|
-
| `--
|
|
284
|
-
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
|
289
|
-
|
|
290
|
-
|
|
|
291
|
-
|
|
|
338
|
+
| 参数 | 说明 |
|
|
339
|
+
|---|---|
|
|
340
|
+
| `--site <path>` | 网站目录(必填) |
|
|
341
|
+
| `-p, --platform <name>` | `cloudflare` 或 `vercel` |
|
|
342
|
+
|
|
343
|
+
### `shipfolio spec`
|
|
344
|
+
|
|
345
|
+
| 参数 | 说明 |
|
|
346
|
+
|---|---|
|
|
347
|
+
| `-s, --scan <dirs...>` | 扫描目录 |
|
|
348
|
+
| `-o, --output <dir>` | Spec 文件输出目录 |
|
|
349
|
+
|
|
350
|
+
### `shipfolio pdf`
|
|
351
|
+
|
|
352
|
+
| 参数 | 说明 |
|
|
353
|
+
|---|---|
|
|
354
|
+
| `--site <path>` | 网站目录(必填) |
|
|
355
|
+
| `-o, --output <path>` | PDF 输出路径 |
|
|
356
|
+
|
|
357
|
+
### `shipfolio preview`
|
|
358
|
+
|
|
359
|
+
| 参数 | 说明 |
|
|
360
|
+
|---|---|
|
|
361
|
+
| `--site <path>` | 网站目录(必填) |
|
|
362
|
+
| `--port <port>` | 端口号(默认 3000,占用时自动切换) |
|
|
363
|
+
|
|
364
|
+
## 功能特性
|
|
365
|
+
|
|
366
|
+
### 项目合并
|
|
367
|
+
|
|
368
|
+
当你有关联项目时(如 web 端和 mobile 端),shipfolio 支持将它们合并为一个作品集条目。技术栈、提交历史和 README 会自动合并;更新检测也会追踪所有被合并项目的路径,不再只看第一个目录。
|
|
292
369
|
|
|
293
|
-
|
|
370
|
+
### 重点项目与案例信息
|
|
294
371
|
|
|
295
|
-
|
|
372
|
+
你可以把项目标记为重点项目,并可选补充 audience、problem、solution、impact、evidence、screenshot URL 等案例信息。这些结构化字段会直接进入生成 prompt,让最终网站更容易突出真正重要的作品,而不是把所有项目都做成同一种平铺卡片。
|
|
296
373
|
|
|
297
|
-
|
|
374
|
+
### 草稿恢复
|
|
375
|
+
|
|
376
|
+
如果流程中断或在问答环节后崩溃,你的回答会保存到 `~/.shipfolio/draft.json`。下次运行时会询问是否恢复。
|
|
377
|
+
|
|
378
|
+
### 多语言
|
|
379
|
+
|
|
380
|
+
CLI 自动检测系统语言。简体中文和繁体中文用户看到中文提示,其他语言看到英文。
|
|
381
|
+
|
|
382
|
+
### 自定义域名
|
|
383
|
+
|
|
384
|
+
部署时可指定自定义域名。Vercel 通过 `vercel domains add` 自动配置。Cloudflare Pages 会打印 dashboard 直链和操作指引。
|
|
385
|
+
|
|
386
|
+
### GitHub 自动部署
|
|
387
|
+
|
|
388
|
+
部署后,shipfolio 可创建 GitHub 仓库并添加 `.github/workflows/deploy.yml`,每次 push 自动重新部署。只需在仓库中添加 secrets:
|
|
389
|
+
|
|
390
|
+
**Cloudflare Pages:**
|
|
391
|
+
```bash
|
|
392
|
+
gh secret set CLOUDFLARE_API_TOKEN
|
|
393
|
+
gh secret set CLOUDFLARE_ACCOUNT_ID
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
**Vercel:**
|
|
397
|
+
```bash
|
|
398
|
+
gh secret set VERCEL_TOKEN
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
## 生成的网站技术栈
|
|
402
|
+
|
|
403
|
+
- Next.js 15 (App Router, 静态导出 `output: 'export'`)
|
|
298
404
|
- Tailwind CSS v4
|
|
299
405
|
- shadcn/ui 组件
|
|
300
406
|
- TypeScript
|
|
301
|
-
-
|
|
302
|
-
-
|
|
303
|
-
|
|
304
|
-
构建输出为纯静态的 `out/` 目录,可部署到任何静态托管平台。
|
|
407
|
+
- 响应式(桌面 + 平板 + 移动端)
|
|
408
|
+
- PDF 导出优化的打印样式
|
|
409
|
+
- 构建产物:纯静态 `out/` 目录
|
|
305
410
|
|
|
306
|
-
##
|
|
411
|
+
## 部署平台
|
|
307
412
|
|
|
308
413
|
### Cloudflare Pages
|
|
309
414
|
|
|
310
|
-
|
|
415
|
+
不需要预装 CLI。首次运行时 `npx wrangler login` 会打开浏览器进行认证。项目自动创建。网站获得 `<项目名>.pages.dev` 域名。
|
|
311
416
|
|
|
312
417
|
免费额度: 无限站点,500 次构建/月,无限带宽。
|
|
313
418
|
|
|
314
419
|
### Vercel
|
|
315
420
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
### GitHub 自动部署
|
|
319
|
-
|
|
320
|
-
初始部署后,工具可选择性地创建 GitHub 仓库。将仓库连接到 Cloudflare Pages 或 Vercel 即可实现 push 自动部署。
|
|
421
|
+
不需要预装 CLI。首次运行时 `npx vercel login` 会打开浏览器进行认证。网站获得 `<项目名>.vercel.app` 域名。
|
|
321
422
|
|
|
322
423
|
## 相关链接
|
|
323
424
|
|
|
324
425
|
- GitHub: [github.com/Octo-o-o-o/shipfolio](https://github.com/Octo-o-o-o/shipfolio)
|
|
325
|
-
- npm:
|
|
426
|
+
- npm: [npmjs.com/package/shipfolio](https://www.npmjs.com/package/shipfolio)
|
|
326
427
|
- 问题反馈: [github.com/Octo-o-o-o/shipfolio/issues](https://github.com/Octo-o-o-o/shipfolio/issues)
|
|
327
428
|
|
|
328
429
|
## 许可证
|