verus-pm 0.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 ADDED
@@ -0,0 +1,243 @@
1
+ <div align="center">
2
+
3
+ # ⚡ Verus
4
+
5
+ **AI-powered project management for developer teams**
6
+
7
+ Task tracking · Documentation · Kanban Board · Time Tracking · Semantic Search
8
+ All in one command — CLI + Web Dashboard included.
9
+
10
+ [![npm](https://img.shields.io/npm/v/verus.svg?style=flat-square)](https://www.npmjs.com/package/verus)
11
+ [![Go](https://img.shields.io/badge/Go-1.22+-00ADD8?style=flat-square&logo=go)](https://go.dev)
12
+ [![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)](LICENSE)
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ ## 📦 Installation
19
+
20
+ ```bash
21
+ npm install -g verus
22
+ ```
23
+
24
+ That's it. CLI + Web Dashboard + MCP Server — all in one package.
25
+
26
+ ### Verify
27
+
28
+ ```bash
29
+ verus version
30
+ ```
31
+
32
+ ---
33
+
34
+ ## 🚀 Quick Start
35
+
36
+ ```bash
37
+ # 1. Initialize in your project
38
+ cd your-project
39
+ verus init
40
+
41
+ # 2. Create tasks
42
+ verus task create "Implement user auth" --priority high --labels "backend,auth"
43
+
44
+ # 3. Open Web Dashboard
45
+ verus browser
46
+ ```
47
+
48
+ ---
49
+
50
+ ## ✨ Features
51
+
52
+ | Feature | CLI | Web Dashboard |
53
+ |---------|-----|---------------|
54
+ | 🎯 Task Management | `verus task create/edit/list` | Full CRUD + detail sheets |
55
+ | 📋 Kanban Board | `verus board` | Drag-and-drop columns |
56
+ | 📝 Documentation | `verus doc create/view` | Markdown editor + Mermaid |
57
+ | ⏱️ Time Tracking | `verus time start/stop` | Live timer in header |
58
+ | 🔍 Search | `verus search <query>` | ⌘K command palette |
59
+ | 🤖 MCP Server | `verus mcp` | — |
60
+ | 📦 Templates | `verus template run` | Browse + run |
61
+ | 🔄 Imports | `verus import add` | Manage sources |
62
+ | 🛠️ Skills | `verus skill install` | — |
63
+ | 🔐 Offline Search | `verus model download` | — |
64
+
65
+ ---
66
+
67
+ ## 📋 CLI Reference
68
+
69
+ ### Tasks
70
+
71
+ ```bash
72
+ verus task list # List all
73
+ verus task list --status in-progress # Filter
74
+ verus task create "Fix login bug" -p high # Create
75
+ verus task view abc123 # View
76
+ verus task edit abc123 --status done # Update
77
+ verus task edit abc123 --ac "Tests pass" # Add AC
78
+ verus task delete abc123 # Delete
79
+ ```
80
+
81
+ ### Docs
82
+
83
+ ```bash
84
+ verus doc list # List all
85
+ verus doc create "API Design" --folder specs # Create
86
+ verus doc view specs/api-design # View
87
+ ```
88
+
89
+ ### Time Tracking
90
+
91
+ ```bash
92
+ verus time start abc123 # Start timer
93
+ verus time stop abc123 # Stop & record
94
+ verus time status # Active timers
95
+ verus time add abc123 2h30m # Add manually
96
+ verus time report # Summary
97
+ ```
98
+
99
+ ### Board, Search & Config
100
+
101
+ ```bash
102
+ verus board # Kanban in terminal
103
+ verus search "authentication" # Full-text search
104
+ verus config get # Show config
105
+ verus config set name "My App" # Set value
106
+ ```
107
+
108
+ ### Models, Templates & Imports
109
+
110
+ ```bash
111
+ verus model list # Available models
112
+ verus model download all-MiniLM-L6-v2
113
+ verus template list # List templates
114
+ verus template run component # Generate code
115
+ verus import add <git-url> # Import
116
+ verus import sync # Sync all
117
+ ```
118
+
119
+ ### Skills & Sync
120
+
121
+ ```bash
122
+ verus skill list # List skills
123
+ verus skill install # Install built-in skills
124
+ verus sync agents # Sync to IDE
125
+ verus sync mcp # Generate .mcp.json
126
+ ```
127
+
128
+ ### Server
129
+
130
+ ```bash
131
+ verus serve # Start API (port 3456)
132
+ verus browser # Open Web UI
133
+ verus mcp # Start MCP server
134
+ ```
135
+
136
+ ---
137
+
138
+ ## 🌐 Web Dashboard
139
+
140
+ Included in the npm package — no separate install needed.
141
+
142
+ **Pages:** Dashboard · Kanban · Tasks · Docs · Templates · Imports · Config
143
+
144
+ **Features:** Dark/light mode · ⌘K search · Real-time SSE · Time tracker · Responsive sidebar
145
+
146
+ ---
147
+
148
+ ## 🤖 MCP Integration
149
+
150
+ ```bash
151
+ verus sync mcp # Generates .mcp.json for your IDE
152
+ ```
153
+
154
+ Or manually add to `.mcp.json`:
155
+
156
+ ```json
157
+ {
158
+ "mcpServers": {
159
+ "verus": { "command": "verus", "args": ["mcp"] }
160
+ }
161
+ }
162
+ ```
163
+
164
+ ---
165
+
166
+ ## 🔧 Development (Local)
167
+
168
+ ### Prerequisites
169
+
170
+ - **Go 1.22+** — `go version`
171
+ - **Node.js 18+** — `node -v`
172
+
173
+ ### First-time Setup
174
+
175
+ ```bash
176
+ git clone https://github.com/thanhduy1812/verus.git
177
+ cd verus
178
+
179
+ # Build Go binary + UI → install globally via npm link
180
+ make npm-local
181
+ ```
182
+
183
+ This builds everything and links `verus` globally. Verify:
184
+
185
+ ```bash
186
+ verus version
187
+ verus browser
188
+ ```
189
+
190
+ ### Fast Iteration
191
+
192
+ After editing code, rebuild **only what changed**:
193
+
194
+ ```bash
195
+ # After Go code changes (~1s)
196
+ make dev-go
197
+
198
+ # After UI changes (~7s)
199
+ make dev-ui
200
+ ```
201
+
202
+ No need to `npm link` again — changes are live immediately.
203
+
204
+ ### Live Dev Mode (Hot Reload)
205
+
206
+ For frontend development with Vite HMR:
207
+
208
+ ```bash
209
+ make dev
210
+ # API: http://localhost:3456
211
+ # UI: http://localhost:5173
212
+ ```
213
+
214
+ ### All Make Targets
215
+
216
+ ```
217
+ make npm-local # First time: build all + npm link
218
+ make dev-go # Rebuild Go binary only (~1s)
219
+ make dev-ui # Rebuild UI only (~7s)
220
+ make dev # Live dev servers (Go + Vite HMR)
221
+ make npm-package # Build for npm publishing
222
+ make clean # Remove build artifacts
223
+ make help # Show all targets
224
+ ```
225
+
226
+ ---
227
+
228
+ ## 📂 Project Structure
229
+
230
+ ```
231
+ .verus/ # Created by `verus init`
232
+ ├── config.yaml # Project config
233
+ ├── tasks/ # Task files
234
+ ├── docs/ # Documentation
235
+ ├── templates/ # Code generation
236
+ └── skills/ # AI skills
237
+ ```
238
+
239
+ ---
240
+
241
+ ## 📄 License
242
+
243
+ MIT — see [LICENSE](LICENSE) for details.
package/bin/verus ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "verus-pm",
3
+ "version": "0.1.0",
4
+ "description": "AI-powered project management — CLI + Web Dashboard in one command",
5
+ "bin": {
6
+ "verus": "./bin/verus",
7
+ "vr": "./bin/verus"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "scripts",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
15
+ "scripts": {
16
+ "postinstall": "node scripts/postinstall.js"
17
+ },
18
+ "keywords": [
19
+ "cli",
20
+ "task-management",
21
+ "kanban",
22
+ "project-management",
23
+ "documentation",
24
+ "developer-tools",
25
+ "ai",
26
+ "mcp"
27
+ ],
28
+ "author": "thanhduy1812",
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/thanhduy1812/verus.git"
33
+ },
34
+ "homepage": "https://github.com/thanhduy1812/verus",
35
+ "engines": {
36
+ "node": ">=18.0.0"
37
+ }
38
+ }
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Verus postinstall — downloads the self-contained Go binary for current platform.
3
+ * The binary includes the embedded WebUI, so no separate UI files needed.
4
+ *
5
+ * Strategy:
6
+ * 1. Check if binary already exists (dev build via `make npm-local`)
7
+ * 2. Download pre-built binary from GitHub Releases
8
+ * 3. Try building from source (if in source repo + Go installed)
9
+ */
10
+
11
+ const { existsSync, mkdirSync, chmodSync, createWriteStream, unlinkSync } = require("node:fs");
12
+ const { join } = require("node:path");
13
+ const { execSync } = require("node:child_process");
14
+ const https = require("node:https");
15
+
16
+ const binDir = join(__dirname, "..", "bin");
17
+ const REPO = "thanhduy1812/verus";
18
+
19
+ function info(msg) { console.log(` ℹ ${msg}`); }
20
+ function ok(msg) { console.log(` ✅ ${msg}`); }
21
+ function warn(msg) { console.log(` ⚠️ ${msg}`); }
22
+
23
+ const PLATFORMS = { darwin: "darwin", linux: "linux", win32: "windows" };
24
+ const ARCHS = { x64: "amd64", arm64: "arm64", arm: "arm" };
25
+
26
+ async function main() {
27
+ console.log("\n ⚡ Verus — installing binary...\n");
28
+
29
+ const platform = PLATFORMS[process.platform];
30
+ const arch = ARCHS[process.arch];
31
+ const ext = process.platform === "win32" ? ".exe" : "";
32
+ const binaryName = `verus${ext}`;
33
+ const binaryPath = join(binDir, binaryName);
34
+
35
+ if (!platform || !arch) {
36
+ warn(`Unsupported platform: ${process.platform}-${process.arch}`);
37
+ warn(`Download manually from: https://github.com/${REPO}/releases`);
38
+ return;
39
+ }
40
+
41
+ // Already exists? (dev build via make npm-local)
42
+ if (existsSync(binaryPath)) {
43
+ ok(`Binary exists: ${binaryPath}`);
44
+ return;
45
+ }
46
+
47
+ mkdirSync(binDir, { recursive: true });
48
+ info(`Platform: ${platform}-${arch}`);
49
+
50
+ // 1. Try GitHub Releases first (fastest for end users)
51
+ try {
52
+ const release = await fetchJSON(`https://api.github.com/repos/${REPO}/releases/latest`);
53
+ if (release && release.tag_name) {
54
+ const tag = release.tag_name;
55
+ const assetName = `verus-${platform}-${arch}${ext}`;
56
+ const url = `https://github.com/${REPO}/releases/download/${tag}/${assetName}`;
57
+ info(`Downloading ${tag} (${assetName})...`);
58
+ await downloadFile(url, binaryPath);
59
+ chmodSync(binaryPath, 0o755);
60
+ ok(`Installed verus ${tag}`);
61
+ return;
62
+ }
63
+ } catch (e) { /* Release not available yet */ }
64
+
65
+ // 2. Try building from source (if in source repo + Go installed)
66
+ try {
67
+ execSync("go version", { stdio: "pipe" });
68
+ const goModPath = join(__dirname, "..", "..", "go.mod");
69
+ if (existsSync(goModPath)) {
70
+ const sourceRoot = join(__dirname, "..", "..");
71
+ info("Building from source (Go found + source repo detected)...");
72
+
73
+ // Build UI first if possible
74
+ const uiDir = join(sourceRoot, "ui");
75
+ const uiDistDir = join(sourceRoot, "internal", "server", "ui_dist");
76
+ if (existsSync(join(uiDir, "package.json"))) {
77
+ try {
78
+ info("Building UI...");
79
+ execSync("npm install --silent && npm run build", { cwd: uiDir, stdio: "pipe" });
80
+ mkdirSync(uiDistDir, { recursive: true });
81
+ execSync(`cp -R ${join(uiDir, "dist")}/* "${uiDistDir}/"`, { stdio: "pipe" });
82
+ } catch (e) {
83
+ info("UI build skipped (non-critical)");
84
+ }
85
+ }
86
+
87
+ execSync(`CGO_ENABLED=0 go build -ldflags "-s -w" -o "${binaryPath}" .`, {
88
+ cwd: sourceRoot,
89
+ stdio: "inherit",
90
+ });
91
+ chmodSync(binaryPath, 0o755);
92
+ ok("Built from source");
93
+ return;
94
+ }
95
+ } catch (e) { /* Go not available */ }
96
+
97
+ warn("Could not install binary automatically.");
98
+ warn(`Download from: https://github.com/${REPO}/releases`);
99
+ warn(`Place binary at: ${binaryPath}`);
100
+ }
101
+
102
+ function fetchJSON(url) {
103
+ return new Promise((resolve, reject) => {
104
+ https.get(url, { headers: { "User-Agent": "verus-npm" } }, (res) => {
105
+ if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
106
+ return fetchJSON(res.headers.location).then(resolve).catch(reject);
107
+ }
108
+ let data = "";
109
+ res.on("data", (c) => (data += c));
110
+ res.on("end", () => { try { resolve(JSON.parse(data)); } catch { resolve(null); } });
111
+ }).on("error", reject);
112
+ });
113
+ }
114
+
115
+ function downloadFile(url, dest) {
116
+ return new Promise((resolve, reject) => {
117
+ https.get(url, { headers: { "User-Agent": "verus-npm" } }, (res) => {
118
+ if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
119
+ return downloadFile(res.headers.location, dest).then(resolve).catch(reject);
120
+ }
121
+ if (res.statusCode !== 200) { reject(new Error(`HTTP ${res.statusCode}`)); return; }
122
+ const file = createWriteStream(dest);
123
+ res.pipe(file);
124
+ file.on("finish", () => { file.close(); resolve(); });
125
+ file.on("error", (e) => { unlinkSync(dest); reject(e); });
126
+ }).on("error", reject);
127
+ });
128
+ }
129
+
130
+ main().catch((err) => {
131
+ console.error(" ❌ Install error:", err.message);
132
+ process.exit(0); // Don't break npm install
133
+ });