feat: add collection info command and improve CLI discovery
- Add `tpm collection info <collection>` command to list all tools in a collection - Update `run` command examples to show workflow of listing tools first - Fix unsandbox healthCheck tool to use /cluster endpoint instead of /health - Update create-basic-tools template with correct tpmjs field format docs - Change default category from 'ai-ml' to 'utilities' in generator Published: - @tpmjs/cli@0.1.5 - @tpmjs/create-basic-tools@1.0.7 - @tpmjs/tools-unsandbox@0.1.3
This commit is contained in:
parent
16c3b0df10
commit
f0b55a23f9
8 changed files with 308 additions and 27 deletions
|
|
@ -25,7 +25,7 @@ The CLI asks for just your package name and uses sensible defaults for everythin
|
|||
|
||||
- **Description**: Auto-generated from package name
|
||||
- **Tools**: 2 example tools you can customize
|
||||
- **Category**: `ai-ml` (generic)
|
||||
- **Category**: `utilities` (generic)
|
||||
- **License**: MIT
|
||||
- **Output**: Derived from package name
|
||||
|
||||
|
|
@ -82,6 +82,56 @@ content-tools/
|
|||
|
||||
Simply rename `exampleTool.ts` and `anotherTool.ts` to match your use case, then customize the implementation.
|
||||
|
||||
## Generated package.json `tpmjs` Field
|
||||
|
||||
The generator creates a properly formatted `tpmjs` field in your package.json:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "@myorg/content-tools",
|
||||
"keywords": ["tpmjs", "ai-sdk", "utilities"],
|
||||
"tpmjs": {
|
||||
"category": "utilities",
|
||||
"tools": [
|
||||
{
|
||||
"name": "exampleTool",
|
||||
"description": "An example tool - customize this for your use case"
|
||||
},
|
||||
{
|
||||
"name": "anotherTool",
|
||||
"description": "Another example tool - add your implementation here"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Important:** The `tools` field must be an **array** of objects, not an object map:
|
||||
|
||||
```json
|
||||
// ✅ Correct - tools is an array
|
||||
"tools": [
|
||||
{ "name": "myTool", "description": "Does something useful" }
|
||||
]
|
||||
|
||||
// ❌ Wrong - tools is an object (will fail validation)
|
||||
"tools": {
|
||||
"myTool": { "description": "Does something useful" }
|
||||
}
|
||||
```
|
||||
|
||||
**Minimal format:** If you just want auto-discovery, only `category` is required:
|
||||
|
||||
```json
|
||||
{
|
||||
"tpmjs": {
|
||||
"category": "web"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
TPMJS will automatically discover and extract tool metadata from your package exports.
|
||||
|
||||
## Generated Tool File Example
|
||||
|
||||
Each tool file follows this Zod-first pattern:
|
||||
|
|
@ -165,18 +215,23 @@ Your tools will appear on [tpmjs.com](https://tpmjs.com) within 2-15 minutes aft
|
|||
|
||||
The generator validates against these official TPMJS categories:
|
||||
|
||||
- `web-scraping`
|
||||
- `data-processing`
|
||||
- `file-operations`
|
||||
- `communication`
|
||||
- `database`
|
||||
- `api-integration`
|
||||
- `image-processing`
|
||||
- `text-analysis`
|
||||
- `automation`
|
||||
- `ai-ml`
|
||||
- `security`
|
||||
- `monitoring`
|
||||
**Core categories:**
|
||||
- `research` - Research and information gathering tools
|
||||
- `web` - Web scraping, fetching, and browser automation
|
||||
- `data` - Data processing and transformation
|
||||
- `documentation` - Documentation generation and management
|
||||
- `engineering` - Software engineering and development tools
|
||||
- `security` - Security analysis and vulnerability scanning
|
||||
- `statistics` - Statistical analysis and calculations
|
||||
- `ops` - DevOps and infrastructure tools
|
||||
- `agent` - AI agent orchestration and management
|
||||
- `sandbox` - Code execution and sandboxing
|
||||
- `utilities` - General-purpose utility tools
|
||||
- `html` - HTML generation and manipulation
|
||||
- `compliance` - Compliance and regulatory tools
|
||||
|
||||
**Legacy categories (still supported):**
|
||||
- `web-scraping`, `data-processing`, `file-operations`, `communication`, `database`, `api-integration`, `image-processing`, `text-analysis`, `automation`, `ai-ml`, `monitoring`
|
||||
|
||||
## Requirements
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@tpmjs/create-basic-tools",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.7",
|
||||
"description": "CLI generator for scaffolding production-ready TPMJS tool packages",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ export async function runInteractiveCLI(): Promise<GenerationResult> {
|
|||
description: `AI SDK tools for ${packageNameWithoutScope}`,
|
||||
author: '',
|
||||
license: 'MIT',
|
||||
category: 'ai-ml',
|
||||
category: 'utilities',
|
||||
};
|
||||
|
||||
const tools = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue