@simonfestl/husky-cli 0.9.2 → 0.9.5

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.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * LLM Context Generator
3
+ * Outputs markdown reference for LLM agents
4
+ */
5
+ export declare function generateLLMContext(): string;
6
+ export declare function printLLMContext(): void;
7
+ import { Command } from "commander";
8
+ export declare const llmCommand: Command;
@@ -0,0 +1,257 @@
1
+ /**
2
+ * LLM Context Generator
3
+ * Outputs markdown reference for LLM agents
4
+ */
5
+ const VERSION = "0.9.5";
6
+ export function generateLLMContext() {
7
+ return `# Husky CLI Reference (v${VERSION})
8
+
9
+ > [!CAUTION]
10
+ > ## MANDATORY: You MUST Use Husky CLI
11
+ >
12
+ > As an AI agent working in this environment, you are **REQUIRED** to use the Husky CLI for all business operations and task management.
13
+ >
14
+ > **DO NOT:**
15
+ > - Make direct API calls to Billbee, Zendesk, or other services
16
+ > - Bypass Husky CLI for task management
17
+ > - Create custom integrations when Husky commands exist
18
+ >
19
+ > **ALWAYS:**
20
+ > - Use \`husky biz\` commands for business operations
21
+ > - Use \`husky task\` commands for task lifecycle
22
+ > - Use \`husky worktree\` for Git isolation
23
+ > - Check \`husky config test\` before operations
24
+
25
+ ---
26
+
27
+ ## What is Husky?
28
+
29
+ Husky is the **central orchestration layer** for AI agents. It provides:
30
+ - **Dashboard API** - Task management, projects, roadmaps
31
+ - **Billbee** - E-commerce orders and products
32
+ - **Zendesk** - Customer support tickets
33
+ - **SeaTable** - Supply chain and inventory
34
+ - **Qdrant** - Vector database for semantic search
35
+ - **Vertex AI** - Embeddings for similarity search
36
+
37
+ ---
38
+
39
+ ## Configuration
40
+
41
+ \`\`\`bash
42
+ husky config set api-url <dashboard-url>
43
+ husky config set api-key <key>
44
+ husky config list
45
+ husky config test
46
+ \`\`\`
47
+
48
+ ---
49
+
50
+ ## Core Commands
51
+
52
+ ### Tasks
53
+ \`\`\`bash
54
+ husky task list [--status <status>] # List tasks
55
+ husky task get <id> # Get task details
56
+ husky task create # Create new task
57
+ husky task start <id> # Start working on task
58
+ husky task done <id> [--pr <url>] # Mark task as done
59
+ husky task update <id> # Update task fields
60
+ husky task assign <id> <assignee> # Assign task
61
+ husky task log <id> # View task activity log
62
+ \`\`\`
63
+
64
+ ### Projects
65
+ \`\`\`bash
66
+ husky project list # List projects
67
+ husky project get <id> # Get project details
68
+ husky project create # Create new project
69
+ husky project tasks <id> # List project tasks
70
+ \`\`\`
71
+
72
+ ### Roadmaps
73
+ \`\`\`bash
74
+ husky roadmap list # List roadmaps
75
+ husky roadmap get <id> # Get roadmap details
76
+ husky roadmap create # Create new roadmap
77
+ husky roadmap milestones <id> # List milestones
78
+ husky roadmap add-milestone <id> # Add milestone to roadmap
79
+ \`\`\`
80
+
81
+ ### Ideas
82
+ \`\`\`bash
83
+ husky idea list # List ideas
84
+ husky idea get <id> # Get idea details
85
+ husky idea create # Create new idea
86
+ husky idea vote <id> # Vote on idea
87
+ \`\`\`
88
+
89
+ ### Workflows
90
+ \`\`\`bash
91
+ husky workflow list # List workflows
92
+ husky workflow get <id> # Get workflow details
93
+ husky workflow create # Create new workflow
94
+ husky workflow run <id> # Execute workflow
95
+ \`\`\`
96
+
97
+ ### Departments
98
+ \`\`\`bash
99
+ husky department list # List departments
100
+ husky department get <id> # Get department details
101
+ husky department members <id> # List department members
102
+ \`\`\`
103
+
104
+ ### Processes
105
+ \`\`\`bash
106
+ husky process list # List processes
107
+ husky process get <id> # Get process details
108
+ husky process run <id> # Run process
109
+ \`\`\`
110
+
111
+ ### Strategy
112
+ \`\`\`bash
113
+ husky strategy list # List strategy items
114
+ husky strategy get <id> # Get strategy details
115
+ husky strategy update <id> # Update strategy
116
+ \`\`\`
117
+
118
+ ### Changelog
119
+ \`\`\`bash
120
+ husky changelog generate # Generate changelog from commits
121
+ husky changelog list # List changelogs
122
+ \`\`\`
123
+
124
+ ### Worktrees (Git Isolation)
125
+ \`\`\`bash
126
+ husky worktree list # List worktrees
127
+ husky worktree create <name> # Create isolated worktree
128
+ husky worktree delete <name> # Delete worktree
129
+ husky worktree switch <name> # Switch to worktree
130
+ \`\`\`
131
+
132
+ ### VM Sessions (Cloud Agents)
133
+ \`\`\`bash
134
+ husky vm list # List VM sessions
135
+ husky vm create # Create new VM
136
+ husky vm status <id> # Get VM status
137
+ husky vm ssh <id> # SSH into VM
138
+ husky vm delete <id> # Delete VM
139
+ \`\`\`
140
+
141
+ ### Jules Sessions (AI Agent)
142
+ \`\`\`bash
143
+ husky jules list # List Jules sessions
144
+ husky jules create # Create new session
145
+ husky jules status <id> # Get session status
146
+ husky jules logs <id> # View session logs
147
+ \`\`\`
148
+
149
+ ### Workers (Multi-Agent Coordination)
150
+ \`\`\`bash
151
+ husky worker whoami # Show current worker identity
152
+ husky worker register # Register worker with API
153
+ husky worker list # List all workers
154
+ husky worker sessions # List active sessions
155
+ husky worker activity # Who is working on what
156
+ \`\`\`
157
+
158
+ ### Utility Commands
159
+ \`\`\`bash
160
+ husky explain <command> # Explain CLI commands
161
+ husky settings list # List dashboard settings
162
+ husky settings set <key> <value> # Update setting
163
+ husky completion bash|zsh|fish # Generate shell completion
164
+ husky llm # Output LLM reference docs
165
+ \`\`\`
166
+
167
+ ---
168
+
169
+ ## Business Operations (husky biz)
170
+
171
+ ### Tickets (Zendesk)
172
+ \`\`\`bash
173
+ husky biz tickets list # List recent tickets
174
+ husky biz tickets get <id> # Get ticket details
175
+ husky biz tickets search "<query>" # Search tickets
176
+ husky biz tickets reply <id> "<msg>" # Reply to ticket
177
+ husky biz tickets note <id> "<note>" # Add internal note
178
+ husky biz tickets close <id> # Close ticket
179
+
180
+ # Prebuild (Semantic Search)
181
+ husky biz tickets similar <id> # Find similar tickets
182
+ husky biz tickets find-similar "<q>" # Semantic ticket search
183
+ husky biz tickets knowledge "<query>" # Search resolved tickets
184
+ \`\`\`
185
+
186
+ ### Orders (Billbee)
187
+ \`\`\`bash
188
+ husky biz orders list # List orders
189
+ husky biz orders get <id> # Get order details
190
+ husky biz orders search "<query>" # Search orders
191
+ \`\`\`
192
+
193
+ ### Products (Billbee)
194
+ \`\`\`bash
195
+ husky biz products list # List products
196
+ husky biz products get <id> # Get product details
197
+ husky biz products sku <sku> # Get by SKU
198
+ \`\`\`
199
+
200
+ ### Customers
201
+ \`\`\`bash
202
+ husky biz customers search <email> # Search by email
203
+ husky biz customers orders <email> # Get order history
204
+ husky biz customers 360 <email> # Full customer view (Billbee + Zendesk)
205
+ \`\`\`
206
+
207
+ ### SeaTable (Supply Chain)
208
+ \`\`\`bash
209
+ husky biz seatable tables # List tables
210
+ husky biz seatable rows <table> # List rows
211
+ husky biz seatable find-supplier "<q>" # Search suppliers
212
+ husky biz seatable order-status <no> # Get order status
213
+ husky biz seatable stock-check <sku> # Check stock levels
214
+ \`\`\`
215
+
216
+ ### Qdrant (Vector DB)
217
+ \`\`\`bash
218
+ husky biz qdrant collections # List collections
219
+ husky biz qdrant info <name> # Collection info
220
+ husky biz qdrant count <name> # Count points
221
+ husky biz qdrant search <coll> "<q>" # Semantic search
222
+ \`\`\`
223
+
224
+ ---
225
+
226
+ ## Environment Variables
227
+
228
+ | Variable | Description |
229
+ |----------|-------------|
230
+ | \`HUSKY_ENV\` | Environment prefix (PROD/SANDBOX) |
231
+ | \`PROD_BILLBEE_API_KEY\` | Billbee API key |
232
+ | \`PROD_ZENDESK_API_TOKEN\` | Zendesk token |
233
+ | \`PROD_SEATABLE_API_TOKEN\` | SeaTable token |
234
+ | \`PROD_QDRANT_URL\` | Qdrant URL |
235
+ | \`PROD_QDRANT_API_KEY\` | Qdrant API key |
236
+
237
+ ---
238
+
239
+ ## Usage Tips for LLM Agents
240
+
241
+ 1. **Always use \`--json\` flag** when available for structured output
242
+ 2. **Check config first**: \`husky config test\` before API calls
243
+ 3. **Use prebuild commands** for complex workflows (e.g., \`tickets similar\`)
244
+ 4. **Customer 360** combines Billbee + Zendesk data in one call
245
+ 5. **Semantic search** requires Qdrant and Vertex AI configured
246
+ `;
247
+ }
248
+ export function printLLMContext() {
249
+ console.log(generateLLMContext());
250
+ }
251
+ // Command export for subcommand registration
252
+ import { Command } from "commander";
253
+ export const llmCommand = new Command("llm")
254
+ .description("Output LLM reference documentation (markdown)")
255
+ .action(() => {
256
+ printLLMContext();
257
+ });
package/dist/index.js CHANGED
@@ -20,12 +20,14 @@ import { completionCommand } from "./commands/completion.js";
20
20
  import { worktreeCommand } from "./commands/worktree.js";
21
21
  import { workerCommand } from "./commands/worker.js";
22
22
  import { bizCommand } from "./commands/biz.js";
23
+ import { printLLMContext, llmCommand } from "./commands/llm-context.js";
23
24
  import { runInteractiveMode } from "./commands/interactive.js";
24
25
  const program = new Command();
25
26
  program
26
27
  .name("husky")
27
28
  .description("CLI for Huskyv0 Task Orchestration with Claude Agent")
28
- .version("0.9.2");
29
+ .version("0.9.5")
30
+ .option("--llm", "Output LLM reference documentation (markdown)");
29
31
  program.addCommand(taskCommand);
30
32
  program.addCommand(configCommand);
31
33
  program.addCommand(agentCommand);
@@ -46,6 +48,12 @@ program.addCommand(completionCommand);
46
48
  program.addCommand(worktreeCommand);
47
49
  program.addCommand(workerCommand);
48
50
  program.addCommand(bizCommand);
51
+ program.addCommand(llmCommand);
52
+ // Handle --llm flag specially
53
+ if (process.argv.includes("--llm")) {
54
+ printLLMContext();
55
+ process.exit(0);
56
+ }
49
57
  // Check if no command was provided - run interactive mode
50
58
  if (process.argv.length <= 2) {
51
59
  runInteractiveMode();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonfestl/husky-cli",
3
- "version": "0.9.2",
3
+ "version": "0.9.5",
4
4
  "description": "CLI for Huskyv0 Task Orchestration with Claude Agent SDK",
5
5
  "type": "module",
6
6
  "bin": {