@inkeep/agents-cli 0.0.0-dev-20260212190104 → 0.0.0-dev-20260212195916

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.
Files changed (3) hide show
  1. package/README.md +21 -596
  2. package/dist/index.js +1 -0
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -1,624 +1,49 @@
1
- # Inkeep CLI
1
+ # @inkeep/agents-cli
2
2
 
3
- A command-line interface for managing and interacting with Inkeep Agent Frameworks.
3
+ CLI for working with the Inkeep Agent Framework.
4
4
 
5
- ## Installation & Setup
6
-
7
- ### Prerequisites
8
-
9
- - Node.js >= 20.x
10
- - pnpm package manager
11
- - Inkeep Agent Framework backend running (default: http://localhost:3002)
12
- - `@inkeep/agents-manage-ui` package installed (for visual agents orchestration)
13
-
14
- ### Quick Start
15
-
16
- > **📖 For detailed setup instructions, see [SETUP.md](./SETUP.md)**
17
-
18
- 1. **Install and build**
19
-
20
- ```bash
21
- # Navigate to the CLI directory
22
- cd /path/to/agent-framework/agents-cli
23
-
24
- # Install dependencies
25
- pnpm install
26
-
27
- # Build the CLI
28
- pnpm build
29
- ```
30
-
31
- 2. **Install globally** (recommended)
32
-
33
- **Option A: Using npm link (for development)**
34
-
35
- ```bash
36
- # Create global symlink from the agents-cli directory
37
- npm link
38
-
39
- # Verify installation
40
- which inkeep # Should show path to inkeep command
41
- ```
42
-
43
- **Option B: Using pnpm/npm global install (after publishing)**
44
-
45
- ```bash
46
- # Install the scoped package globally
47
- pnpm add -g @inkeep/agents-cli
48
- # or
49
- npm install -g @inkeep/agents-cli
50
-
51
- # Verify installation
52
- inkeep --version
53
- ```
54
-
55
- **Note:**
56
-
57
- - For local development, use `npm link` (more reliable than `pnpm link --global`)
58
- - The command is still `inkeep` even though the package name is `@inkeep/agents-cli`
59
- - If linking fails, try unlinking first: `npm unlink -g @inkeep/agents-cli`
60
-
61
- 3. **Install the dashboard package (for visual agents orchestration)**
5
+ ## Install
62
6
 
63
7
  ```bash
64
- # Install the dashboard UI package for visual agents orchestration
65
- npm install @inkeep/agents-manage-ui
8
+ npm install -g @inkeep/agents-cli
66
9
  # or
67
- pnpm add @inkeep/agents-manage-ui
68
- ```
69
-
70
- 4. **Configure your project**
71
-
72
- ```bash
73
- # Create an inkeep.config.ts file with your tenant ID
74
- inkeep init
75
-
76
- # Or manually create inkeep.config.ts:
77
- # export default defineConfig({
78
- # tenantId: "your-tenant-id",
79
- # projectId: "your-project-id",
80
- # agentsApiUrl: "http://localhost:3002",
81
- # });
82
- ```
83
-
84
- ## Configuration
85
-
86
- ### Configuration Sources (priority order)
87
-
88
- 1. **Command-line flags** - Highest priority (e.g., `--tenant-id`, `--agents-api-url`, `--config`)
89
- 2. **Config file** - `inkeep.config.ts` (or file specified with `--config`)
90
- 3. **Environment variables** - `INKEEP_AGENTS_API_URL`
91
- 4. **Defaults** - Lowest priority (defaults to `http://localhost:3002`)
92
-
93
- ### Config File Options
94
-
95
- Most commands support the `--config` option to specify a custom configuration file:
96
-
97
- ```bash
98
- # Use custom config file
99
- inkeep list-graphs --project my-project --config ./staging-config.ts
100
-
101
- # Backward compatibility (deprecated)
102
- inkeep list-graphs --project my-project --config-file-path ./staging-config.ts
103
- ```
104
-
105
- ### Environment Variables
106
-
107
- Create a `.env` file in your project directory:
108
-
109
- ```bash
110
- INKEEP_AGENTS_API_URL=http://localhost:3002
10
+ pnpm add -g @inkeep/agents-cli
111
11
  ```
112
12
 
113
- Or export them in your shell:
13
+ The executable command is `inkeep`.
114
14
 
115
- ```bash
116
- export INKEEP_AGENTS_API_URL=http://localhost:3002
117
- ```
118
-
119
- ## Commands
15
+ ## Docs
120
16
 
121
- ### `inkeep add [template]`
17
+ - CLI overview: <https://docs.inkeep.com/guides/cli/overview>
18
+ - CLI reference: <https://docs.inkeep.com/typescript-sdk/cli-reference>
19
+ - Push guide: <https://docs.inkeep.com/guides/cli/push-to-cloud>
20
+ - Pull guide: <https://docs.inkeep.com/guides/cli/pull-from-cloud>
21
+ - Profile setup: <https://docs.inkeep.com/guides/cli/setup-profile>
122
22
 
123
- Pull a template project from the [Inkeep Agents Cookbook](https://github.com/inkeep/agents/tree/main/agents-cookbook/template-projects).
23
+ ## Quick usage
124
24
 
125
25
  ```bash
126
- # Add a template
127
- inkeep add my-template
128
-
129
- # Add template to specific path
130
- inkeep add my-template --target-path ./src/templates
131
-
132
- # Using config file
133
- inkeep add my-template --config ./my-config.ts
134
- ```
135
-
136
- ### `inkeep init [path]`
137
-
138
- Initialize a new Inkeep configuration file.
139
-
140
- ```bash
141
- # Interactive initialization
142
26
  inkeep init
143
-
144
- # Initialize in specific directory
145
- inkeep init ./my-project
146
-
147
- # Skip interactive prompts
148
- inkeep init --no-interactive
149
-
150
- # Use existing config as template
151
- inkeep init --config ./template-config.ts
152
- ```
153
-
154
- ### `inkeep config`
155
-
156
- Manage Inkeep configuration values.
157
-
158
- ```bash
159
- # Get configuration value
160
- inkeep config get tenantId
161
-
162
- # Set configuration value
163
- inkeep config set tenantId my-tenant-id
164
-
165
- # List all configuration values
166
- inkeep config list
167
-
168
- # Using specific config file
169
- inkeep config get tenantId --config ./my-config.ts
170
- ```
171
-
172
- ### `inkeep pull`
173
-
174
- Pull entire project configuration from backend and update local files.
175
-
176
- ```bash
177
- # Pull current project
178
- inkeep pull
179
-
180
- # Pull specific project
181
- inkeep pull --project my-project-id
182
-
183
- # Generate environment file
184
- inkeep pull --env production
185
-
186
- # Generate JSON file instead of updating files
187
- inkeep pull --json
188
-
189
- # Enable debug logging
190
- inkeep pull --debug
191
-
192
- # Using config file
193
- inkeep pull --project my-project-id --config ./my-config.ts
194
- ```
195
-
196
- ### `inkeep dev`
197
-
198
- Start the Inkeep dashboard server, build for production, or export the Next.js project.
199
-
200
- ```bash
201
- # Start development server
202
- inkeep dev
203
-
204
- # Start on custom port and host
205
- inkeep dev --port 3001 --host 0.0.0.0
206
-
207
- # Build for production (packages standalone build)
208
- inkeep dev --build --output-dir ./build
209
-
210
- # Export Next.js project source files
211
- inkeep dev --export --output-dir ./my-dashboard
212
-
213
- # Get dashboard path for deployment
214
- DASHBOARD_PATH=$(inkeep dev --path)
215
- echo "Dashboard built at: $DASHBOARD_PATH"
216
-
217
- # Use with Vercel
218
- vercel --cwd $(inkeep dev --path) -Q .vercel build
219
-
220
- # Use with Docker
221
- docker build -t inkeep-dashboard $(inkeep dev --path)
222
-
223
- # Use with other deployment tools
224
- rsync -av $(inkeep dev --path)/ user@server:/var/www/dashboard/
225
- ```
226
-
227
- ### `inkeep tenant [tenant-id]` ⚠️ NOT IMPLEMENTED
228
-
229
- > **⚠️ WARNING: This command is not yet implemented in the current CLI.**
230
- > Use `inkeep.config.ts` to set your tenant ID instead.
231
-
232
- Manage tenant configuration.
233
-
234
- ```bash
235
- # Set tenant ID
236
- inkeep tenant my-tenant
237
-
238
- # View current tenant ID
239
- inkeep tenant
240
- ```
241
-
242
- ### `inkeep list-graphs`
243
-
244
- List all available graphs for a specific project.
245
-
246
- ```bash
247
- # List graphs for a project (required)
248
- inkeep list-graphs --project my-project-id
249
-
250
- # With custom API URL
251
- inkeep list-graphs --project my-project-id --agent-api-url http://api.example.com:3002
252
-
253
- # With custom tenant ID
254
- inkeep list-graphs --project my-project-id --tenant-id my-tenant-id
255
-
256
- # Using config file
257
- inkeep list-agents --project my-project-id --config ./my-config.ts
258
- ```
259
-
260
- Output:
261
-
262
- ```
263
- ┌─────────────────────────┬────────────────────┬───────────────┬───────────┐
264
- │ Agent ID │ Name │ Default Agent │ Created │
265
- ├─────────────────────────┼────────────────────┼───────────────┼───────────┤
266
- │ customer-support-graph │ Customer Support │ router │ 1/15/2025 │
267
- │ qa-assistant │ QA Assistant │ qa-agent │ 1/14/2025 │
268
- └─────────────────────────┴────────────────────┴───────────────┴───────────┘
269
- ```
270
-
271
- ### `inkeep push`
272
-
273
- Push your project configuration to the backend.
274
-
275
- ```bash
276
- # Push the current project (from the directory with inkeep.config.ts)
277
27
  inkeep push
278
-
279
- # Push specific project
280
- inkeep push --project my-project-id
281
-
282
- # With custom configuration
283
- inkeep push --project my-project-id --config ./my-config.ts
284
-
285
- # With custom API URLs
286
- inkeep push --project my-project-id --agents-api-url http://api.example.com
287
-
288
- # With custom tenant ID
289
- inkeep push --project my-project-id --tenant-id my-tenant-id
290
- ```
291
-
292
- **Features:**
293
-
294
- - Automatically injects tenant ID and API URL from `inkeep.config.ts`
295
- - Validates exactly one Agent is exported
296
- - Warns about dangling resources (unreferenced agents/tools)
297
- - Shows graph summary after successful push
298
- - Handles graph initialization automatically
299
-
300
- **Agent files:** Define your agents in your project (e.g., `agents/*.ts`). The CLI pushes the project containing those agents.
301
-
302
- **Example graph configuration:**
303
-
304
- ```javascript
305
- // customer-support.agent.ts
306
- import { agent, subAgent, tool } from "@inkeep/agents-sdk";
307
-
308
- const assistantSubAgent = subAgent({
309
- id: "assistant",
310
- name: "Assistant",
311
- prompt: "Help users with their questions",
312
- canUse: () => [searchTool],
313
- // No tenantId needed - injected by CLI
314
- });
315
-
316
- // Must export exactly one agent
317
- export const myAgent = agent({
318
- id: "my-assistant",
319
- name: "My Assistant",
320
- defaultSubAgent: assistantSubAgent,
321
- subAgents: () => [assistantSubAgent],
322
- // No tenantId or apiUrl needed - CLI injects from config
323
- });
324
- // No agent.init() call - CLI handles initialization
325
- ```
326
-
327
- ### `inkeep mcp start <graph-file>` ⚠️ NOT IMPLEMENTED
328
-
329
- > **⚠️ WARNING: This command is not yet implemented in the current CLI.**
330
- > MCP functionality is planned but not available in the current version.
331
-
332
- Start MCP (Model Context Protocol) servers defined in a graph file.
333
-
334
- ```bash
335
- # Start MCP servers from a TypeScript agent file
336
- inkeep mcp start examples/agent-configurations/weather-agent.ts
337
-
338
- # Start from compiled JavaScript
339
- inkeep mcp start dist/examples/agent-configurations/weather-agent.js
340
-
341
- # Run in detached mode
342
- inkeep mcp start my-agent.ts --detached
343
-
344
- # Show verbose output
345
- inkeep mcp start my-agent.ts --verbose
346
- ```
347
-
348
- **Features:**
349
-
350
- - Supports both TypeScript (`.ts`) and JavaScript (`.js`) files
351
- - Automatically allocates ports for local servers (3100-3200)
352
- - Shows server names, ports, and URLs
353
- - Distinguishes between local (🏠) and remote (☁️) servers
354
-
355
- ### `inkeep mcp stop` ⚠️ NOT IMPLEMENTED
356
-
357
- > **⚠️ WARNING: This command is not yet implemented in the current CLI.**
358
-
359
- Stop running MCP servers.
360
-
361
- ```bash
362
- # Stop all servers
363
- inkeep mcp stop --all
364
-
365
- # Stop servers for a specific graph
366
- inkeep mcp stop --graph customer-support-graph
367
- ```
368
-
369
- ### `inkeep mcp status` ⚠️ NOT IMPLEMENTED
370
-
371
- > **⚠️ WARNING: This command is not yet implemented in the current CLI.**
372
-
373
- Show status of all MCP servers.
374
-
375
- ```bash
376
- inkeep mcp status
377
- ```
378
-
379
- Output shows:
380
-
381
- - Process ID
382
- - Graph ID
383
- - Tool name
384
- - Port/URL
385
- - Running status
386
- - Uptime
387
-
388
- ### `inkeep mcp list` ⚠️ NOT IMPLEMENTED
389
-
390
- > **⚠️ WARNING: This command is not yet implemented in the current CLI.**
391
-
392
- List all MCP servers with detailed information.
393
-
394
- ```bash
395
- # Default tree view
396
- inkeep mcp list
397
-
398
- # Table format
399
- inkeep mcp list --format table
400
-
401
- # Verbose output (includes descriptions)
402
- inkeep mcp list --verbose
28
+ inkeep pull
29
+ inkeep list-agent --project <project-id>
403
30
  ```
404
31
 
405
- ## Complete Workflow Example
406
-
407
- ### Basic Setup
32
+ ## Local development
408
33
 
409
34
  ```bash
410
- # Install and link CLI
411
- cd agents-cli
412
35
  pnpm install
413
36
  pnpm build
414
37
  npm link
415
-
416
- # Initialize configuration
417
- inkeep init
418
- # Edit inkeep.config.ts to set your tenantId and projectId
419
- ```
420
-
421
- ### Working with Graphs and MCP Servers ⚠️ NOT AVAILABLE
422
-
423
- > **⚠️ WARNING: MCP commands shown below are not yet implemented.**
424
- > This section shows planned functionality that is not available in the current version.
425
-
426
- 1. **Create an agent with MCP tools** (`my-agent.ts`)
427
-
428
- ```typescript
429
- import {
430
- agent,
431
- subAgent,
432
- mcpServer,
433
- } from "@inkeep/agents-sdk";
434
-
435
- // Define MCP servers (tools)
436
- const randomNumberServer = mcpServer({
437
- name: "random_number",
438
- description: "Generates a random number",
439
- execute: async () => Math.random(),
440
- });
441
-
442
- const weatherServer = mcpServer({
443
- name: "weather_api",
444
- description: "Get weather information",
445
- serverUrl: "https://api.weather.example.com/mcp",
446
- });
447
-
448
- // Define sub-agents
449
- const assistantSubAgent = subAgent({
450
- id: "assistant",
451
- name: "Assistant",
452
- prompt: "Help users with various tasks",
453
- canUse: () => [randomNumberServer, weatherServer],
454
- });
455
-
456
- // Export the agent
457
- export const myAgent = agent({
458
- id: "my-assistant",
459
- name: "My Assistant",
460
- defaultSubAgent: assistantSubAgent,
461
- subAgents: () => [assistantSubAgent],
462
- });
463
-
464
- // Export servers for MCP management
465
- export const servers = [randomNumberServer, weatherServer];
466
- ```
467
-
468
- 2. **Monitor and manage servers**
469
-
470
- ```bash
471
- # Check server status
472
- inkeep mcp status
473
-
474
- # List all servers with details
475
- inkeep mcp list
476
-
477
- # Stop servers when done
478
- inkeep mcp stop --all
38
+ inkeep --version
479
39
  ```
480
40
 
481
- ## Working with Different Environments
41
+ ## Contributing
482
42
 
483
- ### Development
484
-
485
- ```bash
486
- # Using environment variables
487
- INKEEP_AGENTS_MANAGE_API_URL=http://localhost:3002 inkeep list-graphs
488
-
489
- # Using .env file
490
- echo "INKEEP_AGENTS_API_URL=http://localhost:3002" > .env
491
- ```
492
-
493
- ### Staging
494
-
495
- ```bash
496
- # Set in config file
497
- # Edit your inkeep.config.ts:
498
- # agentsApiUrl: 'https://staging-api.example.com'
499
- ```
500
-
501
- ### Production
502
-
503
- ```bash
504
- # Using environment variables
505
- export INKEEP_AGENTS_API_URL=https://inkeep-api.example.com
506
- inkeep list-graphs
507
- ```
508
-
509
- ## Development
510
-
511
- ### Running from Source
512
-
513
- ```bash
514
- # Without building (using tsx)
515
- pnpm tsx src/index.ts <command>
516
-
517
- # After building
518
- node dist/index.js <command>
519
-
520
- # Watch mode (auto-rebuild on changes)
521
- pnpm dev
522
- ```
523
-
524
- ### Testing
525
-
526
- ```bash
527
- # Run tests
528
- pnpm test
529
-
530
- # Watch mode
531
- pnpm test:watch
532
-
533
- # Coverage report
534
- pnpm test:coverage
535
- ```
536
-
537
- ### Type Checking
43
+ Run from `agents-cli/`:
538
44
 
539
45
  ```bash
46
+ pnpm lint
540
47
  pnpm typecheck
48
+ pnpm test --run
541
49
  ```
542
-
543
- ### Project Structure
544
-
545
- ```
546
- agents-cli/
547
- ├── src/
548
- │ ├── index.ts # Main CLI entry point
549
- │ ├── config.ts # Configuration management
550
- │ ├── api.ts # API client for backend
551
- │ ├── commands/ # Command implementations
552
- │ │ ├── push.ts # Push graph configurations
553
- │ │ ├── tenant.ts # Tenant management
554
- │ │ └── list-graphs.ts # List graphs
555
- │ ├── types/ # TypeScript declarations
556
- │ └── __tests__/ # Test files
557
- ├── dist/ # Compiled JavaScript
558
- ├── package.json
559
- ├── tsconfig.json
560
- └── README.md
561
- ```
562
-
563
- ## Troubleshooting
564
-
565
- ### Common Issues
566
-
567
- **"Failed to fetch graphs" or connection errors**
568
-
569
- ```bash
570
- # Check if backend is running
571
- curl http://localhost:3002/health
572
-
573
- # Verify API URLs
574
- echo $INKEEP_AGENTS_API_URL
575
-
576
- # Try with explicit URL and project
577
- inkeep list-graphs --project my-project-id --agents-api-url http://localhost:3002
578
- ```
579
-
580
- **Command not found: inkeep**
581
-
582
- ```bash
583
- # Ensure CLI is linked globally
584
- cd agents-cli
585
- npm link
586
-
587
- # Or if published, install globally
588
- pnpm add -g @inkeep/agents-cli
589
- # or
590
- npm install -g @inkeep/agents-cli
591
-
592
- # Or add to PATH manually (for development)
593
- export PATH="$PATH:/path/to/agents-cli/dist"
594
- ```
595
-
596
- ## Dependencies
597
-
598
- ### Runtime Dependencies
599
-
600
- - **commander**: Command-line framework
601
- - **chalk**: Terminal styling
602
- - **dotenv**: Environment variable loading
603
- - **ora**: Loading spinners
604
- - **cli-table3**: Table formatting
605
- - **inquirer**: Interactive prompts
606
- - **inquirer-autocomplete-prompt**: Searchable selections
607
-
608
- ### Development Dependencies
609
-
610
- - **typescript**: TypeScript compiler
611
- - **@types/node**: Node.js types
612
- - **vitest**: Testing framework
613
- - **@vitest/coverage-v8**: Coverage reporting
614
-
615
- ## Requirements
616
-
617
- - Node.js >= 20.x
618
- - pnpm package manager
619
- - TypeScript 5.x
620
- - Inkeep Agent Framework backend
621
-
622
- ## License
623
-
624
- MIT
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  import "./env.js";
2
3
  import "./instrumentation.js";
3
4
  import { addCommand } from "./commands/add.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-cli",
3
- "version": "0.0.0-dev-20260212190104",
3
+ "version": "0.0.0-dev-20260212195916",
4
4
  "description": "Inkeep CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -40,8 +40,8 @@
40
40
  "tsx": "^4.20.5",
41
41
  "yaml": "^2.7.0",
42
42
  "zod": "^4.3.6",
43
- "@inkeep/agents-core": "^0.0.0-dev-20260212190104",
44
- "@inkeep/agents-sdk": "^0.0.0-dev-20260212190104"
43
+ "@inkeep/agents-core": "^0.0.0-dev-20260212195916",
44
+ "@inkeep/agents-sdk": "^0.0.0-dev-20260212195916"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/degit": "^2.8.6",
@@ -52,7 +52,7 @@
52
52
  "vitest": "^3.2.4"
53
53
  },
54
54
  "peerDependencies": {
55
- "@inkeep/agents-manage-ui": "0.0.0-dev-20260212190104"
55
+ "@inkeep/agents-manage-ui": "0.0.0-dev-20260212195916"
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public",