@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.
- package/README.md +127 -0
- package/bin/run.js +5 -0
- package/dist/commands/agent/chat.d.ts +23 -0
- package/dist/commands/agent/chat.js +608 -0
- package/dist/commands/agent/chat.js.map +1 -0
- package/dist/commands/agent/create.d.ts +22 -0
- package/dist/commands/agent/create.js +549 -0
- package/dist/commands/agent/create.js.map +1 -0
- package/dist/commands/agent/delete.d.ts +19 -0
- package/dist/commands/agent/delete.js +529 -0
- package/dist/commands/agent/delete.js.map +1 -0
- package/dist/commands/agent/list.d.ts +16 -0
- package/dist/commands/agent/list.js +535 -0
- package/dist/commands/agent/list.js.map +1 -0
- package/dist/commands/agent/update.d.ts +25 -0
- package/dist/commands/agent/update.js +547 -0
- package/dist/commands/agent/update.js.map +1 -0
- package/dist/commands/auth/login.d.ts +21 -0
- package/dist/commands/auth/login.js +603 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +13 -0
- package/dist/commands/auth/logout.js +227 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/auth/status.d.ts +14 -0
- package/dist/commands/auth/status.js +542 -0
- package/dist/commands/auth/status.js.map +1 -0
- package/dist/commands/auth/whoami.d.ts +14 -0
- package/dist/commands/auth/whoami.js +500 -0
- package/dist/commands/auth/whoami.js.map +1 -0
- package/dist/commands/collection/add.d.ts +18 -0
- package/dist/commands/collection/add.js +509 -0
- package/dist/commands/collection/add.js.map +1 -0
- package/dist/commands/collection/create.d.ts +17 -0
- package/dist/commands/collection/create.js +521 -0
- package/dist/commands/collection/create.js.map +1 -0
- package/dist/commands/collection/delete.d.ts +19 -0
- package/dist/commands/collection/delete.js +531 -0
- package/dist/commands/collection/delete.js.map +1 -0
- package/dist/commands/collection/import.d.ts +18 -0
- package/dist/commands/collection/import.js +546 -0
- package/dist/commands/collection/import.js.map +1 -0
- package/dist/commands/collection/list.d.ts +16 -0
- package/dist/commands/collection/list.js +531 -0
- package/dist/commands/collection/list.js.map +1 -0
- package/dist/commands/collection/remove.d.ts +18 -0
- package/dist/commands/collection/remove.js +501 -0
- package/dist/commands/collection/remove.js.map +1 -0
- package/dist/commands/collection/update.d.ts +20 -0
- package/dist/commands/collection/update.js +522 -0
- package/dist/commands/collection/update.js.map +1 -0
- package/dist/commands/doctor.d.ts +14 -0
- package/dist/commands/doctor.js +592 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/mcp/config.d.ts +19 -0
- package/dist/commands/mcp/config.js +265 -0
- package/dist/commands/mcp/config.js.map +1 -0
- package/dist/commands/mcp/serve.d.ts +23 -0
- package/dist/commands/mcp/serve.js +689 -0
- package/dist/commands/mcp/serve.js.map +1 -0
- package/dist/commands/playground.d.ts +23 -0
- package/dist/commands/playground.js +666 -0
- package/dist/commands/playground.js.map +1 -0
- package/dist/commands/publish/check.d.ts +17 -0
- package/dist/commands/publish/check.js +544 -0
- package/dist/commands/publish/check.js.map +1 -0
- package/dist/commands/publish/preview.d.ts +19 -0
- package/dist/commands/publish/preview.js +291 -0
- package/dist/commands/publish/preview.js.map +1 -0
- package/dist/commands/tool/execute.d.ts +21 -0
- package/dist/commands/tool/execute.js +574 -0
- package/dist/commands/tool/execute.js.map +1 -0
- package/dist/commands/tool/info.d.ts +18 -0
- package/dist/commands/tool/info.js +537 -0
- package/dist/commands/tool/info.js.map +1 -0
- package/dist/commands/tool/init.d.ts +24 -0
- package/dist/commands/tool/init.js +461 -0
- package/dist/commands/tool/init.js.map +1 -0
- package/dist/commands/tool/search.d.ts +20 -0
- package/dist/commands/tool/search.js +566 -0
- package/dist/commands/tool/search.js.map +1 -0
- package/dist/commands/tool/trending.d.ts +15 -0
- package/dist/commands/tool/trending.js +523 -0
- package/dist/commands/tool/trending.js.map +1 -0
- package/dist/commands/tool/validate.d.ts +15 -0
- package/dist/commands/tool/validate.js +555 -0
- package/dist/commands/tool/validate.js.map +1 -0
- package/dist/commands/update.d.ts +15 -0
- package/dist/commands/update.js +228 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/hooks/init.d.ts +5 -0
- package/dist/hooks/init.js +8 -0
- package/dist/hooks/init.js.map +1 -0
- package/dist/index.d.ts +262 -0
- package/dist/index.js +473 -0
- package/dist/index.js.map +1 -0
- package/oclif.manifest.json +1699 -0
- 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,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 };
|