@vibe-coder/cli 1.0.2 โ 1.0.4
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 +155 -142
- package/README.zh.md +154 -140
- package/bin/vibe +14 -14
- package/dist/cli.js +121 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,142 +1,155 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
# ๐ Vibe Coding CLI
|
|
4
|
-
|
|
5
|
-
**
|
|
6
|
-
|
|
7
|
-
[](https://github.com/HelloGGX/vibe-coding-cli)
|
|
8
|
+
[](https://www.npmjs.com/package/@vibe-coder/cli)
|
|
9
|
+
[](../../LICENSE.md)
|
|
10
|
+
[](https://bun.sh)
|
|
11
|
+
|
|
12
|
+
**English** ยท [็ฎไฝไธญๆ](https://github.com/HelloGGX/skill/blob/main/packages/vibe/README.zh.md)
|
|
13
|
+
|
|
14
|
+
> *One-click aggregation of AI tools and contextual rules, enabling Agents to truly understand your codebase architecture.*
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
## ๐ Introduction
|
|
19
|
+
|
|
20
|
+
`@vibe-coder/cli` is a modern command-line scaffolding tool built specifically for the **OpenCode** platform. Its core mission is to quickly set up a Vibe Coding development environment and simplify resource management for rule-driven development.
|
|
21
|
+
|
|
22
|
+
With the `vibe` command, you can pull TypeScript/Python tool scripts or Markdown rule files from remote GitHub repositories with a single click. These are seamlessly and automatically registered into your OpenCode configuration while managing underlying runtime dependencies, allowing you to focus entirely on **"co-creating code with AI."**
|
|
23
|
+
|
|
24
|
+
## โจ Features
|
|
25
|
+
|
|
26
|
+
* ๐ **Fully Automated Tool Management**: Rapidly parse, multi-select, and download `.ts` / `.py` scripts from any GitHub repository for out-of-the-box local usage.
|
|
27
|
+
* ๐ **Perfect Fusion of Context and Capabilities**: Innovative ecosystem aggregation that deeply binds the **tool skills** required by Agents with your **behavioral guidelines**. Supports on-demand installation of `.md` rule files, ensuring AI truly understands your architectural intent.
|
|
28
|
+
* ๐ฆ **Smart Configuration Injection**: Automatically intercepts and updates `.opencode/opencode.jsonc`, silently injecting tool toggles and prompt directive paths. Say goodbye to tedious manual configuration.
|
|
29
|
+
* โก **Blazing Fast Parallel Updates**: Designed with a concurrency model to simultaneously process resource comparisons and pulls across multiple source repositories, drastically reducing update wait times.
|
|
30
|
+
* ๐ช **Standard Skill Aggregation**: Deeply integrated with Vercel's `pnpx skills` ecosystem, allowing you to manage both standard Agent skill libraries and local extension resources within a unified CLI workflow.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## ๐ Quick Start
|
|
35
|
+
|
|
36
|
+
### Prerequisites
|
|
37
|
+
|
|
38
|
+
* [Node.js](https://nodejs.org/) >= 18.0.0 or [Bun](https://bun.sh/) >= 1.0.0
|
|
39
|
+
|
|
40
|
+
### Installation
|
|
41
|
+
|
|
42
|
+
Install globally:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Using npm
|
|
46
|
+
npm i -g @vibe-coder/cli
|
|
47
|
+
|
|
48
|
+
# Using bun
|
|
49
|
+
bun add -g @vibe-coder/cli
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Basic Usage
|
|
53
|
+
|
|
54
|
+
Initialize and add an ecosystem repository (e.g., `helloggx/skill` from this project):
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
vibe add helloggx/skill
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
*The CLI will launch an interactive menu, allowing you to flexibly multi-select the **Tools** and **Rules** you want to install, and will automatically handle all environment configurations for you.*
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## ๐ Commands
|
|
65
|
+
|
|
66
|
+
| Command | Alias | Description |
|
|
67
|
+
| --- | --- | --- |
|
|
68
|
+
| `vibe add <repo>` | `a` | Parses the target GitHub repo, launches a UI list for on-demand installation of tools/rules, and auto-injects configurations. |
|
|
69
|
+
| `vibe list` | `ls` | Prints a clear status map of all installed resources (local tools, context rules, global standard skills) in the current project. |
|
|
70
|
+
| `vibe update` | `up` | Concurrently pulls all source repositories listed in `vibe-lock.json` with one click, intelligently comparing and overwriting local scripts and rules. |
|
|
71
|
+
| `vibe remove [resource]` | `rm` | **Run without args**: Launches a UI multi-select list to delete local items.<br>
|
|
72
|
+
|
|
73
|
+
<br>
|
|
74
|
+
|
|
75
|
+
<br>**Run with args**: Quickly matches and removes specified standard skills or local tools, synchronously cleaning up configurations. |
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## ๐๏ธ Build Your Own Resource Repository
|
|
79
|
+
|
|
80
|
+
We strongly encourage you or your team to create dedicated Vibe Coding resource repositories on GitHub to standardize your team's favorite AI tools and custom coding conventions across all projects.
|
|
81
|
+
|
|
82
|
+
### Recommended Directory Structure
|
|
83
|
+
|
|
84
|
+
To ensure perfect compatibility with `@vibe-coder/cli`, we recommend adopting the following conventions (refer to `helloggx/skill`):
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
your-custom-repo/
|
|
88
|
+
โโโ skill/ # (Optional) Standard Vercel AI Agent skill library
|
|
89
|
+
โโโ tool/ # Custom TS/Python executable tools
|
|
90
|
+
โ โโโ get_dsl.ts
|
|
91
|
+
โ โโโ get_dsl.py # ๐ก Python scripts should share the same name as the TS tool calling them
|
|
92
|
+
โ โโโ shadcn_vue_init.ts
|
|
93
|
+
โโโ rules/ # Personalized Markdown context rules
|
|
94
|
+
โโโ common/ # Global common rules applicable to all projects
|
|
95
|
+
โ โโโ coding-style.md
|
|
96
|
+
โ โโโ security.md
|
|
97
|
+
โโโ typescript/ # Tech-stack specific rules
|
|
98
|
+
โโโ coding-style.md # ๐ก Recommended to share the same name as the extended common rule
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Organization Best Practices
|
|
103
|
+
|
|
104
|
+
* **Cross-language tool linkage**: If your `.ts` tool relies on an underlying `.py` script, **ensure the base names of both files are exactly the same** (e.g., `get_dsl.ts` and `get_dsl.py`). The CLI will intelligently recognize and pull them together.
|
|
105
|
+
* **Rule inheritance and extension**:
|
|
106
|
+
* Global common rules must be placed under `rules/common/`.
|
|
107
|
+
* When writing rules for a specific tech stack (e.g., `rules/typescript/`), if you need to inherit a `common` rule, it is recommended to **keep the same name** and explicitly declare the inheritance at the top of the file:
|
|
108
|
+
*> This file extends [common/coding-style.md](https://www.google.com/search?q=../common/coding-style.md) and adds TS-specific content.*
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## ๐ Workspace Structure
|
|
113
|
+
|
|
114
|
+
After running `vibe add`, the tool will automatically take over and maintain the following structure in your project's root directory:
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
your-project/
|
|
118
|
+
โโโ .opencode/
|
|
119
|
+
โ โโโ tool/ # Underlying .ts / .py tool scripts
|
|
120
|
+
โ โโโ rules/ # .md rule files (archived by category)
|
|
121
|
+
โ โโโ opencode.jsonc # Core OpenCode configuration (CLI auto-injects tool toggles & directive paths)
|
|
122
|
+
โ โโโ vibe-lock.json # State lock file, accurately recording resource origins and versions
|
|
123
|
+
โโโ .venv/ # (Created on demand) Isolated Python virtual environment
|
|
124
|
+
โโโ requirements.txt # (Maintained on demand) Python script dependency list
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## ๐ค Join the Ecosystem
|
|
131
|
+
|
|
132
|
+
If your open-source project (like Agent Skills, Tools, or Rules) is compatible with and utilizes the vibe-coding specification, you are welcome to add this exclusive badge to your `README.md` to show off your modern workflow to the community!
|
|
133
|
+
|
|
134
|
+
Copy the following Markdown code to add it to your project:
|
|
135
|
+
|
|
136
|
+
```markdown
|
|
137
|
+
[](https://github.com/HelloGGX/vibe-coding-cli)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
*(By adding the badge, you'll have the opportunity to be featured in the official Hall of Fame curated list!)*
|
|
141
|
+
|
|
142
|
+
## ๐ ๏ธ Development
|
|
143
|
+
|
|
144
|
+
This project is built on top of the blazing-fast [Bun](https://bun.sh/) runtime.
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
bun install # 1. Install dependencies
|
|
148
|
+
bun run dev --help # 2. Local debugging
|
|
149
|
+
bun run typecheck # 3. Type checking
|
|
150
|
+
bun run build # 4. Build production version (outputs to ./dist)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## ๐ License
|
|
154
|
+
|
|
155
|
+
[MIT License](https://www.google.com/search?q=../../LICENSE.md) ยฉ 2026 [HelloGGX](https://github.com/HelloGGX)
|
package/README.zh.md
CHANGED
|
@@ -1,140 +1,154 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
# ๐ Vibe Coding CLI
|
|
4
|
-
|
|
5
|
-
**ไธไธบ OpenCode ๆ้ ็ vibe coding ็ๆๆๅปบๅทฅๅ
ท**
|
|
6
|
-
|
|
7
|
-
[](https://github.com/HelloGGX/vibe-coding-cli)
|
|
8
|
+
[](https://www.npmjs.com/package/@vibe-coder/cli)
|
|
9
|
+
[](../../LICENSE.md)
|
|
10
|
+
[](https://bun.sh)
|
|
11
|
+
|
|
12
|
+
[English](https://github.com/HelloGGX/skill/blob/main/packages/vibe/README.md) ยท **็ฎไฝไธญๆ**
|
|
13
|
+
|
|
14
|
+
> *ไธ้ฎ่ๅ AI ๅทฅๅ
ทไธไธไธๆ่ง่๏ผ่ฎฉ Agent ็ๆญฃๆไฝ ็ไปฃ็ ๆถๆใ*
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
## ๐ ็ฎไป (Introduction)
|
|
19
|
+
|
|
20
|
+
`@vibe-coder/cli` ๆฏไธไธชไธไธบ **OpenCode** ๅนณๅฐๆ้ ็็ฐไปฃๅฝไปค่ก่ๆๆถๅทฅๅ
ทใๅฎ็ๆ ธๅฟ็ฎๆ ๆฏๅฟซ้ๆญๅปบ Vibe Coding ็ๅผๅ็ฏๅข๏ผ็ฎๅ่ง่้ฉฑๅจๅผๅ็่ตๆบ็ฎก็ใ
|
|
21
|
+
|
|
22
|
+
้่ฟ `vibe` ๅฝไปค๏ผไฝ ๅฏไปฅไธ้ฎๆๅ่ฟ็จ GitHub ไปๅบไธญ็ TypeScript/Python ๅทฅๅ
ท่ๆฌๆ Markdown ่งๅๆไปถ๏ผ่ชๅจๆ ็ผๆณจๅๅฐ OpenCode ้
็ฝฎไธญ๏ผๅนถๆฅ็ฎกๅบๅฑ่ฟ่กไพ่ต๏ผ่ฎฉไฝ ไธๆณจไบ**โไธ AI ๅ
ฑๅไปฃ็ โ**ๆฌ่บซใ
|
|
23
|
+
|
|
24
|
+
## โจ ๆ ธๅฟ็นๆง (Features)
|
|
25
|
+
|
|
26
|
+
- ๐ **ๅ
จ่ชๅจๅๅทฅๅ
ท็ฎก็**: ๆฏๆไปไปปๆ GitHub ไปๅบๅฟซ้่งฃๆใๅค้ๅนถไธ่ฝฝ `.ts` / `.py` ่ๆฌ่ณๆฌๅฐๅผ็ฎฑๅณ็จใ
|
|
27
|
+
- ๐ **Context ไธ Capabilities ๅฎ็พ่ๅ**: ็ฌๅ็ๆ่ๅ่ฝๅ๏ผๅฐ Agent ๆง่กๆ้็**ๅทฅๅ
ทๆ่ฝ**ไธ**่กไธบๅๅ**ๆทฑๅบฆ็ปๅฎใๆฏๆๆ้ๅฎ่ฃ
`.md` ่งๅๆไปถ๏ผ่ฎฉ AI ็ๆญฃๆไฝ ็ๆถๆๆๅพใ
|
|
28
|
+
- ๐ฆ **ๆบ่ฝ้
็ฝฎๆณจๅ
ฅ**: ่ชๅจๆฆๆชๅนถๆดๆฐ `.opencode/opencode.jsonc`๏ผๆ ๆๆณจๅ
ฅๅทฅๅ
ทๅผๅ
ณไธ Prompt ๆไปค่ทฏๅพ๏ผๅๅซ็น็็ๆๅจ้
็ฝฎใ
|
|
29
|
+
- โก **ๅนถ่กๆ้ๆดๆฐ**: ๅบไบๅนถๅๆจกๅ่ฎพ่ฎก๏ผๅๆถๅค็ๅคไธชๆบไปๅบ็่ตๆบๅฏนๆฏไธๆๅ๏ผๅคงๅน
็ผฉ็ญๆดๆฐ็ญๅพ
ๆถ้ดใ
|
|
30
|
+
- ๐ช **ๆ ๅๆ่ฝ่ๅ**: ไธ Vercel ็ `pnpx skills` ็ๆๆทฑๅบฆ้ๆ๏ผๅจ็ปไธ็ CLI ๆต็จไธญๅๆถ็ฎก็ๆ ๅ Agent ๆ่ฝๅบๅๆฌๅฐๆฉๅฑ่ตๆบใ
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## ๐ ๅฟซ้ๅผๅง (Quick Start)
|
|
35
|
+
|
|
36
|
+
### ็ฏๅข่ฆๆฑ (Prerequisites)
|
|
37
|
+
- [Node.js](https://nodejs.org/) >= 18.0.0 ๆ [Bun](https://bun.sh/) >= 1.0.0
|
|
38
|
+
|
|
39
|
+
### ๅฎ่ฃ
|
|
40
|
+
|
|
41
|
+
ไฝไธบๅ
จๅฑๅ
ๅฎ่ฃ
๏ผ
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# ไฝฟ็จ npm
|
|
45
|
+
npm i -g @vibe-coder/cli
|
|
46
|
+
|
|
47
|
+
# ไฝฟ็จ bun
|
|
48
|
+
bun add -g @vibe-coder/cli
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### ๅบ็ก็จๆณ
|
|
52
|
+
|
|
53
|
+
ๅๅงๅๅนถๆทปๅ ไธไธช็ๆๅบ๏ผไพๅฆๆฌ้กน็ฎ็ `helloggx/skill`๏ผ๏ผ
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
vibe add helloggx/skill
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
*CLI ๅฐๅค่ตทไบคไบๅผ่ๅ๏ผๅ
่ฎธไฝ ็ตๆดปๅค้ๆณ่ฆๅฎ่ฃ
็ **Tools (ๅทฅๅ
ท)** ๅ **Rules (่งๅ)**๏ผๅนถ่ชๅจไธบไฝ ๅฎๆๆๆ็ฏๅข้
็ฝฎใ*
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## ๐ ๅฝไปคๆๅ (Commands)
|
|
64
|
+
|
|
65
|
+
| ๅฝไปค | ๅซๅ | ๅ่ฝๆ่ฟฐ |
|
|
66
|
+
| --- | --- | --- |
|
|
67
|
+
| `vibe add <repo>` | `a` | ่งฃๆ็ฎๆ GitHub ไปๅบ๏ผๅค่ตท UI ๅ่กจ๏ผๆ้ๅฎ่ฃ
ๅทฅๅ
ทๅ่งๅๆไปถ๏ผๅนถ่ชๅจๆณจๅ
ฅ้
็ฝฎใ |
|
|
68
|
+
| `vibe list` | `ls` | ๆธ
ๆฐๆๅฐๅฝๅ้กน็ฎไธญๆๆๅทฒๅฎ่ฃ
่ตๆบ๏ผๆฌๅฐๅทฅๅ
ทใไธไธๆ่งๅใๅ
จๅฑๆ ๅๆ่ฝ๏ผ็ๆๅฟๅพใ |
|
|
69
|
+
| `vibe update` | `up` | ไธ้ฎๅนถๅๆๅ `vibe-lock.json` ไธญ็ๆๆๆบไปๅบ๏ผๆบ่ฝๆฏๅฏนๅนถ่ฆ็ๆฌๅฐ่ๆฌไธ่งๅใ |
|
|
70
|
+
| `vibe remove [่ตๆบ]` | `rm` | **ๆ ๅ่ฟ่ก**๏ผๅค่ตท UI ๅค้ๅ่กจๅ ้คๆฌๅฐ้กนใ<br>
|
|
71
|
+
|
|
72
|
+
<br>**ๅธฆๅ่ฟ่ก**๏ผๅฟซๆทๅน้
ๅนถ็งป้คๆๅฎ็ๆ ๅๆ่ฝๆๆฌๅฐๅทฅๅ
ท๏ผๅนถๅๆญฅๆธ
็้
็ฝฎใ |
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## ๐๏ธ ๆๅปบไฝ ่ชๅทฑ็่ตๆบไปๅบ
|
|
77
|
+
|
|
78
|
+
ๆไปฌๅผบ็้ผๅฑไฝ ๆๅข้ๅจ GitHub ไธๅๅปบไธๅฑ็ Vibe Coding ่ตๆบไปๅบ๏ผไปฅๅจๆๆ้กน็ฎไธญๆ ๅๅๅข้ๆๅๆฌข็ AI ๅทฅๅ
ทๅ่ชๅฎไน็ผ็ ่ง่ใ
|
|
79
|
+
|
|
80
|
+
### ๆจ่็ฎๅฝ็ปๆ
|
|
81
|
+
|
|
82
|
+
ไธบ็กฎไฟไธ `@vibe-coder/cli` ๅฎ็พๅ
ผๅฎน๏ผๆจ่้็จไปฅไธ็บฆๅฎ๏ผๅฏๅ่ `helloggx/skill`๏ผ๏ผ
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
your-custom-repo/
|
|
86
|
+
โโโ skill/ # (ๅฏ้) ๆ ๅ็ Vercel AI Agent ๆ่ฝๅบ
|
|
87
|
+
โโโ tool/ # ่ชๅฎไน TS/Python ๅฏๆง่กๅทฅๅ
ท
|
|
88
|
+
โ โโโ get_dsl.ts
|
|
89
|
+
โ โโโ get_dsl.py # ๐ก Python ่ๆฌๅบไธๅ
ถ่ฐ็จ็ TS ๅทฅๅ
ทๅๅ
|
|
90
|
+
โ โโโ shadcn_vue_init.ts
|
|
91
|
+
โโโ rules/ # ไธชๆงๅ Markdown ไธไธๆ่งๅ
|
|
92
|
+
โโโ common/ # ้็จไบๆๆ้กน็ฎ็ๅ
จๅฑ้็จ่งๅ
|
|
93
|
+
โ โโโ coding-style.md
|
|
94
|
+
โ โโโ security.md
|
|
95
|
+
โโโ typescript/ # ็นๅฎๆๆฏๆ ่งๅ
|
|
96
|
+
โโโ coding-style.md # ๐ก ๅปบ่ฎฎไธ่ขซๆฉๅฑ็้็จ่งๅๅๅ
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### ็ป็ปๆไฝณๅฎ่ทต
|
|
100
|
+
|
|
101
|
+
* **่ทจ่ฏญ่จๅทฅๅ
ท่ๅจ**๏ผ่ฅไฝ ็ `.ts` ๅทฅๅ
ทไพ่ตๅบๅฑ็ `.py` ่ๆฌ๏ผ**่ฏท็กฎไฟไธคๆไปถๅบ็กๅ็งฐๅฎๅ
จไธ่ด**๏ผๅฆ `get_dsl.ts` ๅ `get_dsl.py`๏ผใCLI ไผๆบ่ฝ่ฏๅซๅนถไธๅนถๆๅใ
|
|
102
|
+
* **่งๅ็ปงๆฟไธๆฉๅฑ**๏ผ
|
|
103
|
+
* ๅ
จๅฑ้็จ่งๅๅกๅฟ
ๆพๅจ `rules/common/` ไธใ
|
|
104
|
+
* ไธบ็นๅฎๆๆฏๆ ็ผๅ่งๅๆถ๏ผๅฆ `rules/typescript/`๏ผ๏ผ่ฅ้็ปงๆฟ `common` ่งๅ๏ผๅปบ่ฎฎ**ไฟๆๅๅ**๏ผๅนถๅจๆไปถ้กถ้จๆพๅผๅฃฐๆ็ปงๆฟๅ
ณ็ณป๏ผ
|
|
105
|
+
*> ๆญคๆไปถๆฉๅฑไบ [common/coding-style.md](https://www.google.com/search?q=../common/coding-style.md) ๅนถๅขๅ ไบ TS ็นๅฎๅ
ๅฎนใ*
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## ๐ ็ฎๅฝไธ้
็ฝฎ่ง่ (Workspace Structure)
|
|
112
|
+
|
|
113
|
+
่ฟ่ก `vibe add` ๅ๏ผๅทฅๅ
ทๅฐๅจ้กน็ฎๆ น็ฎๅฝ่ชๅจๆฅ็ฎกๅนถ็ปดๆคไปฅไธ็ปๆ๏ผ
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
your-project/
|
|
117
|
+
โโโ .opencode/
|
|
118
|
+
โ โโโ tool/ # ๅบๅฑ .ts / .py ๅทฅๅ
ท่ๆฌ
|
|
119
|
+
โ โโโ rules/ # .md ่งๅๆไปถ๏ผๆ็ฑปๅซๅฝๆกฃ๏ผ
|
|
120
|
+
โ โโโ opencode.jsonc # OpenCode ๆ ธๅฟ้
็ฝฎ๏ผCLI ่ชๅจๆณจๅ
ฅๅทฅๅ
ทๅผๅ
ณไธๆไปค่ทฏๅพ๏ผ
|
|
121
|
+
โ โโโ vibe-lock.json # ็ถๆ้ๆไปถ๏ผ็ฒพๅ่ฎฐๅฝ่ตๆบๆฅๆบไธ็ๆฌ
|
|
122
|
+
โโโ .venv/ # (ๆ้่ชๅจๅๅปบ) ้็ฆป็ Python ่ๆ็ฏๅข
|
|
123
|
+
โโโ requirements.txt # (ๆ้่ชๅจ็ปดๆค) Python ่ๆฌไพ่ตๆธ
ๅ
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
## ๐ค ่ๅ
ฅ็ๆ (Join the Ecosystem)
|
|
130
|
+
|
|
131
|
+
ๅฆๆไฝ ็ๅผๆบ้กน็ฎ๏ผๅฆ Agent SkillsใTools ๆ Rules๏ผๅ
ผๅฎนๅนถไฝฟ็จไบ vibe-coding ่ง่๏ผๆฌข่ฟๅจไฝ ็ `README.md` ไธญๆไธ่ฟๆไธๅฑๅพฝ็ซ ๏ผๅ็คพๅบๅฑ็คบไฝ ็ๅๅซๅๅณ๏ผ
|
|
132
|
+
|
|
133
|
+
ๅคๅถไปฅไธ Markdown ไปฃ็ ๅณๅฏๆทปๅ ๅฐไฝ ็้กน็ฎไธญ๏ผ
|
|
134
|
+
|
|
135
|
+
```markdown
|
|
136
|
+
[](https://github.com/HelloGGX/vibe-coding-cli)
|
|
137
|
+
```
|
|
138
|
+
(ๆไธๅพฝ็ซ ๅ๏ผไฝ ๅฐๆๆบไผ่ขซๆถๅฝ่ฟๅฎๆน็ๅไบบๅ ็ฒพ้ๅ่กจ๏ผ)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
## ๐ ๏ธ ๅผๅ่
ๆๅ (Development)
|
|
142
|
+
|
|
143
|
+
ๆฌ้กน็ฎๅบไบๆ้็ [Bun](https://bun.sh/) ่ฟ่กๆถๆๅปบใ
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
bun install # 1. ๅฎ่ฃ
ไพ่ต
|
|
147
|
+
bun run dev --help # 2. ๆฌๅฐ่ฐ่ฏ
|
|
148
|
+
bun run typecheck # 3. ็ฑปๅๆฃๆฅ
|
|
149
|
+
bun run build # 4. ๆๅปบ็ไบง็ๆฌ (่พๅบ่ณ ./dist)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## ๐ ่ฎธๅฏ่ฏ (License)
|
|
153
|
+
|
|
154
|
+
[MIT License](https://www.google.com/search?q=../../LICENSE.md) ยฉ 2026 [HelloGGX](https://github.com/HelloGGX)
|
package/bin/vibe
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import module from "node:module"
|
|
4
|
-
|
|
5
|
-
// https://nodejs.org/api/module.html#module-compile-cache
|
|
6
|
-
if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) {
|
|
7
|
-
try {
|
|
8
|
-
module.enableCompileCache()
|
|
9
|
-
} catch {
|
|
10
|
-
// Ignore errors
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
await import("../dist/cli.js")
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import module from "node:module"
|
|
4
|
+
|
|
5
|
+
// https://nodejs.org/api/module.html#module-compile-cache
|
|
6
|
+
if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) {
|
|
7
|
+
try {
|
|
8
|
+
module.enableCompileCache()
|
|
9
|
+
} catch {
|
|
10
|
+
// Ignore errors
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
await import("../dist/cli.js")
|
package/dist/cli.js
CHANGED
|
@@ -4,15 +4,29 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
function __accessProp(key) {
|
|
8
|
+
return this[key];
|
|
9
|
+
}
|
|
10
|
+
var __toESMCache_node;
|
|
11
|
+
var __toESMCache_esm;
|
|
7
12
|
var __toESM = (mod, isNodeMode, target) => {
|
|
13
|
+
var canCache = mod != null && typeof mod === "object";
|
|
14
|
+
if (canCache) {
|
|
15
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
16
|
+
var cached = cache.get(mod);
|
|
17
|
+
if (cached)
|
|
18
|
+
return cached;
|
|
19
|
+
}
|
|
8
20
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
21
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
22
|
for (let key of __getOwnPropNames(mod))
|
|
11
23
|
if (!__hasOwnProp.call(to, key))
|
|
12
24
|
__defProp(to, key, {
|
|
13
|
-
get: (
|
|
25
|
+
get: __accessProp.bind(mod, key),
|
|
14
26
|
enumerable: true
|
|
15
27
|
});
|
|
28
|
+
if (canCache)
|
|
29
|
+
cache.set(mod, to);
|
|
16
30
|
return to;
|
|
17
31
|
};
|
|
18
32
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
@@ -1915,11 +1929,11 @@ var zt = { light: C("โ", "-"), heavy: C("โ", "="), block: C("โ", "#") };
|
|
|
1915
1929
|
var Qt = `${import_picocolors2.default.gray(d)} `;
|
|
1916
1930
|
|
|
1917
1931
|
// src/commands/add.ts
|
|
1918
|
-
import { execSync as
|
|
1932
|
+
import { execSync as execSync3 } from "child_process";
|
|
1919
1933
|
import { existsSync as existsSync4, mkdirSync as mkdirSync3, readdirSync as readdirSync2 } from "fs";
|
|
1920
1934
|
import path4 from "path";
|
|
1921
1935
|
|
|
1922
|
-
// ../../node_modules/.bun/simple-git@3.32.
|
|
1936
|
+
// ../../node_modules/.bun/simple-git@3.32.3/node_modules/simple-git/dist/esm/index.js
|
|
1923
1937
|
var import_file_exists = __toESM(require_dist(), 1);
|
|
1924
1938
|
var import_debug = __toESM(require_src2(), 1);
|
|
1925
1939
|
var import_promise_deferred = __toESM(require_dist2(), 1);
|
|
@@ -5603,7 +5617,7 @@ function preventProtocolOverride(arg, next) {
|
|
|
5603
5617
|
if (!isConfigSwitch(arg)) {
|
|
5604
5618
|
return;
|
|
5605
5619
|
}
|
|
5606
|
-
if (!/^\s*protocol(.[a-z]+)?.allow
|
|
5620
|
+
if (!/^\s*protocol(.[a-z]+)?.allow/i.test(next)) {
|
|
5607
5621
|
return;
|
|
5608
5622
|
}
|
|
5609
5623
|
throw new GitPluginError(undefined, "unsafe", "Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol");
|
|
@@ -6250,7 +6264,57 @@ python-dotenv>=0.19.0
|
|
|
6250
6264
|
}
|
|
6251
6265
|
function getPythonActivationCmd() {
|
|
6252
6266
|
const isWin = process.platform === "win32";
|
|
6253
|
-
|
|
6267
|
+
if (isWin) {
|
|
6268
|
+
return `# Windows CMD
|
|
6269
|
+
venv\\Scripts\\activate.bat
|
|
6270
|
+
|
|
6271
|
+
# Windows PowerShell
|
|
6272
|
+
.\\.venv\\Scripts\\Activate.ps1`;
|
|
6273
|
+
}
|
|
6274
|
+
return "source .venv/bin/activate";
|
|
6275
|
+
}
|
|
6276
|
+
|
|
6277
|
+
// src/utils/env.ts
|
|
6278
|
+
import { execSync as execSync2 } from "child_process";
|
|
6279
|
+
function ensureBunInstalled() {
|
|
6280
|
+
try {
|
|
6281
|
+
execSync2("bun --version", { stdio: "ignore" });
|
|
6282
|
+
} catch {
|
|
6283
|
+
R2.warn(`${YELLOW}Bun runtime not found. Attempting to install via npm...${RESET}`);
|
|
6284
|
+
const s = bt2();
|
|
6285
|
+
s.start("Installing bun globally...");
|
|
6286
|
+
try {
|
|
6287
|
+
execSync2("npm install -g bun", { stdio: "ignore" });
|
|
6288
|
+
s.stop(`${CYAN}Bun successfully installed!${RESET}`);
|
|
6289
|
+
} catch (error) {
|
|
6290
|
+
s.stop("Failed to install Bun.");
|
|
6291
|
+
handleExecError(new Error("Could not install Bun automatically. Please install it manually: https://bun.sh/"), "Environment Error", "error" /* ERROR */);
|
|
6292
|
+
}
|
|
6293
|
+
}
|
|
6294
|
+
}
|
|
6295
|
+
function ensurePythonInstalled() {
|
|
6296
|
+
let hasPython = false;
|
|
6297
|
+
try {
|
|
6298
|
+
execSync2("python3 --version", { stdio: "ignore" });
|
|
6299
|
+
hasPython = true;
|
|
6300
|
+
} catch {
|
|
6301
|
+
try {
|
|
6302
|
+
execSync2("python --version", { stdio: "ignore" });
|
|
6303
|
+
hasPython = true;
|
|
6304
|
+
} catch {}
|
|
6305
|
+
}
|
|
6306
|
+
if (!hasPython) {
|
|
6307
|
+
R2.error(`
|
|
6308
|
+
${BOLD}Python is required but not found on your system.${RESET}
|
|
6309
|
+
The tools you selected contain Python scripts (.py) which require a valid Python environment.
|
|
6310
|
+
|
|
6311
|
+
${CYAN}Please install Python:${RESET}
|
|
6312
|
+
- ${BOLD}Windows${RESET}: Download from https://www.python.org/downloads/
|
|
6313
|
+
- ${BOLD}macOS${RESET}: Run \`brew install python\`
|
|
6314
|
+
- ${BOLD}Linux${RESET}: Run \`sudo apt install python3 python3-venv\`
|
|
6315
|
+
`);
|
|
6316
|
+
process.exit(1);
|
|
6317
|
+
}
|
|
6254
6318
|
}
|
|
6255
6319
|
|
|
6256
6320
|
// src/commands/add.ts
|
|
@@ -6258,15 +6322,16 @@ async function runAdd(args) {
|
|
|
6258
6322
|
const repository = args[0];
|
|
6259
6323
|
if (!repository) {
|
|
6260
6324
|
handleExecError(new Error("Repository name is missing"), "Argument Error", "error" /* ERROR */);
|
|
6261
|
-
|
|
6325
|
+
return;
|
|
6262
6326
|
}
|
|
6263
|
-
const repoUrl = `https://github.com/${repository}.git`;
|
|
6264
6327
|
We(`${BG_CYAN} vibe cli ${RESET}`);
|
|
6328
|
+
ensureBunInstalled();
|
|
6329
|
+
const repoUrl = `https://github.com/${repository}.git`;
|
|
6265
6330
|
Ve(`Repository: ${CYAN}${repoUrl}${RESET}
|
|
6266
6331
|
Target: ${CYAN}${OPENCODE_DIR}${RESET}`, "Initializing");
|
|
6267
6332
|
R2.step("Executing standard skills installer (pnpx skills add)...");
|
|
6268
6333
|
try {
|
|
6269
|
-
|
|
6334
|
+
execSync3(`pnpx skills add ${repository} --agent opencode`, { stdio: "inherit" });
|
|
6270
6335
|
} catch (err) {
|
|
6271
6336
|
handleExecError(err, "Skills installer finished with warnings", "warn" /* WARN */);
|
|
6272
6337
|
}
|
|
@@ -6280,8 +6345,9 @@ Target: ${CYAN}${OPENCODE_DIR}${RESET}`, "Initializing");
|
|
|
6280
6345
|
const rulesDirPath = path4.join(tempDir, "rules");
|
|
6281
6346
|
const hasTools = existsSync4(toolDirPath);
|
|
6282
6347
|
const hasRules = existsSync4(rulesDirPath);
|
|
6283
|
-
if (!hasTools && !hasRules)
|
|
6284
|
-
return handleExecError(new Error(
|
|
6348
|
+
if (!hasTools && !hasRules) {
|
|
6349
|
+
return handleExecError(new Error("Neither 'tool' nor 'rules' directory found in repository."), "Parse Error", "warn" /* WARN */);
|
|
6350
|
+
}
|
|
6285
6351
|
let selectedTools = [];
|
|
6286
6352
|
let selectedRules = [];
|
|
6287
6353
|
if (hasTools) {
|
|
@@ -6314,20 +6380,30 @@ Target: ${CYAN}${OPENCODE_DIR}${RESET}`, "Initializing");
|
|
|
6314
6380
|
}
|
|
6315
6381
|
if (selectedTools.length === 0 && selectedRules.length === 0)
|
|
6316
6382
|
return Ne("No tools or rules selected.");
|
|
6383
|
+
let requiresPython = false;
|
|
6384
|
+
if (selectedTools.length > 0) {
|
|
6385
|
+
for (const tool of selectedTools) {
|
|
6386
|
+
if (existsSync4(path4.join(toolDirPath, `${tool}.py`))) {
|
|
6387
|
+
requiresPython = true;
|
|
6388
|
+
break;
|
|
6389
|
+
}
|
|
6390
|
+
}
|
|
6391
|
+
}
|
|
6392
|
+
if (requiresPython) {
|
|
6393
|
+
ensurePythonInstalled();
|
|
6394
|
+
}
|
|
6317
6395
|
const installSpinner = bt2();
|
|
6318
6396
|
installSpinner.start(`Installing to ${OPENCODE_DIR}/ ...`);
|
|
6319
6397
|
ensureOpencodeConfig();
|
|
6320
6398
|
const lockData = readLockFile();
|
|
6321
6399
|
const now = new Date().toISOString();
|
|
6322
|
-
let requiresPython = false;
|
|
6323
6400
|
let installedRulePaths = [];
|
|
6324
6401
|
if (selectedTools.length > 0) {
|
|
6325
6402
|
const targetToolDir = path4.join(process.cwd(), OPENCODE_DIR, TOOL_SUBDIR);
|
|
6326
6403
|
if (!existsSync4(targetToolDir))
|
|
6327
6404
|
mkdirSync3(targetToolDir, { recursive: true });
|
|
6328
6405
|
for (const tool of selectedTools) {
|
|
6329
|
-
|
|
6330
|
-
requiresPython = true;
|
|
6406
|
+
copyToolFiles(tool, toolDirPath, targetToolDir);
|
|
6331
6407
|
if (lockData.tools)
|
|
6332
6408
|
lockData.tools[tool] = { source: repoUrl, installedAt: now };
|
|
6333
6409
|
}
|
|
@@ -6348,13 +6424,17 @@ Target: ${CYAN}${OPENCODE_DIR}${RESET}`, "Initializing");
|
|
|
6348
6424
|
await new Promise((r) => setTimeout(r, 400));
|
|
6349
6425
|
installSpinner.stop(`${GREEN}Successfully installed ${selectedTools.length + selectedRules.length} items.${RESET}`);
|
|
6350
6426
|
if (requiresPython) {
|
|
6351
|
-
Ve(`Your Python tools are ready. Run:
|
|
6427
|
+
Ve(`Your Python tools are ready. Run the following command to activate the environment:
|
|
6352
6428
|
|
|
6353
6429
|
${CYAN}${getPythonActivationCmd()}${RESET}`, "\uD83D\uDC0D Python Environment");
|
|
6354
6430
|
}
|
|
6355
6431
|
} catch (error) {
|
|
6356
6432
|
s.stop("Failed to fetch repository.");
|
|
6357
|
-
|
|
6433
|
+
if (error instanceof GitCloneError) {
|
|
6434
|
+
handleExecError(error, "Git Error", "error" /* ERROR */);
|
|
6435
|
+
} else {
|
|
6436
|
+
handleExecError(error, "Repository Fetch Error", "error" /* ERROR */);
|
|
6437
|
+
}
|
|
6358
6438
|
} finally {
|
|
6359
6439
|
if (tempDir)
|
|
6360
6440
|
await cleanupTempDir(tempDir).catch(() => {});
|
|
@@ -6363,7 +6443,7 @@ Target: ${CYAN}${OPENCODE_DIR}${RESET}`, "Initializing");
|
|
|
6363
6443
|
}
|
|
6364
6444
|
|
|
6365
6445
|
// src/commands/list.ts
|
|
6366
|
-
import { execSync as
|
|
6446
|
+
import { execSync as execSync4 } from "child_process";
|
|
6367
6447
|
async function runList(args) {
|
|
6368
6448
|
const lockData = readLockFile();
|
|
6369
6449
|
console.log(`
|
|
@@ -6386,14 +6466,14 @@ ${BOLD}\uD83D\uDCDC Installed Rules (${OPENCODE_DIR}/${RULES_SUBDIR}):${RESET}
|
|
|
6386
6466
|
${BOLD}\uD83E\uDE84 Installed Skills (Standard):${RESET}
|
|
6387
6467
|
`);
|
|
6388
6468
|
try {
|
|
6389
|
-
|
|
6469
|
+
execSync4("pnpx skills ls", { stdio: "inherit" });
|
|
6390
6470
|
} catch (error) {
|
|
6391
6471
|
handleExecError(error, "No standard skills found or failed to fetch", "warn" /* WARN */);
|
|
6392
6472
|
}
|
|
6393
6473
|
}
|
|
6394
6474
|
|
|
6395
6475
|
// src/commands/update.ts
|
|
6396
|
-
import { execSync as
|
|
6476
|
+
import { execSync as execSync5 } from "child_process";
|
|
6397
6477
|
import { existsSync as existsSync5 } from "fs";
|
|
6398
6478
|
import path5 from "path";
|
|
6399
6479
|
async function runUpdate(args) {
|
|
@@ -6401,7 +6481,7 @@ async function runUpdate(args) {
|
|
|
6401
6481
|
${BOLD}\uD83E\uDE84 Updating Standard Skills...${RESET}
|
|
6402
6482
|
`);
|
|
6403
6483
|
try {
|
|
6404
|
-
|
|
6484
|
+
execSync5("pnpx skills update", { stdio: "inherit" });
|
|
6405
6485
|
} catch (error) {
|
|
6406
6486
|
handleExecError(error, "Failed to update standard skills", "warn" /* WARN */);
|
|
6407
6487
|
}
|
|
@@ -6492,14 +6572,14 @@ ${BOLD}\uD83D\uDCE6 Updating Local Tools & Rules...${RESET}
|
|
|
6492
6572
|
}
|
|
6493
6573
|
|
|
6494
6574
|
// src/commands/remove.ts
|
|
6495
|
-
import { execSync as
|
|
6575
|
+
import { execSync as execSync6 } from "child_process";
|
|
6496
6576
|
import path6 from "path";
|
|
6497
6577
|
async function runRemove(args) {
|
|
6498
6578
|
We(`${BG_CYAN} vibe cli ${RESET}`);
|
|
6499
6579
|
R2.step("Executing standard skills remover (pnpx skills remove)...");
|
|
6500
6580
|
try {
|
|
6501
6581
|
const cmdArgs = args.length > 0 ? args.join(" ") : "";
|
|
6502
|
-
|
|
6582
|
+
execSync6(`pnpx skills remove ${cmdArgs}`.trim(), { stdio: "inherit" });
|
|
6503
6583
|
} catch (err) {
|
|
6504
6584
|
R2.warn("Skills remover finished with warnings or nothing to remove.");
|
|
6505
6585
|
}
|
|
@@ -6583,6 +6663,19 @@ async function runRemove(args) {
|
|
|
6583
6663
|
}
|
|
6584
6664
|
|
|
6585
6665
|
// src/cli.ts
|
|
6666
|
+
import { join as join2 } from "node:path";
|
|
6667
|
+
import { readFileSync as readFileSync3 } from "node:fs";
|
|
6668
|
+
var __dirname = "G:\\aiProj\\skill\\packages\\vibe\\src";
|
|
6669
|
+
function getVersion() {
|
|
6670
|
+
try {
|
|
6671
|
+
const pkgPath = join2(__dirname, "..", "package.json");
|
|
6672
|
+
const pkg = JSON.parse(readFileSync3(pkgPath, "utf-8"));
|
|
6673
|
+
return pkg.version;
|
|
6674
|
+
} catch {
|
|
6675
|
+
return "0.0.0";
|
|
6676
|
+
}
|
|
6677
|
+
}
|
|
6678
|
+
var VERSION = getVersion();
|
|
6586
6679
|
var VIBE_LOGO = [
|
|
6587
6680
|
"โโโ โโโโโโโโโโโโโ โโโโโโโโ",
|
|
6588
6681
|
"โโโ โโโโโโโโโโโโโโโโโโโโโโ",
|
|
@@ -6615,6 +6708,7 @@ function showBanner() {
|
|
|
6615
6708
|
console.log(` ${DIM}$${RESET} ${TEXT}vibe list${RESET} ${DIM}List installed tools & skills${RESET}`);
|
|
6616
6709
|
console.log(` ${DIM}$${RESET} ${TEXT}vibe update${RESET} ${DIM}Update installed tools & skills${RESET}`);
|
|
6617
6710
|
console.log(` ${DIM}$${RESET} ${TEXT}vibe remove${RESET} ${DIM}Remove tools & rules${RESET}`);
|
|
6711
|
+
console.log(` ${DIM}$${RESET} ${TEXT}vibe version${RESET} ${DIM}Show version${RESET}`);
|
|
6618
6712
|
console.log();
|
|
6619
6713
|
console.log(`${DIM}Example:${RESET} vibe add helloggx/skill`);
|
|
6620
6714
|
console.log();
|
|
@@ -6633,6 +6727,7 @@ ${BOLD}Manage Tools & Skills:${RESET}
|
|
|
6633
6727
|
|
|
6634
6728
|
${BOLD}Options:${RESET}
|
|
6635
6729
|
--help, -h Show this help message
|
|
6730
|
+
--version, -v Show version number
|
|
6636
6731
|
|
|
6637
6732
|
${BOLD}Examples:${RESET}
|
|
6638
6733
|
${DIM}$${RESET} vibe add helloggx/skill
|
|
@@ -6670,11 +6765,14 @@ async function main() {
|
|
|
6670
6765
|
case "update":
|
|
6671
6766
|
await runUpdate(args.slice(1));
|
|
6672
6767
|
break;
|
|
6673
|
-
case "
|
|
6674
|
-
case "-h":
|
|
6768
|
+
case "h":
|
|
6675
6769
|
case "help":
|
|
6676
6770
|
showHelp();
|
|
6677
6771
|
break;
|
|
6772
|
+
case "v":
|
|
6773
|
+
case "version":
|
|
6774
|
+
console.log(VERSION);
|
|
6775
|
+
break;
|
|
6678
6776
|
default:
|
|
6679
6777
|
console.log(`${CYAN}vibe:${RESET} Unknown command '${command}'`);
|
|
6680
6778
|
console.log(`Run ${BOLD}vibe --help${RESET} for usage.`);
|