vibe-coding-cli 1.0.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 +161 -0
- package/README.zh.md +157 -0
- package/bin/vibe +14 -0
- package/dist/cli.js +6687 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# 🌊 Vibe Coding CLI
|
|
4
|
+
|
|
5
|
+
**A vibe coding ecosystem builder tailored for OpenCode**
|
|
6
|
+
|
|
7
|
+
**English** · [简体中文](./README.zh.md)
|
|
8
|
+
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
## 📖 Introduction
|
|
12
|
+
|
|
13
|
+
`vibe-coding-cli` is a modern command-line scaffolding tool built specifically for the **OpenCode** platform. Its core objective is to quickly set up a Vibe Coding development environment and simplify resource management for specification-driven development.
|
|
14
|
+
|
|
15
|
+
With the `vibe` command, you can pull TypeScript/Python tool scripts or Markdown rule files from remote GitHub repositories with a single click. It automatically and seamlessly registers them into your OpenCode configuration and manages the underlying runtime dependency environments, allowing you to focus entirely on "co-creating code with AI".
|
|
16
|
+
|
|
17
|
+
## ✨ Features
|
|
18
|
+
|
|
19
|
+
* 🛠 **Fully Automated Tool Management:** Quickly parse, select, and download `.ts` / `.py` scripts from any GitHub repository straight to your local `.opencode/tool/` directory, ready to use out of the box.
|
|
20
|
+
* 📜 **Integrates Everything You Need for Vibe Coding:** A unique ecosystem aggregation capability that perfectly blends the **Capabilities (tools and skills)** needed for Agent execution with the **Context (guidelines and best practices)**. Supports on-demand installation of `.md` rule files so the AI truly understands your architectural intent and coding standards.
|
|
21
|
+
* 📦 **Smart Configuration Injection:** Automatically intercepts and updates `.opencode/opencode.jsonc`, silently injecting tool enable-switches and Prompt instruction paths. Say goodbye to tedious manual configuration forever.
|
|
22
|
+
* ⚡ **Lightning-Fast Parallel Updates:** Designed with a concurrency model to simultaneously handle resource comparison and pulling from multiple source repositories, drastically reducing update wait times in multi-dependency scenarios.
|
|
23
|
+
* 🪄 **Standard Skills Aggregation:** Deeply integrated with Vercel's `pnpx skills` ecosystem, allowing you to manage standard Agent skill libraries alongside localized extension resources within a unified CLI workflow.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 🚀 Quick Start
|
|
28
|
+
|
|
29
|
+
### Installation
|
|
30
|
+
|
|
31
|
+
Install as a global package (npm or bun recommended):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Using npm
|
|
35
|
+
npm install -g vibe-coding-cli
|
|
36
|
+
|
|
37
|
+
# Using bun
|
|
38
|
+
bun add -g vibe-coding-cli
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Basic Usage
|
|
43
|
+
|
|
44
|
+
Initialize and add an ecosystem library (e.g., `helloggx/skill` from this project):
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
vibe add helloggx/skill
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
*This command will pop up an interactive menu, allowing you to flexibly select the **Tools** and **Rules** you want to install. The CLI will automatically configure the entire environment for you.*
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 📚 Commands
|
|
56
|
+
|
|
57
|
+
### 1. Add Resources (`add` / `a`)
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
vibe add <repository>
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Execution Flow**:
|
|
65
|
+
|
|
66
|
+
1. Invokes native capabilities to install basic Agent skills from the target repository.
|
|
67
|
+
2. Clones and parses the `skill`, `tool`, and `rules` asset directories in the target repository.
|
|
68
|
+
3. Triggers an interactive multi-select list to pick specific tool scripts and rule documents on demand.
|
|
69
|
+
4. Automatically executes file copying, intelligently merges common rules, updates `opencode.jsonc`, and configures the Python dependency environment (if needed).
|
|
70
|
+
|
|
71
|
+
### 2. List Installed Items (`list` / `ls`)
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
vibe list
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Function**:
|
|
79
|
+
Clearly prints a status map of all installed resources in the current project, including:
|
|
80
|
+
|
|
81
|
+
* 🛠️ Local Tools
|
|
82
|
+
* 📜 Injected Context Rules (Local Rules)
|
|
83
|
+
* 🪄 Global Standard Skills
|
|
84
|
+
|
|
85
|
+
### 3. One-Click Sync & Update (`update` / `up`)
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
vibe update
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Function**:
|
|
93
|
+
Executes a full workspace update with one click. The CLI will concurrently pull all source repositories recorded in `vibe-lock.json`, intelligently compare and overwrite the latest local scripts and rule files, and simultaneously trigger an upgrade of the standard skills library.
|
|
94
|
+
|
|
95
|
+
### 4. Remove Resources (`remove` / `rm`)
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Interactive mode: Pops up a UI list to select tools and rules to remove
|
|
99
|
+
vibe remove
|
|
100
|
+
|
|
101
|
+
# Shortcut mode: Directly specify the resource to remove (supports standard skills and local tools/rules)
|
|
102
|
+
vibe remove <resource>
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Execution Flow**:
|
|
107
|
+
|
|
108
|
+
1. Invokes native capabilities to remove standard Agent skills from the target repository (via `pnpx skills remove`).
|
|
109
|
+
2. Parses the list of installed resources in the local `vibe-lock.json`.
|
|
110
|
+
3. **Interactive Mode**: Pops up a multi-select list, allowing you to choose specific tools and rule categories for removal.
|
|
111
|
+
4. **Shortcut Mode**: Directly matches and removes local tool/rule files based on the passed arguments.
|
|
112
|
+
5. Automatically cleans up the corresponding physical files (`.opencode/tool/` and `.opencode/rules/`) and synchronously updates the `opencode.jsonc` configuration.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 📂 Workspace Structure
|
|
117
|
+
|
|
118
|
+
After running `vibe add`, the tool will automatically create and maintain the following standard Vibe Coding structure in your project's root directory:
|
|
119
|
+
|
|
120
|
+
```text
|
|
121
|
+
your-project/
|
|
122
|
+
├── .opencode/
|
|
123
|
+
│ ├── tool/ # Stores the pulled underlying .ts / .py tool scripts
|
|
124
|
+
│ │ ├── get_dsl.ts
|
|
125
|
+
│ │ └── ...
|
|
126
|
+
│ ├── rules/ # Stores the pulled .md rule files (categorized by type)
|
|
127
|
+
│ │ ├── common/
|
|
128
|
+
│ │ └── typescript/
|
|
129
|
+
│ ├── opencode.jsonc # Core OpenCode configuration file
|
|
130
|
+
│ │ # (vibe automatically manages "tools": {...} and "instructions": [...] inside)
|
|
131
|
+
│ └── vibe-lock.json # Internal state lock file, accurately recording resource sources, versions, and update timestamps
|
|
132
|
+
├── .venv/ # (Auto-created as needed) Isolated Python virtual environment
|
|
133
|
+
└── requirements.txt # (Auto-maintained as needed) Dependency list required for Python scripts
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 🛠️ Development
|
|
140
|
+
|
|
141
|
+
This project is built on top of [Bun](https://bun.sh/), offering a lightning-fast execution and bundling experience.
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# 1. Install project dependencies
|
|
145
|
+
bun install
|
|
146
|
+
|
|
147
|
+
# 2. Run CLI locally for debugging
|
|
148
|
+
bun run dev --help
|
|
149
|
+
|
|
150
|
+
# 3. Strict type checking
|
|
151
|
+
bun run typecheck
|
|
152
|
+
|
|
153
|
+
# 4. Build production version (outputs to ./dist)
|
|
154
|
+
bun run build
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## 📄 License
|
|
159
|
+
|
|
160
|
+
This project is open-sourced under the [MIT License](https://www.google.com/search?q=../../LICENSE.md).
|
|
161
|
+
© 2026 [HelloGGX](https://github.com/HelloGGX)
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# 🌊 Vibe Coding CLI
|
|
4
|
+
|
|
5
|
+
**专为 OpenCode 打造的 vibe coding 生态构建工具**
|
|
6
|
+
|
|
7
|
+
[](./package.json)
|
|
8
|
+
[](../../LICENSE.md)
|
|
9
|
+
[](https://bun.sh)
|
|
10
|
+
|
|
11
|
+
[English](./README.md) · **简体中文**
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
## 📖 简介 (Introduction)
|
|
16
|
+
|
|
17
|
+
`vibe-coding-cli` 是一个专为 **OpenCode** 平台打造的现代命令行脚手架工具。它的核心目标是快速搭建 Vibe Coding 的开发环境,简化规范驱动开发的资源管理。
|
|
18
|
+
|
|
19
|
+
通过 `vibe` 命令,你可以一键拉取远程 GitHub 仓库中的 TypeScript/Python 工具脚本或 Markdown 规则文件,自动将其无缝注册到 OpenCode 配置中,并接管其底层的运行依赖环境,让你专注于“与 AI 共创代码”本身。
|
|
20
|
+
|
|
21
|
+
## ✨ 核心特性 (Features)
|
|
22
|
+
|
|
23
|
+
- 🛠 **全自动化工具管理**: 支持从任意 GitHub 仓库快速解析、选择并下载 `.ts` / `.py` 脚本至本地 `.opencode/tool/` 目录,开箱即用。
|
|
24
|
+
- 📜 **集成 Vibe Coding 所需的一切**: 独创的生态聚合能力,将 Agent 执行所需的 **Capabilities(工具与技能)** 与 **Context(行为准则与最佳实践)** 完美融合。支持按需安装 `.md` 规则文件,让 AI 真正懂你的架构意图与代码规范。
|
|
25
|
+
- 📦 **智能配置注入**: 自动拦截并更新 `.opencode/opencode.jsonc`,无感注入工具的启用开关与 Prompt 指令(instructions)路径,彻底告别繁琐的手动配置。
|
|
26
|
+
- ⚡ **并行极速更新**: 基于并发模型设计,同时处理多个源仓库的资源对比与拉取,大幅缩短多依赖场景下的更新等待时间。
|
|
27
|
+
- 🪄 **标准技能聚合**: 与 Vercel 的 `pnpx skills` 生态深度集成,在统一的 CLI 流程中同时管理标准 Agent 技能库和本地化扩展资源。
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 🚀 快速开始 (Quick Start)
|
|
32
|
+
|
|
33
|
+
### 安装
|
|
34
|
+
|
|
35
|
+
作为全局包安装(推荐使用 npm 或 bun):
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# 使用 npm
|
|
39
|
+
npm install -g vibe-coding-cli
|
|
40
|
+
|
|
41
|
+
# 使用 bun
|
|
42
|
+
bun add -g vibe-coding-cli
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 基础用法
|
|
46
|
+
|
|
47
|
+
初始化并添加一个生态库(例如本项目的 `helloggx/skill`):
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
vibe add helloggx/skill
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
*此命令将会弹出交互式菜单,允许你灵活多选想要安装的 **Tools (工具)** 和 **Rules (规则)**,CLI 将会自动为你完成所有环境的配置。*
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 📚 命令指南 (Commands)
|
|
58
|
+
|
|
59
|
+
### 1. 添加资源 (`add` / `a`)
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
vibe add <repository>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**执行流程**:
|
|
66
|
+
|
|
67
|
+
1. 调用原生能力,安装目标仓库中的基础 Agent 技能。
|
|
68
|
+
2. 克隆并解析目标仓库中的 `skill`、`tool` 和 `rules` 资产目录。
|
|
69
|
+
3. 唤起交互式多选列表,按需挑选具体的工具脚本和规则文档。
|
|
70
|
+
4. 自动执行文件拷贝、智能合并公共规则、更新 `opencode.jsonc` 并配置 Python 依赖环境(如需)。
|
|
71
|
+
|
|
72
|
+
### 2. 查看已安装项 (`list` / `ls`)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
vibe list
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**功能**:
|
|
79
|
+
清晰打印当前项目中安装的所有资源态势图,包含:
|
|
80
|
+
|
|
81
|
+
* 🛠️ 本地扩展工具 (Local Tools)
|
|
82
|
+
* 📜 注入的上下文规则 (Local Rules)
|
|
83
|
+
* 🪄 全局标准技能 (Standard Skills)
|
|
84
|
+
|
|
85
|
+
### 3. 一键同步更新 (`update` / `up`)
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
vibe update
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**功能**:
|
|
92
|
+
一键执行工作区全量更新。CLI 会并发拉取 `vibe-lock.json` 中记录的所有源仓库,智能比对并覆盖最新的本地脚本和规则文件,同时触发标准技能库的升级。
|
|
93
|
+
|
|
94
|
+
### 4. 移除资源 (`remove` / `rm`)
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# 交互式模式:弹出 UI 列表选择要移除的工具和规则
|
|
98
|
+
vibe remove
|
|
99
|
+
|
|
100
|
+
# 快捷模式:直接指定要移除的资源(支持标准 skills 和本地工具/规则)
|
|
101
|
+
vibe remove <resource>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**执行流程**:
|
|
105
|
+
|
|
106
|
+
1. 调用原生能力,移除目标仓库中的标准 Agent 技能(通过 `pnpx skills remove`)。
|
|
107
|
+
2. 解析本地 `vibe-lock.json` 中的已安装资源列表。
|
|
108
|
+
3. **交互模式**:弹出多选列表,允许你选择具体的工具和规则分类进行移除。
|
|
109
|
+
4. **快捷模式**:根据传入的参数直接匹配并移除本地工具/规则文件。
|
|
110
|
+
5. 自动清理对应的物理文件(`.opencode/tool/` 和 `.opencode/rules/`),并同步更新 `opencode.jsonc` 配置。
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 📂 目录与配置规范 (Workspace Structure)
|
|
115
|
+
|
|
116
|
+
运行 `vibe add` 后,工具将在你的项目根目录下自动创建并维护以下标准 Vibe Coding 结构:
|
|
117
|
+
|
|
118
|
+
```text
|
|
119
|
+
your-project/
|
|
120
|
+
├── .opencode/
|
|
121
|
+
│ ├── tool/ # 存放被拉取下来的底层 .ts / .py 工具脚本
|
|
122
|
+
│ │ ├── get_dsl.ts
|
|
123
|
+
│ │ └── ...
|
|
124
|
+
│ ├── rules/ # 存放被拉取下来的 .md 规则文件(按类别分类归档)
|
|
125
|
+
│ │ ├── common/
|
|
126
|
+
│ │ └── typescript/
|
|
127
|
+
│ ├── opencode.jsonc # OpenCode 核心配置文件
|
|
128
|
+
│ │ # (vibe 会自动管理其中的 "tools": {...} 和 "instructions": [...])
|
|
129
|
+
│ └── vibe-lock.json # 内部状态锁文件,精准记录资源来源仓库、版本与更新时间戳
|
|
130
|
+
├── .venv/ # (按需自动创建) 隔离的 Python 虚拟环境
|
|
131
|
+
└── requirements.txt # (按需自动维护) Python 脚本所需的依赖清单
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 🛠️ 开发者指南 (Development)
|
|
137
|
+
|
|
138
|
+
本项目底层基于 [Bun](https://bun.sh/) 构建,拥有极速的执行与打包体验。
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# 1. 安装项目依赖
|
|
142
|
+
bun install
|
|
143
|
+
|
|
144
|
+
# 2. 本地调试运行 CLI
|
|
145
|
+
bun run dev --help
|
|
146
|
+
|
|
147
|
+
# 3. 严格类型检查
|
|
148
|
+
bun run typecheck
|
|
149
|
+
|
|
150
|
+
# 4. 构建生产版本 (输出至 ./dist)
|
|
151
|
+
bun run build
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## 📄 许可证 (License)
|
|
155
|
+
|
|
156
|
+
本项目采用 [MIT License](https://www.google.com/search?q=../../LICENSE.md) 进行开源。
|
|
157
|
+
© 2026 [HelloGGX](https://github.com/HelloGGX)
|
package/bin/vibe
ADDED
|
@@ -0,0 +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")
|