@cpmai/cli 0.1.1 → 0.1.3
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 +14 -10
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @cpmai/cli
|
|
2
2
|
|
|
3
3
|
The command-line interface for CPM (Claude Package Manager).
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install -g @
|
|
8
|
+
npm install -g @cpmai/cli
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Commands
|
|
@@ -15,12 +15,13 @@ npm install -g @cpm/cli
|
|
|
15
15
|
Install a package from the registry.
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
cpm install commit # Installs @
|
|
19
|
-
cpm install @
|
|
18
|
+
cpm install commit # Installs @cpmai/commit
|
|
19
|
+
cpm install @cpmai/nextjs-rules # Full package name
|
|
20
20
|
cpm install @affaan-m/claude-rules # Package from another author
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
**Options:**
|
|
24
|
+
|
|
24
25
|
- `-p, --platform <platform>` - Target platform (default: `claude-code`)
|
|
25
26
|
|
|
26
27
|
### `cpm uninstall <package>`
|
|
@@ -29,7 +30,7 @@ Remove an installed package.
|
|
|
29
30
|
|
|
30
31
|
```bash
|
|
31
32
|
cpm uninstall commit
|
|
32
|
-
cpm rm @
|
|
33
|
+
cpm rm @cpmai/nextjs-rules # Alias: rm
|
|
33
34
|
```
|
|
34
35
|
|
|
35
36
|
### `cpm search <query>`
|
|
@@ -43,6 +44,7 @@ cpm search typescript --limit 5
|
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
**Options:**
|
|
47
|
+
|
|
46
48
|
- `-t, --type <type>` - Filter by type (`rules`, `skill`, `mcp`)
|
|
47
49
|
- `-l, --limit <number>` - Limit results (default: 10)
|
|
48
50
|
|
|
@@ -75,11 +77,11 @@ cpm --help # Show help
|
|
|
75
77
|
|
|
76
78
|
## Package Types
|
|
77
79
|
|
|
78
|
-
| Type
|
|
79
|
-
|
|
80
|
-
| `rules` | Coding guidelines | `~/.claude/rules/<name>/`
|
|
81
|
-
| `skill` | Slash commands
|
|
82
|
-
| `mcp`
|
|
80
|
+
| Type | Description | Installed To |
|
|
81
|
+
| ------- | ----------------- | -------------------------- |
|
|
82
|
+
| `rules` | Coding guidelines | `~/.claude/rules/<name>/` |
|
|
83
|
+
| `skill` | Slash commands | `~/.claude/skills/<name>/` |
|
|
84
|
+
| `mcp` | MCP servers | `~/.claude.json` |
|
|
83
85
|
|
|
84
86
|
## Development
|
|
85
87
|
|
|
@@ -132,9 +134,11 @@ The CLI implements several security measures:
|
|
|
132
134
|
### MCP Command Validation
|
|
133
135
|
|
|
134
136
|
Only these commands are allowed for MCP servers:
|
|
137
|
+
|
|
135
138
|
- `npx`, `node`, `python`, `python3`, `deno`, `bun`, `uvx`
|
|
136
139
|
|
|
137
140
|
Blocked argument patterns:
|
|
141
|
+
|
|
138
142
|
- `--eval`, `-e`, `-c` (code execution)
|
|
139
143
|
- `curl`, `wget` (network commands)
|
|
140
144
|
- `rm`, `sudo`, `chmod`, `chown` (system commands)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cpmai/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "The package manager for Claude Code - cpm-ai.dev",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
31
|
"dev": "tsx src/index.ts",
|
|
32
|
-
"build": "tsup
|
|
32
|
+
"build": "tsup",
|
|
33
33
|
"start": "node dist/index.js",
|
|
34
34
|
"lint": "eslint src/",
|
|
35
35
|
"typecheck": "tsc --noEmit",
|
|
@@ -39,8 +39,6 @@
|
|
|
39
39
|
"prepublishOnly": "npm run build"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@cpm/registry-client": "workspace:*",
|
|
43
|
-
"@cpm/types": "workspace:*",
|
|
44
42
|
"chalk": "^5.4.1",
|
|
45
43
|
"commander": "^12.1.0",
|
|
46
44
|
"consola": "^3.4.2",
|