trusttools 1.0.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 +218 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1635 -0
- package/dist/index.js.map +1 -0
- package/package.json +69 -0
package/README.md
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# TrustTools
|
|
2
|
+
|
|
3
|
+
Universal CLI tool for managing AI agent skills across Cursor, Claude, Windsurf and 40+ AI agents.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🚀 **Universal Agent Support**: Automatically detects and supports Cursor, Claude, and Windsurf
|
|
8
|
+
- 🔗 **Symlink-based Distribution**: Skills stored once in `.agents/skills/`, linked to all agents
|
|
9
|
+
- 📦 **Multiple Source Types**: Install from GitHub (user/repo), URLs, or local paths
|
|
10
|
+
- 🔍 **Smart Discovery**: Automatically finds SKILL.md files in repositories
|
|
11
|
+
- ✅ **Metadata Validation**: Ensures skills have required `name` and `description` fields
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g trusttools
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
Create a `.env` file in your project root or set environment variables:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Required for API search functionality
|
|
25
|
+
TRUSTTOOLS_API_URL=https://your-api-endpoint.com
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or copy from the example:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cp .env.example .env
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
### Add a skill from GitHub
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Short format
|
|
40
|
+
trusttools add user/repo
|
|
41
|
+
|
|
42
|
+
# With path
|
|
43
|
+
trusttools add user/repo/path/to/skill
|
|
44
|
+
|
|
45
|
+
# Full URL
|
|
46
|
+
trusttools add https://github.com/user/repo
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Add a skill from local path
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
trusttools add ./path/to/skill
|
|
53
|
+
trusttools add /absolute/path/to/skill
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### List installed skills
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
trusttools list
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Find skills
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Search from API (requires TRUSTTOOLS_API_URL)
|
|
66
|
+
trusttools find "react optimization"
|
|
67
|
+
trusttools find "security audit"
|
|
68
|
+
|
|
69
|
+
# Scan GitHub repository
|
|
70
|
+
trusttools find user/repo
|
|
71
|
+
trusttools find user/repo/path/to/skills
|
|
72
|
+
|
|
73
|
+
# Scan local directory
|
|
74
|
+
trusttools find ./local-skills
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Show environment info
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
trusttools info
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## How It Works
|
|
84
|
+
|
|
85
|
+
### 1. Universal Skills Directory
|
|
86
|
+
|
|
87
|
+
All skills are stored in `.agents/skills/` (the "Universal Path"). This ensures:
|
|
88
|
+
- Skills are stored only once
|
|
89
|
+
- Easy management and updates
|
|
90
|
+
- Consistent structure across projects
|
|
91
|
+
|
|
92
|
+
### 2. Agent Detection
|
|
93
|
+
|
|
94
|
+
TrustTools automatically detects which AI agents are present by checking for:
|
|
95
|
+
- `.cursor/` - Cursor IDE
|
|
96
|
+
- `.claude/` - Claude Desktop
|
|
97
|
+
- `.windsurf/` - Windsurf
|
|
98
|
+
|
|
99
|
+
### 3. Symlink Distribution
|
|
100
|
+
|
|
101
|
+
When you add a skill, TrustTools:
|
|
102
|
+
1. Downloads/copies the skill to `.agents/skills/[skill-name]/`
|
|
103
|
+
2. Creates symlinks in each detected agent's skills directory
|
|
104
|
+
3. Example: `.cursor/skills/my-skill` → `.agents/skills/my-skill`
|
|
105
|
+
|
|
106
|
+
**Windows Note**: On Windows, you need either:
|
|
107
|
+
- Run as Administrator, or
|
|
108
|
+
- Enable Developer Mode in Windows Settings
|
|
109
|
+
|
|
110
|
+
### 4. Skill Discovery Algorithm
|
|
111
|
+
|
|
112
|
+
TrustTools searches for skills in this order:
|
|
113
|
+
1. Root `SKILL.md`
|
|
114
|
+
2. `skills/` folder
|
|
115
|
+
3. Recursive search in subdirectories (max depth: 2)
|
|
116
|
+
|
|
117
|
+
A valid skill must have a `SKILL.md` file with frontmatter:
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
---
|
|
121
|
+
name: My Skill
|
|
122
|
+
description: A helpful skill for doing X
|
|
123
|
+
version: 1.0.0
|
|
124
|
+
tags: [ai, automation]
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
# Skill content here...
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Architecture
|
|
131
|
+
|
|
132
|
+
Built with modern tools:
|
|
133
|
+
|
|
134
|
+
- **Commander**: CLI framework
|
|
135
|
+
- **Ink**: React for CLI (interactive UI)
|
|
136
|
+
- **simple-git**: Git operations
|
|
137
|
+
- **gray-matter**: YAML frontmatter parsing
|
|
138
|
+
- **tsup**: Fast TypeScript bundler
|
|
139
|
+
- **chalk**: Terminal colors
|
|
140
|
+
- **ora**: Elegant spinners
|
|
141
|
+
|
|
142
|
+
## Project Structure
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
trusttools/
|
|
146
|
+
├── src/
|
|
147
|
+
│ ├── commands/
|
|
148
|
+
│ │ ├── add.ts # Add skill command
|
|
149
|
+
│ │ └── list.ts # List skills command
|
|
150
|
+
│ ├── utils/
|
|
151
|
+
│ │ ├── agents.ts # Agent detection
|
|
152
|
+
│ │ ├── parser.ts # SKILL.md parsing
|
|
153
|
+
│ │ ├── source.ts # Source parsing
|
|
154
|
+
│ │ └── symlink.ts # Symlink management
|
|
155
|
+
│ ├── types.ts # TypeScript types
|
|
156
|
+
│ └── index.ts # CLI entry point
|
|
157
|
+
├── package.json
|
|
158
|
+
├── tsconfig.json
|
|
159
|
+
└── tsup.config.ts
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Development
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Install dependencies
|
|
166
|
+
npm install
|
|
167
|
+
|
|
168
|
+
# Development mode (watch)
|
|
169
|
+
npm run dev
|
|
170
|
+
|
|
171
|
+
# Build
|
|
172
|
+
npm run build
|
|
173
|
+
|
|
174
|
+
# Type check
|
|
175
|
+
npm run typecheck
|
|
176
|
+
|
|
177
|
+
# Test locally
|
|
178
|
+
npm start -- add user/repo
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Examples
|
|
182
|
+
|
|
183
|
+
### Install a skill from GitHub
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
trusttools add anthropics/claude-skills
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Install from a specific path in a repo
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
trusttools add vercel/next.js/.claude-plugin/plugins/cache-components
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Check what's installed
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
trusttools list
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Output:
|
|
202
|
+
```
|
|
203
|
+
📦 Installed Skills (3):
|
|
204
|
+
|
|
205
|
+
✓ Cache Components
|
|
206
|
+
Expert guidance for Next.js Cache Components
|
|
207
|
+
Version: 1.0.0
|
|
208
|
+
Tags: nextjs, performance
|
|
209
|
+
Path: /Users/you/project/.agents/skills/cache-components
|
|
210
|
+
|
|
211
|
+
✓ TypeScript Helper
|
|
212
|
+
Advanced TypeScript utilities
|
|
213
|
+
Path: /Users/you/project/.agents/skills/typescript-helper
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## License
|
|
217
|
+
|
|
218
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|