
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
vg-coder-cli
Advanced tools
🚀 CLI tool to analyze projects, concatenate source files, count tokens, and export HTML with syntax highlighting and copy functionality
🚀 Powerful CLI tool & API Server để phân tích dự án, nối file mã nguồn, đếm token, xuất HTML và thực thi bash scripts qua REST API.
.gitignore: Tuân thủ chuẩn Git với multi-level ignore rules.vgignore: Có độ ưu tiên cao hơn .gitignore, với cú pháp giống hệtnode_modules, dist, .git, build, targettiktoken để đếm token chính xác cho AI models-c sao chép toàn bộ code vào clipboardcombined.txt với định dạng thân thiện cho AIvg startGET /health - Health checkPOST /api/analyze - Phân tích dự án, download project.txtGET /api/info - Lấy thông tin dự án (JSON)POST /api/execute - Thực thi bash scripts với validationDELETE /api/clean - Xóa output directory# Global install
npm install -g vg-coder-cli
# Local install
npm install vg-coder-cli
# Phân tích và xuất HTML
vg analyze
vg a # Alias rút gọn
# Với options
vg analyze /path/to/project --max-tokens 8192 --output ./my-output
# Copy vào clipboard (không tạo file)
vg analyze -c
vg analyze --clipboard
vg info
vg info /path/to/project
vg clean
vg clean --output ./my-output
# Start server (mặc định port 6868, bind 127.0.0.1)
vg start
vg s # Alias rút gọn
# Custom port
vg start -p 8080
# Bind LAN/Docker (cho phép truy cập từ host khác)
vg start --host 0.0.0.0
# Worker-only mode: ẩn bubble + dashboard panel trên tab AI Studio,
# chỉ chạy task automation (cho server headless điều phối từ xa)
vg start --worker
# Browser tự động mở dashboard tại http://localhost:6868
GET http://localhost:6868/health
Response:
{
"status": "ok",
"version": "2.0.50",
"timestamp": "2026-05-09T10:07:13.000Z"
}
POST http://localhost:6868/api/analyze
Content-Type: application/json
{
"path": ".",
"options": {
"maxTokens": 8000
}
}
Response: Downloads project.txt file
GET http://localhost:6868/api/info?path=.
Response:
{
"path": "/path/to/project",
"primaryType": "nodejs",
"stats": {
"totalFiles": 42,
"totalSize": 123456,
"totalLines": 5000
},
"tokens": {
"total": 15000,
"averagePerFile": 357
}
}
POST http://localhost:6868/api/execute
Content-Type: application/json
{
"bash": "mkdir -p $(dirname \"src/test.js\")\ncat <<'EOF' > src/test.js\nconsole.log('Hello');\nEOF"
}
Response:
{
"success": true,
"stdout": "",
"stderr": "",
"exitCode": 0,
"executionTime": 15
}
Features:
.vg/temp-executeDELETE http://localhost:6868/api/clean
Content-Type: application/json
{
"output": "./vg-output"
}
| Option | Mô tả | Default |
|---|---|---|
-o, --output <path> | Thư mục output | ./vg-output |
-m, --max-tokens <number> | Số token tối đa mỗi chunk | 8000 |
-t, --model <model> | Model AI để đếm token | gpt-4 |
--extensions <list> | Extensions (comma-separated) | Auto-detect |
--include-hidden | Bao gồm file ẩn | false |
--no-structure | Không giữ cấu trúc file | false |
--theme <theme> | Theme cho syntax highlighting | github |
-c, --clipboard | Copy vào clipboard | false |
--save-txt | Lưu vào vg-projects.txt | false |
| Option | Mô tả | Default |
|---|---|---|
-p, --port <port> | Port cho server | 6868 |
--host <host> | Bind address. Set 0.0.0.0 cho LAN/Docker port-forward (env: VG_HOST) | 127.0.0.1 |
--worker | Worker-only mode: ẩn bubble + dashboard panel trên tab AI Studio, chỉ giữ task automation | false |
Khi chạy vg start, browser tự động mở dashboard với:
Xem file SYSTEM_PROMPT.md để biết cách tích hợp với AI.
Command Prefixes:
/ask - Q&A mode (Markdown response)/plan - Planning mode (Checklist + bash)/fix - Bug fix mode (Analysis + solution)/code - Code generation (Bash script only)Khi AI generate code với /code, format chuẩn:
mkdir -p $(dirname "path/to/file.ext")
cat <<'EOF' > path/to/file.ext
... file content ...
EOF
Quy tắc:
mkdir -p $(dirname "...") trước mỗi file<<'EOF' (có quotes) để tránh expansionvg-output/
├── index.html # Trang chính với navigation
├── combined.html # Tất cả code, có search
├── combined.txt # Text format, tối ưu cho AI
├── chunks/ # Chunks riêng biệt
│ ├── chunk-1.html
│ └── ...
└── assets/ # CSS, JS
Thứ tự ưu tiên:
.vgignore - Cao nhất.gitignore - Trung bình# Analyze project và copy vào clipboard
vg a . -c
# Paste vào AI tool (Claude, ChatGPT, etc.)
# 1. Start server
vg start
# 2. Browser mở dashboard tự động
# 3. Test endpoints trực tiếp trên UI
# 4. Hoặc dùng Postman/curl
# 5. Execute bash script từ AI
curl -X POST http://localhost:6868/api/execute \
-H "Content-Type: application/json" \
-d '{"bash": "mkdir -p src && echo \"test\" > src/file.js"}'
# 1. Analyze project
vg a . -c
# 2. Paste vào AI với prompt:
# "/code Thêm authentication vào project này"
# 3. AI trả về bash script
# 4. Copy bash script
# 5. Execute qua API
curl -X POST http://localhost:6868/api/execute \
-H "Content-Type: application/json" \
-d '{"bash": "..."}'
# Install dependencies (root + extension)
npm install
cd vetgo-auto && npm install && cd ..
# Run tests
npm test
# Run in dev mode
npm run dev
# Local full build (extension + dashboard bundle + global install)
npm run build
CI tự publish lên npm khi package.json version đổi. Chỉ dùng 1 lệnh tuỳ loại bump:
npm run release:patch # 2.0.48 → 2.0.49 (bug fix)
npm run release:minor # 2.0.48 → 2.1.0 (feature mới)
npm run release:major # 2.0.48 → 3.0.0 (breaking change)
Mỗi lệnh tự npm version <bump> (commit + tag) rồi git push --follow-tags origin main. GitHub Actions workflow .github/workflows/publish.yml chạy tự động:
package.json version với npm view vg-coder-cli version. Bằng nhau → skip.npm ci root + vetgo-auto, build extension, copy vào src/server/views/vg-coder/, build dashboard bundle.npm publish --access public (cần secret repo NPM_TOKEN — granular access token với "bypass 2FA").v<version> (skip nếu đã có) + tạo GitHub Release auto-generated notes.Manual trigger: GitHub repo → Actions → Publish to npm → Run workflow.
CLI dùng update-notifier v5.1.0 — sau lần chạy đầu, nếu có version mới trên npm sẽ in banner cuối tiến trình:
╭─────────────────────────────────────────╮
│ Update available 2.0.48 → 2.0.49 │
│ Run npm i -g vg-coder-cli to update │
╰─────────────────────────────────────────╯
Cache check 6h ở ~/.config/configstore/update-notifier-vg-coder-cli.json. Tự bypass khi offline / non-interactive shell.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)MIT License - xem file LICENSE để biết thêm chi tiết.
vg start --worker): server prepend window.__VG_WORKER_ONLY__=true vào bundle, dashboard skip bubble + panels, chỉ chạy initTaskWorker() — tab AI Studio sạch không bị che bởi UIVG_WORKER_IDLE_TTL_MS, default 120 000): không có task mới → launcher đóng tab → CPU container về 0%; task tới sẽ tự mở lại tabvg start --host 0.0.0.0 (hoặc env VG_HOST) cho LAN/Docker port-forwardchrome.declarativeNetRequest.updateDynamicRules — fix lỗi parse static rules.json trên Chromium 120 (Linux/Docker)POST /api/tasks + webhook)GET /api/launcher/tabs, POST /api/launcher/{open,close}-tab)gemini-3-flash-preview (free + multimodal)chrome.tabs.captureVisibleTab) thay html2canvas — 5x nhanh hơn, sạch CORSPOST /api/worker/logsnpm run release:{patch,minor,major}Xem chi tiết: INTEGRATION.md
vg, a, -c, sRepo extension: https://github.com/tinhthanh/vetgo-auto vg-coder.zip 📁 Directory Structure: vg-coder/ ├── assets │ ├── icon128.png (.png) │ ├── icon16.png (.png) │ └── icon48.png (.png) ├── background.js (.js) ├── background.js.LICENSE.txt (.txt) ├── controller.js (.js) ├── manifest.json (.json) ├── options.css (.css) ├── options.html (.html) ├── options.js (.js) └── rules.json (.json)
.
FAQs
🚀 CLI tool to analyze projects, concatenate source files, count tokens, and export HTML with syntax highlighting and copy functionality
The npm package vg-coder-cli receives a total of 357 weekly downloads. As such, vg-coder-cli popularity was classified as not popular.
We found that vg-coder-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.