@tpmjs/cli 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.
Files changed (97) hide show
  1. package/README.md +127 -0
  2. package/bin/run.js +5 -0
  3. package/dist/commands/agent/chat.d.ts +23 -0
  4. package/dist/commands/agent/chat.js +608 -0
  5. package/dist/commands/agent/chat.js.map +1 -0
  6. package/dist/commands/agent/create.d.ts +22 -0
  7. package/dist/commands/agent/create.js +549 -0
  8. package/dist/commands/agent/create.js.map +1 -0
  9. package/dist/commands/agent/delete.d.ts +19 -0
  10. package/dist/commands/agent/delete.js +529 -0
  11. package/dist/commands/agent/delete.js.map +1 -0
  12. package/dist/commands/agent/list.d.ts +16 -0
  13. package/dist/commands/agent/list.js +535 -0
  14. package/dist/commands/agent/list.js.map +1 -0
  15. package/dist/commands/agent/update.d.ts +25 -0
  16. package/dist/commands/agent/update.js +547 -0
  17. package/dist/commands/agent/update.js.map +1 -0
  18. package/dist/commands/auth/login.d.ts +21 -0
  19. package/dist/commands/auth/login.js +603 -0
  20. package/dist/commands/auth/login.js.map +1 -0
  21. package/dist/commands/auth/logout.d.ts +13 -0
  22. package/dist/commands/auth/logout.js +227 -0
  23. package/dist/commands/auth/logout.js.map +1 -0
  24. package/dist/commands/auth/status.d.ts +14 -0
  25. package/dist/commands/auth/status.js +542 -0
  26. package/dist/commands/auth/status.js.map +1 -0
  27. package/dist/commands/auth/whoami.d.ts +14 -0
  28. package/dist/commands/auth/whoami.js +500 -0
  29. package/dist/commands/auth/whoami.js.map +1 -0
  30. package/dist/commands/collection/add.d.ts +18 -0
  31. package/dist/commands/collection/add.js +509 -0
  32. package/dist/commands/collection/add.js.map +1 -0
  33. package/dist/commands/collection/create.d.ts +17 -0
  34. package/dist/commands/collection/create.js +521 -0
  35. package/dist/commands/collection/create.js.map +1 -0
  36. package/dist/commands/collection/delete.d.ts +19 -0
  37. package/dist/commands/collection/delete.js +531 -0
  38. package/dist/commands/collection/delete.js.map +1 -0
  39. package/dist/commands/collection/import.d.ts +18 -0
  40. package/dist/commands/collection/import.js +546 -0
  41. package/dist/commands/collection/import.js.map +1 -0
  42. package/dist/commands/collection/list.d.ts +16 -0
  43. package/dist/commands/collection/list.js +531 -0
  44. package/dist/commands/collection/list.js.map +1 -0
  45. package/dist/commands/collection/remove.d.ts +18 -0
  46. package/dist/commands/collection/remove.js +501 -0
  47. package/dist/commands/collection/remove.js.map +1 -0
  48. package/dist/commands/collection/update.d.ts +20 -0
  49. package/dist/commands/collection/update.js +522 -0
  50. package/dist/commands/collection/update.js.map +1 -0
  51. package/dist/commands/doctor.d.ts +14 -0
  52. package/dist/commands/doctor.js +592 -0
  53. package/dist/commands/doctor.js.map +1 -0
  54. package/dist/commands/mcp/config.d.ts +19 -0
  55. package/dist/commands/mcp/config.js +265 -0
  56. package/dist/commands/mcp/config.js.map +1 -0
  57. package/dist/commands/mcp/serve.d.ts +23 -0
  58. package/dist/commands/mcp/serve.js +689 -0
  59. package/dist/commands/mcp/serve.js.map +1 -0
  60. package/dist/commands/playground.d.ts +23 -0
  61. package/dist/commands/playground.js +666 -0
  62. package/dist/commands/playground.js.map +1 -0
  63. package/dist/commands/publish/check.d.ts +17 -0
  64. package/dist/commands/publish/check.js +544 -0
  65. package/dist/commands/publish/check.js.map +1 -0
  66. package/dist/commands/publish/preview.d.ts +19 -0
  67. package/dist/commands/publish/preview.js +291 -0
  68. package/dist/commands/publish/preview.js.map +1 -0
  69. package/dist/commands/tool/execute.d.ts +21 -0
  70. package/dist/commands/tool/execute.js +574 -0
  71. package/dist/commands/tool/execute.js.map +1 -0
  72. package/dist/commands/tool/info.d.ts +18 -0
  73. package/dist/commands/tool/info.js +537 -0
  74. package/dist/commands/tool/info.js.map +1 -0
  75. package/dist/commands/tool/init.d.ts +24 -0
  76. package/dist/commands/tool/init.js +461 -0
  77. package/dist/commands/tool/init.js.map +1 -0
  78. package/dist/commands/tool/search.d.ts +20 -0
  79. package/dist/commands/tool/search.js +566 -0
  80. package/dist/commands/tool/search.js.map +1 -0
  81. package/dist/commands/tool/trending.d.ts +15 -0
  82. package/dist/commands/tool/trending.js +523 -0
  83. package/dist/commands/tool/trending.js.map +1 -0
  84. package/dist/commands/tool/validate.d.ts +15 -0
  85. package/dist/commands/tool/validate.js +555 -0
  86. package/dist/commands/tool/validate.js.map +1 -0
  87. package/dist/commands/update.d.ts +15 -0
  88. package/dist/commands/update.js +228 -0
  89. package/dist/commands/update.js.map +1 -0
  90. package/dist/hooks/init.d.ts +5 -0
  91. package/dist/hooks/init.js +8 -0
  92. package/dist/hooks/init.js.map +1 -0
  93. package/dist/index.d.ts +262 -0
  94. package/dist/index.js +473 -0
  95. package/dist/index.js.map +1 -0
  96. package/oclif.manifest.json +1699 -0
  97. package/package.json +104 -0
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # @tpmjs/cli
2
+
3
+ Command-line interface for TPMJS - the universal tool registry for AI agents.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @tpmjs/cli
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ```bash
14
+ # Search for tools
15
+ tpm tool search firecrawl
16
+
17
+ # Get tool info
18
+ tpm tool info @tpmjs/official-firecrawl scrapeTool
19
+
20
+ # Show trending tools
21
+ tpm tool trending
22
+
23
+ # Authenticate
24
+ tpm auth login --api-key YOUR_API_KEY
25
+
26
+ # List your agents
27
+ tpm agent list
28
+
29
+ # List your collections
30
+ tpm collection list
31
+
32
+ # Generate MCP config
33
+ tpm mcp config ajax/ajax-collection
34
+ ```
35
+
36
+ ## Commands
37
+
38
+ ### Authentication
39
+
40
+ ```bash
41
+ tpm auth login # Login with API key or browser OAuth
42
+ tpm auth logout # Log out
43
+ tpm auth status # Show authentication status
44
+ tpm auth whoami # Show current user info
45
+ ```
46
+
47
+ ### Tools
48
+
49
+ ```bash
50
+ tpm tool search [query] # Search for tools
51
+ tpm tool info <pkg> <tool> # Get tool details
52
+ tpm tool trending # Show trending tools
53
+ tpm tool validate # Validate local tpmjs config
54
+ ```
55
+
56
+ ### Agents
57
+
58
+ ```bash
59
+ tpm agent list # List your agents
60
+ tpm agent create # Create a new agent
61
+ tpm agent update <id> # Update an agent
62
+ tpm agent delete <id> # Delete an agent
63
+ tpm agent chat <id> # Chat with an agent
64
+ ```
65
+
66
+ ### Collections
67
+
68
+ ```bash
69
+ tpm collection list # List your collections
70
+ tpm collection create # Create a collection
71
+ tpm collection add # Add tools to a collection
72
+ tpm collection remove # Remove tools from a collection
73
+ ```
74
+
75
+ ### MCP Integration
76
+
77
+ ```bash
78
+ tpm mcp config <user/collection> # Generate MCP config
79
+ tpm mcp serve # Run as local MCP server
80
+ ```
81
+
82
+ ### Utilities
83
+
84
+ ```bash
85
+ tpm doctor # Run diagnostic checks
86
+ tpm update # Update CLI to latest version
87
+ ```
88
+
89
+ ## Configuration
90
+
91
+ Config is stored in `~/.tpmjs/config.json`:
92
+
93
+ ```json
94
+ {
95
+ "apiUrl": "https://tpmjs.com/api",
96
+ "defaultOutput": "human",
97
+ "verbose": false,
98
+ "analytics": false
99
+ }
100
+ ```
101
+
102
+ Credentials are stored securely in `~/.tpmjs/credentials.json`.
103
+
104
+ ## Environment Variables
105
+
106
+ - `TPMJS_API_KEY` - API key for authentication
107
+ - `TPMJS_API_URL` - Custom API URL (default: https://tpmjs.com/api)
108
+
109
+ ## Output Formats
110
+
111
+ All commands support `--json` flag for machine-readable output:
112
+
113
+ ```bash
114
+ tpm tool search firecrawl --json | jq '.data[0].name'
115
+ ```
116
+
117
+ ## Verbose Mode
118
+
119
+ Use `--verbose` or `-v` for detailed output:
120
+
121
+ ```bash
122
+ tpm doctor --verbose
123
+ ```
124
+
125
+ ## License
126
+
127
+ MIT
package/bin/run.js ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execute } from '@oclif/core';
4
+
5
+ await execute({ dir: import.meta.url });
@@ -0,0 +1,23 @@
1
+ import * as _oclif_core_interfaces from '@oclif/core/interfaces';
2
+ import { Command } from '@oclif/core';
3
+
4
+ declare class AgentChat extends Command {
5
+ static description: string;
6
+ static examples: string[];
7
+ static flags: {
8
+ interactive: _oclif_core_interfaces.BooleanFlag<boolean>;
9
+ conversation: _oclif_core_interfaces.OptionFlag<string | undefined, _oclif_core_interfaces.CustomOptions>;
10
+ json: _oclif_core_interfaces.BooleanFlag<boolean>;
11
+ verbose: _oclif_core_interfaces.BooleanFlag<boolean>;
12
+ };
13
+ static args: {
14
+ agent: _oclif_core_interfaces.Arg<string, Record<string, unknown>>;
15
+ message: _oclif_core_interfaces.Arg<string | undefined, Record<string, unknown>>;
16
+ };
17
+ run(): Promise<void>;
18
+ private singleMessage;
19
+ private interactiveChat;
20
+ private sendChatMessage;
21
+ }
22
+
23
+ export { AgentChat as default };