hissuno 0.2.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,401 @@
1
+ # hissuno
2
+
3
+ Command-line interface for interacting with Hissuno - the unified context layer for product agents. Set up instances, traverse the knowledge graph, manage feedback and issues, search with natural language, and connect integrations - all from your terminal.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g hissuno
9
+ ```
10
+
11
+ Requires Node.js 20 or later.
12
+
13
+ ## Quick Start
14
+
15
+ ### New instance
16
+
17
+ Run the infrastructure wizard to set up everything from scratch:
18
+
19
+ ```bash
20
+ npm i -g hissuno
21
+ hissuno setup
22
+ ```
23
+
24
+ This clones the repository, installs dependencies, configures PostgreSQL with pgvector, pushes the schema, optionally seeds demo data, and auto-configures the CLI.
25
+
26
+ ### Existing instance
27
+
28
+ Connect the CLI to a running Hissuno server:
29
+
30
+ ```bash
31
+ hissuno config
32
+ ```
33
+
34
+ This walks you through authentication, project detection, and optionally connecting data sources (Intercom, Gong, Slack, etc.).
35
+
36
+ Configuration is saved to `~/.hissuno/config.json`.
37
+
38
+ ### Production deployment
39
+
40
+ Deploy Hissuno to a cloud provider (e.g. Vercel + Neon) and set up the database from your local machine.
41
+
42
+ **1. Set up your database and hosting**
43
+
44
+ Create a PostgreSQL database with pgvector enabled (e.g. [Neon](https://neon.tech), [Supabase](https://supabase.com)) and deploy the app to your hosting provider (e.g. [Vercel](https://vercel.com)). Set the required environment variables in your hosting dashboard:
45
+
46
+ - `DATABASE_URL` - your database connection string
47
+ - `AUTH_SECRET` - run `openssl rand -base64 32` to generate
48
+ - `NEXT_PUBLIC_APP_URL` - your deployment URL (e.g. `https://hissuno.example.com`)
49
+ - `OPENAI_API_KEY` - your OpenAI key
50
+
51
+ **2. Push schema and seed from your local machine**
52
+
53
+ ```bash
54
+ cd hissuno/app
55
+
56
+ # Create .env.prod with your production DATABASE_URL and app URL, push schema, and seed
57
+ hissuno setup --only env,database,seed --app-dir . --env prod
58
+ ```
59
+
60
+ When prompted, enter your production database URL and deployment URL.
61
+
62
+ **3. Connect the CLI to your production instance**
63
+
64
+ ```bash
65
+ hissuno config
66
+ ```
67
+
68
+ Enter your deployment URL and the API key from the seed output.
69
+
70
+ ### Check connection
71
+
72
+ ```bash
73
+ hissuno status
74
+ ```
75
+
76
+ ## Configuration
77
+
78
+ The CLI stores its configuration at `~/.hissuno/config.json`:
79
+
80
+ ```json
81
+ {
82
+ "api_key": "hiss_...",
83
+ "base_url": "http://localhost:3000",
84
+ "project_id": "your-project-id"
85
+ }
86
+ ```
87
+
88
+ | Field | Description |
89
+ |-------|-------------|
90
+ | `api_key` | Your Hissuno API key (starts with `hiss_`) |
91
+ | `base_url` | Hissuno instance URL (default: `http://localhost:3000`) |
92
+ | `project_id` | Auto-detected on first use; cached for subsequent calls |
93
+
94
+ The project ID is resolved automatically from your API key on the first request and cached locally.
95
+
96
+ ## Global Options
97
+
98
+ | Flag | Description |
99
+ |------|-------------|
100
+ | `--json` | Output raw JSON instead of formatted terminal output |
101
+ | `--version` | Print CLI version |
102
+ | `--help` | Show help for any command |
103
+
104
+ ## Commands
105
+
106
+ ### `hissuno setup`
107
+
108
+ Infrastructure wizard. Sets up a new Hissuno instance from scratch.
109
+
110
+ ```bash
111
+ hissuno setup
112
+ ```
113
+
114
+ #### Running specific steps
115
+
116
+ Resume from a specific step (runs that step and everything after):
117
+
118
+ ```bash
119
+ hissuno setup --from seed
120
+ ```
121
+
122
+ Run only specific steps (comma-separated):
123
+
124
+ ```bash
125
+ hissuno setup --only seed,start
126
+ ```
127
+
128
+ Available steps: `check-node`, `clone`, `install`, `build`, `postgres`, `env`, `database`, `seed`, `config`, `start`.
129
+
130
+ #### Target environment
131
+
132
+ Use `--env` to write to a specific env file. The file name is `.env.<environment>`:
133
+
134
+ ```bash
135
+ # Writes to .env.prod
136
+ hissuno setup --env prod
137
+
138
+ # Writes to .env.staging
139
+ hissuno setup --env staging
140
+ ```
141
+
142
+ Without `--env`, defaults to `.env.local`.
143
+
144
+ #### `hissuno setup oauth [platform]`
145
+
146
+ Configure OAuth credentials for an integration. Prompts for client ID and secret (or GitHub App credentials), writes them to `.env.local`, and tells you to restart the server.
147
+
148
+ ```bash
149
+ # Interactive - prompts for which platform
150
+ hissuno setup oauth
151
+
152
+ # Specify the platform directly
153
+ hissuno setup oauth slack
154
+
155
+ # Non-interactive with flags
156
+ hissuno setup oauth slack --client-id YOUR_ID --client-secret YOUR_SECRET
157
+
158
+ # GitHub uses different credentials
159
+ hissuno setup oauth github \
160
+ --app-slug your-app \
161
+ --app-id 12345 \
162
+ --private-key BASE64_KEY
163
+
164
+ # Custom app directory
165
+ hissuno setup oauth slack --app-dir ./my-hissuno/app
166
+ ```
167
+
168
+ Supported platforms: `slack`, `github`, `jira`, `linear`, `intercom`.
169
+
170
+ | Option | Platform | Description |
171
+ |--------|----------|-------------|
172
+ | `--client-id <id>` | slack, jira, linear, intercom | OAuth client ID |
173
+ | `--client-secret <secret>` | slack, jira, linear, intercom | OAuth client secret |
174
+ | `--app-slug <slug>` | github | GitHub App slug |
175
+ | `--app-id <id>` | github | GitHub App ID |
176
+ | `--private-key <key>` | github | GitHub private key (base64-encoded) |
177
+ | `--app-dir <dir>` | all | Path to app directory (default: `./hissuno/app`) |
178
+
179
+ ### `hissuno config`
180
+
181
+ Manual configuration wizard. Connects the CLI to an existing Hissuno instance.
182
+
183
+ ```bash
184
+ hissuno config
185
+ ```
186
+
187
+ ### `hissuno status`
188
+
189
+ Check connection health.
190
+
191
+ ```bash
192
+ hissuno status
193
+ ```
194
+
195
+ ### `hissuno list <type>`
196
+
197
+ List resources of a given type. Supported types: `knowledge`, `feedback`, `issues`, `contacts`.
198
+
199
+ ```bash
200
+ # List recent feedback
201
+ hissuno list feedback
202
+
203
+ # List bugs with high priority
204
+ hissuno list issues --issue-type bug --priority high
205
+
206
+ # List contacts from a specific company
207
+ hissuno list contacts --company-id abc123
208
+
209
+ # List feedback from Intercom, limited to 5 results
210
+ hissuno list feedback --source intercom --limit 5
211
+
212
+ # Output as JSON for scripting
213
+ hissuno --json list issues
214
+ ```
215
+
216
+ #### Filter options
217
+
218
+ | Option | Applies to | Description |
219
+ |--------|-----------|-------------|
220
+ | `--source <source>` | feedback | Filter by source: `widget`, `slack`, `intercom`, `gong`, `api`, `manual` |
221
+ | `--status <status>` | feedback, issues | Filter by status |
222
+ | `--tags <tags>` | feedback | Comma-separated tag filter |
223
+ | `--contact-id <id>` | feedback | Filter by contact ID |
224
+ | `--search <query>` | all | Text search filter |
225
+ | `--issue-type <type>` | issues | Filter by type: `bug`, `feature_request`, `change_request` |
226
+ | `--priority <priority>` | issues | Filter by priority: `low`, `medium`, `high` |
227
+ | `--company-id <id>` | contacts | Filter by company ID |
228
+ | `--role <role>` | contacts | Filter by role |
229
+ | `--limit <n>` | all | Max results (default: 20) |
230
+
231
+ ### `hissuno get <type> <id>`
232
+
233
+ Get full details of a specific resource, including conversation messages for feedback.
234
+
235
+ ```bash
236
+ # Get a feedback session with its full conversation
237
+ hissuno get feedback 550e8400-e29b-41d4-a716-446655440000
238
+
239
+ # Get an issue
240
+ hissuno get issues abc123
241
+
242
+ # Get a contact
243
+ hissuno get contacts def456
244
+
245
+ # Get a knowledge package
246
+ hissuno get knowledge pkg789
247
+
248
+ # Output as JSON
249
+ hissuno --json get issues abc123
250
+ ```
251
+
252
+ Supported types: `knowledge`, `feedback`, `issues`, `contacts`.
253
+
254
+ ### `hissuno search <query>`
255
+
256
+ Search across resources using natural language. Uses semantic vector search with full-text fallback.
257
+
258
+ ```bash
259
+ # Search for checkout-related issues
260
+ hissuno search "checkout bugs"
261
+
262
+ # Search only within feedback
263
+ hissuno search "login problems" --type feedback
264
+
265
+ # Limit results
266
+ hissuno search "pricing page" --limit 5
267
+
268
+ # JSON output
269
+ hissuno --json search "onboarding flow"
270
+ ```
271
+
272
+ | Option | Description |
273
+ |--------|-------------|
274
+ | `--type <type>` | Limit to one resource type: `knowledge`, `feedback`, `issues`, `contacts` |
275
+ | `--limit <n>` | Max results (default: 10) |
276
+
277
+ ### `hissuno add <type>`
278
+
279
+ Interactively create a new resource. Supported types: `feedback`, `issues`, `contacts`.
280
+
281
+ Knowledge sources cannot be added via CLI - use the Hissuno dashboard instead.
282
+
283
+ ```bash
284
+ # Create a new issue (interactive prompts for type, title, description, priority)
285
+ hissuno add issues
286
+
287
+ # Create a new contact (interactive prompts for name, email, role, etc.)
288
+ hissuno add contacts
289
+
290
+ # Create feedback with conversation messages
291
+ hissuno add feedback
292
+
293
+ # Output the created resource as JSON
294
+ hissuno --json add issues
295
+ ```
296
+
297
+ #### Prompted fields by type
298
+
299
+ **issues** - type (bug / feature request / change request), title, description, priority (optional)
300
+
301
+ **contacts** - name, email, role (optional), title (optional), phone (optional), company ID (optional), champion flag
302
+
303
+ **feedback** - one or more conversation messages (role + content), name (optional), tags (optional)
304
+
305
+ ### `hissuno integrate [platform] [action]`
306
+
307
+ Manage third-party integrations. Supported platforms: `intercom`, `gong`, `zendesk`, `slack`, `github`, `jira`, `linear`.
308
+
309
+ ```bash
310
+ # List all integrations with their connection status
311
+ hissuno integrate
312
+
313
+ # Interactive wizard for a specific platform
314
+ hissuno integrate intercom
315
+
316
+ # Check detailed status
317
+ hissuno integrate gong status
318
+
319
+ # Connect a platform
320
+ hissuno integrate slack connect
321
+
322
+ # Connect Gong with inline credentials (non-interactive)
323
+ hissuno integrate gong connect \
324
+ --access-key YOUR_KEY \
325
+ --access-key-secret YOUR_SECRET \
326
+ --sync-frequency 24h
327
+
328
+ # Connect Zendesk
329
+ hissuno integrate zendesk connect \
330
+ --subdomain mycompany \
331
+ --email admin@mycompany.com \
332
+ --api-token YOUR_TOKEN
333
+
334
+ # Connect Intercom with an API token
335
+ hissuno integrate intercom connect --access-token YOUR_TOKEN
336
+
337
+ # Update sync settings
338
+ hissuno integrate intercom configure
339
+
340
+ # Trigger a manual sync
341
+ hissuno integrate gong sync
342
+ hissuno integrate zendesk sync --mode full
343
+
344
+ # Disconnect an integration
345
+ hissuno integrate github disconnect
346
+
347
+ # JSON output
348
+ hissuno --json integrate
349
+ ```
350
+
351
+ #### Actions
352
+
353
+ | Action | Description |
354
+ |--------|-------------|
355
+ | _(none)_ | Interactive wizard - shows status and prompts for next steps |
356
+ | `status` | Show detailed connection status |
357
+ | `connect` | Connect the platform (OAuth or token-based) |
358
+ | `configure` | Update settings (sync frequency, auto-sync toggle) |
359
+ | `sync` | Trigger a manual sync (Intercom, Gong, Zendesk only) |
360
+ | `disconnect` | Disconnect the integration |
361
+
362
+ #### Connection options
363
+
364
+ | Option | Platform | Description |
365
+ |--------|----------|-------------|
366
+ | `--access-key <key>` | Gong | Access key |
367
+ | `--access-key-secret <secret>` | Gong | Access key secret |
368
+ | `--base-url <url>` | Gong | Base URL (default: `https://api.gong.io`) |
369
+ | `--subdomain <subdomain>` | Zendesk | Zendesk subdomain |
370
+ | `--email <email>` | Zendesk | Admin email |
371
+ | `--api-token <token>` | Zendesk | API token |
372
+ | `--access-token <token>` | Intercom | Access token |
373
+ | `--sync-frequency <freq>` | Gong, Zendesk, Intercom | Sync frequency: `manual`, `1h`, `6h`, `24h` |
374
+ | `--mode <mode>` | sync action | Sync mode: `incremental` (default), `full` |
375
+
376
+ OAuth-based platforms (Slack, GitHub, Jira, Linear) open your browser to complete authorization.
377
+
378
+ ### `hissuno types`
379
+
380
+ Print documentation for all resource types, including available filters and fields.
381
+
382
+ ```bash
383
+ hissuno types
384
+
385
+ # JSON output
386
+ hissuno --json types
387
+ ```
388
+
389
+ ## JSON Mode
390
+
391
+ Pass `--json` before the command name to get raw JSON output, useful for scripting and piping to other tools:
392
+
393
+ ```bash
394
+ hissuno --json list issues | jq '.issues[] | .title'
395
+ hissuno --json search "auth errors" | jq '.results'
396
+ hissuno --json integrate gong status
397
+ ```
398
+
399
+ ## License
400
+
401
+ MIT
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import '../dist/index.js'