starpak 0.1.4 → 0.1.5-patch.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.md CHANGED
@@ -1,20 +1,21 @@
1
1
  # starpak ✨
2
2
 
3
- > Universal package manager, but not just packages!
3
+ > Software engineering IDE — cd in, the rest is automatic
4
4
 
5
5
  [中文文档](./README.zh.md)
6
6
 
7
- **starpak** is an intent-driven universal deployment tool. One command turns any code (local project, GitHub repo, system package) into a running service.
7
+ **starpak** is evolving from a universal package manager into a **software engineering IDE**. One command turns any code (local project, system package) into a running service — with a Web UI on the way.
8
8
 
9
9
  ```
10
10
  cd ./my-project && starpak install # install deps
11
11
  starpak start # run it
12
12
  starpak stop # stop it
13
- starpak enable # systemd auto-start
13
+ starpak status # check status
14
+ starpak logs # view logs
14
15
  starpak build # compile
15
- starpak search <query> # search GitHub repos
16
+ starpak web # start Web UI (coming soon)
16
17
  starpak install -s nginx # install system package
17
- starpak test install # dry-run install
18
+ starpak search <query> # search GitHub repos
18
19
  starpak remove me # uninstall starpak itself
19
20
  ```
20
21
 
@@ -24,7 +25,7 @@ starpak remove me # uninstall starpak itself
24
25
  2. **Auto install** — installs deps, runs build, no manual config
25
26
  3. **Zero-config start** — `cd` into the project and `starpak start`, it just works
26
27
  4. **Multi-project** — detects frontend + backend separation, starts all sub-projects
27
- 5. **Startup scripts** — prioritizes `start.sh` / `run.sh` over default entry points
28
+ 5. **Web UI** — manage projects, view logs, control services from your browser (in development)
28
29
 
29
30
  ## Install
30
31
 
@@ -49,15 +50,16 @@ npm install -g starpak
49
50
  | `build -r` | Rebuild (clean + build) |
50
51
  | `remove -s <pkg>` | Remove a system package |
51
52
  | `search <query>` | Search GitHub repositories |
53
+ | `web` | Start Web management UI (coming soon) |
52
54
  | `test install` | Dry-run install (show detection without executing) |
53
55
 
54
56
  ## Philosophy
55
57
 
56
58
  - **cd in, the rest is automatic** — one command is all you need
57
- - **No database, no tracking** — lives in your project directory, like npm
59
+ - **Web + CLI dual mode** — manage projects from terminal or browser
58
60
  - **Adapt, don't replace** — stands on top of apt/npm/make/systemd, doesn't reinvent them
59
61
  - **Easter egg** — `starpak remove me` uninstalls itself
60
62
 
61
63
  ## License
62
64
 
63
- Apache-2.0
65
+ Apache-2.0 — v0.1.5
package/README.zh.md CHANGED
@@ -1,20 +1,21 @@
1
1
  # starpak ✨
2
2
 
3
- > 全能的包管理,但不只是管理包!
3
+ > 软件工程 IDE — cd 进去,剩下的自动完成
4
4
 
5
5
  [English](./README.md)
6
6
 
7
- **starpak** 是一个意图驱动的万能部署工具。一个命令就能把任何代码变成运行中的服务。
7
+ **starpak** 正在从一个万能包管理工具向**软件工程 IDE** 进化。一个命令就能把任何代码变成运行中的服务——Web 面板也在路上了。
8
8
 
9
9
  ```
10
10
  cd ./my-project && starpak install # 安装依赖
11
11
  starpak start # 启动项目
12
12
  starpak stop # 停止项目
13
- starpak enable # 配置 systemd 开机自启
13
+ starpak status # 查看状态
14
+ starpak logs # 查看日志
14
15
  starpak build # 构建项目
15
- starpak search <关键词> # 搜索 GitHub 仓库
16
+ starpak web # 启动 Web 面板(即将推出)
16
17
  starpak install -s nginx # 安装系统包
17
- starpak test install # 模拟安装(不真执行)
18
+ starpak search <关键词> # 搜索 GitHub 仓库
18
19
  starpak remove me # 卸载 starpak 自己
19
20
  ```
20
21
 
@@ -24,7 +25,7 @@ starpak remove me # 卸载 starpak 自己
24
25
  2. **自动安装** — 安装依赖、执行构建,无需手动配置
25
26
  3. **零配置启动** — `cd` 进项目目录,`starpak start` 就能跑
26
27
  4. **多项目支持** — 自动识别前后端分离项目,启动所有子服务
27
- 5. **启动脚本优先**检测到 `start.sh` / `run.sh` 时优先使用
28
+ 5. **Web 面板** 在浏览器中管理项目、查看日志、控制服务(开发中)
28
29
 
29
30
  ## 安装
30
31
 
@@ -49,15 +50,16 @@ npm install -g starpak
49
50
  | `build -r` | 重新构建(先清理再构建) |
50
51
  | `remove -s <包名>` | 卸载系统包 |
51
52
  | `search <关键词>` | 搜索 GitHub 仓库 |
53
+ | `web` | 启动 Web 管理面板(即将推出) |
52
54
  | `test install` | 模拟安装(显示分析结果,不真执行) |
53
55
 
54
56
  ## 设计哲学
55
57
 
56
58
  - **cd 进去,剩下的自动完成** — 一个命令就够了
57
- - **无数据库,无追踪** 活在项目目录里,像 npm 一样
59
+ - **Web + CLI 双模** — 终端或浏览器都能管理项目
58
60
  - **适配而非替代** — 站在 apt/npm/make/systemd 之上,不重复造轮子
59
61
  - **彩蛋** — `starpak remove me` 卸载 starpak 自己
60
62
 
61
63
  ## 许可证
62
64
 
63
- Apache-2.0
65
+ Apache-2.0 — v0.1.5
@@ -5495,7 +5495,7 @@ var zh = {
5495
5495
  "cmd.help.desc": "\u7785\u7785\u548B\u7528",
5496
5496
  "app.name": "starpak \u2728",
5497
5497
  "app.desc": "\u8BF6\u563F\uFF0C\u628A\u4F60\u4EE3\u7801\u53D8\u6210\u670D\u52A1\u7684\u9B54\u6CD5\u68D2\uFF5E cd \u8FDB\u53BB\uFF0C\u5269\u4E0B\u7684\u4EA4\u7ED9\u6211",
5498
- "app.version": "0.1.4",
5498
+ "app.version": "0.1.5-patch.1",
5499
5499
  "help.usage.hint": "\u5514\u2026 \u7528 starpak --help \u770B\u770B\u6211\u80FD\u5E72\u5565\u5427",
5500
5500
  "cmd.install.desc": "\u5440\uFF0C\u88C5\u70B9\u5565\u597D\u4E1C\u897F\uFF1F",
5501
5501
  "cmd.install.arg.target": "\u9879\u76EE\u76EE\u5F55\u3001GitHub \u4ED3\u5E93\u6216\u5305\u540D\u5566",
@@ -5551,6 +5551,7 @@ var zh = {
5551
5551
  "cmd.remove.fail": "\u5378\u4E0D\u6389\u8BF6: {msg}",
5552
5552
  "cmd.web.desc": "\u6253\u5F00 Web \u7BA1\u7406\u9762\u677F",
5553
5553
  "cmd.web.coming": "StarPak API \u6B63\u5728\u542F\u52A8...",
5554
+ "cmd.web.fail": "\u542F\u52A8 Web \u670D\u52A1\u5668\u5931\u8D25: {msg}",
5554
5555
  "cmd.test.desc": "\u6A21\u62DF\u6267\u884C\u547D\u4EE4",
5555
5556
  "cmd.test.arg.command": "\u5B50\u547D\u4EE4: install/start/stop/restart/enable/disable/remove/list/status",
5556
5557
  "cmd.search.desc": "\u641C\u7D22 GitHub \u4ED3\u5E93",
@@ -5562,7 +5563,7 @@ var en = {
5562
5563
  "cmd.help.desc": "Show help",
5563
5564
  "app.name": "starpak \u2728",
5564
5565
  "app.desc": "A lil magic wand that turns your code into services~ cd in, leave the rest to me",
5565
- "app.version": "0.1.4",
5566
+ "app.version": "0.1.5-patch.1",
5566
5567
  "help.usage.hint": "Hmm... try starpak --help to see what I can do~",
5567
5568
  "cmd.install.desc": "Install something nice",
5568
5569
  "cmd.install.arg.target": "Project dir, GitHub repo, or package name",
@@ -14443,6 +14444,16 @@ async function installFromDir(dir, _name, options = {}) {
14443
14444
  return detection;
14444
14445
  }
14445
14446
 
14447
+ // core/db/index.ts
14448
+ var import_better_sqlite3 = __toESM(require("better-sqlite3"), 1);
14449
+ var import_path4 = require("path");
14450
+ var import_os2 = require("os");
14451
+ var STARPAK_DIR2 = (0, import_path4.join)((0, import_os2.homedir)(), ".starpak");
14452
+ var DB_PATH = (0, import_path4.join)(STARPAK_DIR2, "starpak.db");
14453
+
14454
+ // core/config/store.ts
14455
+ var import_conf = __toESM(require("conf"), 1);
14456
+
14446
14457
  // cli/commands/test/command.ts
14447
14458
  async function run12(command, args) {
14448
14459
  switch (command) {
@@ -14454,6 +14465,19 @@ async function run12(command, args) {
14454
14465
  }
14455
14466
  }
14456
14467
 
14468
+ // cli/commands/web/command.ts
14469
+ async function run13() {
14470
+ console.log("\u542F\u52A8 Web \u7BA1\u7406\u9762\u677F...");
14471
+ try {
14472
+ const { startServer } = await import("../../server/index.js");
14473
+ await startServer();
14474
+ } catch (err) {
14475
+ const msg = err instanceof Error ? err.message : String(err);
14476
+ console.error(`\u542F\u52A8 Web \u670D\u52A1\u5668\u5931\u8D25: ${msg}`);
14477
+ process.exit(1);
14478
+ }
14479
+ }
14480
+
14457
14481
  // cli/index.ts
14458
14482
  var program2 = new Command();
14459
14483
  program2.name(t("app.name")).description(t("app.desc")).version(t("app.version"), "-v, --version", t("cmd.version.desc")).helpOption("-h, --help", t("cmd.help.desc")).showHelpAfterError(t("help.usage.hint")).configureOutput({
@@ -14474,4 +14498,5 @@ program2.command("build").description("\u6784\u5EFA\u9879\u76EE").argument("[tar
14474
14498
  program2.command("remove").description("\u5378\u8F7D\u7CFB\u7EDF\u5305").argument("<name>", "\u5305\u540D").option("-s, --system", "\u4F7F\u7528\u7CFB\u7EDF\u5305\u7BA1\u7406\u5668\u5378\u8F7D\uFF08apt\uFF09").action(run10);
14475
14499
  program2.command("search").description(t("cmd.search.desc")).argument("<query>", t("cmd.search.arg.query")).action(run11);
14476
14500
  program2.command("test").description(t("cmd.test.desc")).argument("<command>", t("cmd.test.arg.command")).argument("[args...]", "\u5B50\u547D\u4EE4\u7684\u53C2\u6570").action((command, args) => run12(command, args, {}));
14501
+ program2.command("web").description(t("cmd.web.desc")).action(run13);
14477
14502
  program2.parse(process.argv);
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "starpak",
3
- "version": "0.1.4",
3
+ "version": "0.1.5-patch.1",
4
4
  "private": false,
5
5
  "type": "module",
6
- "description": "Universal package manager, but not just packages! — cd in, the rest is automatic",
6
+ "description": "Software engineering IDE — cd in, the rest is automatic",
7
7
  "bin": {
8
8
  "starpak": "./cli/dist/index.cjs"
9
9
  },
10
10
  "files": [
11
11
  "cli/dist/",
12
+ "server/public/",
12
13
  "README.md",
13
14
  "README.zh.md"
14
15
  ],
@@ -32,14 +33,21 @@
32
33
  "dev": "tsx cli/index.ts"
33
34
  },
34
35
  "dependencies": {
36
+ "better-sqlite3": "^11.0.0",
35
37
  "cli-progress": "^3.12.0",
36
38
  "commander": "^13.0.0",
39
+ "conf": "^13.0.0",
37
40
  "execa": "^9.0.0",
38
- "ora": "^8.0.0"
41
+ "express": "^4.21.0",
42
+ "ora": "^8.0.0",
43
+ "ws": "^8.0.0"
39
44
  },
40
45
  "devDependencies": {
46
+ "@types/better-sqlite3": "^7.6.0",
41
47
  "@types/cli-progress": "^3.11.0",
48
+ "@types/express": "^4.17.0",
42
49
  "@types/node": "^22.0.0",
50
+ "@types/ws": "^8.5.0",
43
51
  "tsup": "^8.0.0",
44
52
  "tsx": "^4.0.0",
45
53
  "typescript": "^5.7.0"
@@ -0,0 +1,77 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>starpak Web UI</title>
7
+ <style>
8
+ * { margin: 0; padding: 0; box-sizing: border-box; }
9
+ body {
10
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
11
+ background: #0f0f0f;
12
+ color: #e0e0e0;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ min-height: 100vh;
17
+ overflow: hidden;
18
+ }
19
+ .container { text-align: center; }
20
+ .logo {
21
+ font-size: 4rem;
22
+ font-weight: 800;
23
+ letter-spacing: -0.02em;
24
+ background: linear-gradient(135deg, #a78bfa, #60a5fa);
25
+ -webkit-background-clip: text;
26
+ -webkit-text-fill-color: transparent;
27
+ background-clip: text;
28
+ margin-bottom: 0.75rem;
29
+ }
30
+ .subtitle {
31
+ font-size: 1.15rem;
32
+ color: #888;
33
+ margin-bottom: 0.5rem;
34
+ }
35
+ .tagline {
36
+ font-size: 0.9rem;
37
+ color: #555;
38
+ margin-bottom: 2.5rem;
39
+ font-style: italic;
40
+ }
41
+ .badge {
42
+ display: inline-block;
43
+ padding: 0.35rem 1rem;
44
+ border: 1px solid #2a2a2a;
45
+ border-radius: 999px;
46
+ font-size: 0.8rem;
47
+ color: #666;
48
+ }
49
+ .status-bar {
50
+ margin-top: 3rem;
51
+ display: flex;
52
+ gap: 2rem;
53
+ justify-content: center;
54
+ font-size: 0.8rem;
55
+ color: #444;
56
+ }
57
+ .status-bar span { display: flex; align-items: center; gap: 0.4rem; }
58
+ .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
59
+ .dot-green { background: #22c55e; }
60
+ .dot-yellow { background: #eab308; }
61
+ .version { margin-top: 2.5rem; font-size: 0.75rem; color: #333; }
62
+ </style>
63
+ </head>
64
+ <body>
65
+ <div class="container">
66
+ <div class="logo">starpak</div>
67
+ <p class="subtitle">Software Engineering IDE</p>
68
+ <p class="tagline">cd in, the rest is automatic</p>
69
+ <div class="badge">Web UI — Coming Soon</div>
70
+ <div class="status-bar">
71
+ <span><span class="dot dot-green"></span> API Online</span>
72
+ <span><span class="dot dot-yellow"></span> UI Building</span>
73
+ </div>
74
+ <p class="version">v0.1.5-patch.1</p>
75
+ </div>
76
+ </body>
77
+ </html>