@simonfestl/husky-cli 0.9.2 → 0.9.3

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,6 @@
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;
@@ -0,0 +1,159 @@
1
+ /**
2
+ * LLM Context Generator
3
+ * Outputs markdown reference for LLM agents
4
+ */
5
+ const VERSION = "0.9.3";
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
+ \`\`\`
61
+
62
+ ### Projects
63
+ \`\`\`bash
64
+ husky project list # List projects
65
+ husky project get <id> # Get project details
66
+ husky project create # Create new project
67
+ \`\`\`
68
+
69
+ ### Worktrees (Git)
70
+ \`\`\`bash
71
+ husky worktree list # List worktrees
72
+ husky worktree create <name> # Create isolated worktree
73
+ husky worktree delete <name> # Delete worktree
74
+ \`\`\`
75
+
76
+ ---
77
+
78
+ ## Business Operations (husky biz)
79
+
80
+ ### Tickets (Zendesk)
81
+ \`\`\`bash
82
+ husky biz tickets list # List recent tickets
83
+ husky biz tickets get <id> # Get ticket details
84
+ husky biz tickets search "<query>" # Search tickets
85
+ husky biz tickets reply <id> "<msg>" # Reply to ticket
86
+ husky biz tickets note <id> "<note>" # Add internal note
87
+ husky biz tickets close <id> # Close ticket
88
+
89
+ # Prebuild (Semantic Search)
90
+ husky biz tickets similar <id> # Find similar tickets
91
+ husky biz tickets find-similar "<q>" # Semantic ticket search
92
+ husky biz tickets knowledge "<query>" # Search resolved tickets
93
+ \`\`\`
94
+
95
+ ### Orders (Billbee)
96
+ \`\`\`bash
97
+ husky biz orders list # List orders
98
+ husky biz orders get <id> # Get order details
99
+ husky biz orders search "<query>" # Search orders
100
+ \`\`\`
101
+
102
+ ### Products (Billbee)
103
+ \`\`\`bash
104
+ husky biz products list # List products
105
+ husky biz products get <id> # Get product details
106
+ husky biz products sku <sku> # Get by SKU
107
+ \`\`\`
108
+
109
+ ### Customers
110
+ \`\`\`bash
111
+ husky biz customers search <email> # Search by email
112
+ husky biz customers orders <email> # Get order history
113
+ husky biz customers 360 <email> # Full customer view (Billbee + Zendesk)
114
+ \`\`\`
115
+
116
+ ### SeaTable (Supply Chain)
117
+ \`\`\`bash
118
+ husky biz seatable tables # List tables
119
+ husky biz seatable rows <table> # List rows
120
+ husky biz seatable find-supplier "<q>" # Search suppliers
121
+ husky biz seatable order-status <no> # Get order status
122
+ husky biz seatable stock-check <sku> # Check stock levels
123
+ \`\`\`
124
+
125
+ ### Qdrant (Vector DB)
126
+ \`\`\`bash
127
+ husky biz qdrant collections # List collections
128
+ husky biz qdrant info <name> # Collection info
129
+ husky biz qdrant count <name> # Count points
130
+ husky biz qdrant search <coll> "<q>" # Semantic search
131
+ \`\`\`
132
+
133
+ ---
134
+
135
+ ## Environment Variables
136
+
137
+ | Variable | Description |
138
+ |----------|-------------|
139
+ | \`HUSKY_ENV\` | Environment prefix (PROD/SANDBOX) |
140
+ | \`PROD_BILLBEE_API_KEY\` | Billbee API key |
141
+ | \`PROD_ZENDESK_API_TOKEN\` | Zendesk token |
142
+ | \`PROD_SEATABLE_API_TOKEN\` | SeaTable token |
143
+ | \`PROD_QDRANT_URL\` | Qdrant URL |
144
+ | \`PROD_QDRANT_API_KEY\` | Qdrant API key |
145
+
146
+ ---
147
+
148
+ ## Usage Tips for LLM Agents
149
+
150
+ 1. **Always use \`--json\` flag** when available for structured output
151
+ 2. **Check config first**: \`husky config test\` before API calls
152
+ 3. **Use prebuild commands** for complex workflows (e.g., \`tickets similar\`)
153
+ 4. **Customer 360** combines Billbee + Zendesk data in one call
154
+ 5. **Semantic search** requires Qdrant and Vertex AI configured
155
+ `;
156
+ }
157
+ export function printLLMContext() {
158
+ console.log(generateLLMContext());
159
+ }
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 } 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.3")
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,11 @@ program.addCommand(completionCommand);
46
48
  program.addCommand(worktreeCommand);
47
49
  program.addCommand(workerCommand);
48
50
  program.addCommand(bizCommand);
51
+ // Handle --llm flag specially
52
+ if (process.argv.includes("--llm")) {
53
+ printLLMContext();
54
+ process.exit(0);
55
+ }
49
56
  // Check if no command was provided - run interactive mode
50
57
  if (process.argv.length <= 2) {
51
58
  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.3",
4
4
  "description": "CLI for Huskyv0 Task Orchestration with Claude Agent SDK",
5
5
  "type": "module",
6
6
  "bin": {