@anytio/pspm 0.1.0 → 0.2.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/CHANGELOG.md +221 -0
- package/CLI_GUIDE.md +465 -0
- package/LICENSE +176 -109
- package/README.md +41 -96
- package/bin/pspm.js +2 -0
- package/dist/index.js +989 -686
- package/dist/index.js.map +1 -1
- package/package.json +70 -67
package/LICENSE
CHANGED
|
@@ -1,149 +1,216 @@
|
|
|
1
|
-
|
|
1
|
+
The pspm application
|
|
2
|
+
Copyright (c) anyt.io and Contributors
|
|
3
|
+
Licensed on the terms of The Artistic License 2.0
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
Node package dependencies of the pspm application
|
|
6
|
+
Copyright (c) their respective copyright owners
|
|
7
|
+
Licensed on their respective license terms
|
|
4
8
|
|
|
5
|
-
Required Notice: Copyright AnyTransformer Inc. (https://pspm.dev)
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
--------
|
|
8
11
|
|
|
9
|
-
In order to get any license under these terms, you must agree
|
|
10
|
-
to them as both strict obligations and conditions to all
|
|
11
|
-
your licenses.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
The Artistic License 2.0
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
software to do everything you might do with the software
|
|
17
|
-
that would otherwise infringe the licensor's copyright
|
|
18
|
-
in it for any permitted purpose. However, you may
|
|
19
|
-
only distribute the software according to [Distribution
|
|
20
|
-
License](#distribution-license) and make changes or new works
|
|
21
|
-
based on the software according to [Changes and New Works
|
|
22
|
-
License](#changes-and-new-works-license).
|
|
15
|
+
Copyright (c) 2000-2006, The Perl Foundation.
|
|
23
16
|
|
|
24
|
-
|
|
17
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
18
|
+
of this license document, but changing it is not allowed.
|
|
25
19
|
|
|
26
|
-
|
|
27
|
-
to distribute copies of the software. Your license
|
|
28
|
-
to distribute covers distributing the software with
|
|
29
|
-
changes and new works permitted by [Changes and New Works
|
|
30
|
-
License](#changes-and-new-works-license).
|
|
20
|
+
Preamble
|
|
31
21
|
|
|
32
|
-
|
|
22
|
+
This license establishes the terms under which a given free software
|
|
23
|
+
Package may be copied, modified, distributed, and/or redistributed.
|
|
24
|
+
The intent is that the Copyright Holder maintains some artistic
|
|
25
|
+
control over the development of that Package while still keeping the
|
|
26
|
+
Package available as open source and free software.
|
|
33
27
|
|
|
34
|
-
You
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
You are always permitted to make arrangements wholly outside of this
|
|
29
|
+
license directly with the Copyright Holder of a given Package. If the
|
|
30
|
+
terms of this license do not permit the full use that you propose to
|
|
31
|
+
make of the Package, you should contact the Copyright Holder and seek
|
|
32
|
+
a different licensing arrangement.
|
|
39
33
|
|
|
40
|
-
|
|
34
|
+
Definitions
|
|
41
35
|
|
|
42
|
-
|
|
36
|
+
"Copyright Holder" means the individual(s) or organization(s)
|
|
37
|
+
named in the copyright notice for the entire Package.
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
"Contributor" means any party that has contributed code or other
|
|
40
|
+
material to the Package, in accordance with the Copyright Holder's
|
|
41
|
+
procedures.
|
|
47
42
|
|
|
48
|
-
|
|
43
|
+
"You" and "your" means any person who would like to copy,
|
|
44
|
+
distribute, or modify the Package.
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
"Package" means the collection of files distributed by the
|
|
47
|
+
Copyright Holder, and derivatives of that collection and/or of
|
|
48
|
+
those files. A given Package may consist of either the Standard
|
|
49
|
+
Version, or a Modified Version.
|
|
53
50
|
|
|
54
|
-
|
|
51
|
+
"Distribute" means providing a copy of the Package or making it
|
|
52
|
+
accessible to anyone else, or in the case of a company or
|
|
53
|
+
organization, to others outside of your company or organization.
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
"Distributor Fee" means any fee that you charge for Distributing
|
|
56
|
+
this Package or providing support for this Package to another
|
|
57
|
+
party. It does not mean licensing fees.
|
|
59
58
|
|
|
60
|
-
|
|
59
|
+
"Standard Version" refers to the Package if it has not been
|
|
60
|
+
modified, or has been modified only in ways explicitly requested
|
|
61
|
+
by the Copyright Holder.
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
with plugins, frameworks with development tools, and so on,
|
|
66
|
-
even if they're written in different programming languages
|
|
67
|
-
or for different computer architectures. Goods and services
|
|
68
|
-
compete even when provided free of charge. If you market a
|
|
69
|
-
product as a practical substitute for the software or another
|
|
70
|
-
product, it definitely competes.
|
|
63
|
+
"Modified Version" means the Package, if it has been changed, and
|
|
64
|
+
such changes were not explicitly requested by the Copyright
|
|
65
|
+
Holder.
|
|
71
66
|
|
|
72
|
-
|
|
67
|
+
"Original License" means this Artistic License as Distributed with
|
|
68
|
+
the Standard Version of the Package, in its current version or as
|
|
69
|
+
it may be modified by The Perl Foundation in the future.
|
|
73
70
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
any of its affiliates later provides a competing product.
|
|
71
|
+
"Source" form means the source code, documentation source, and
|
|
72
|
+
configuration files for the Package.
|
|
77
73
|
|
|
78
|
-
|
|
74
|
+
"Compiled" form means the compiled bytecode, object code, binary,
|
|
75
|
+
or any other form resulting from mechanical transformation or
|
|
76
|
+
translation of the Source form.
|
|
79
77
|
|
|
80
|
-
You may begin using the software to provide a product that
|
|
81
|
-
competes with one the licensor or any of its affiliates has
|
|
82
|
-
stopped providing, unless the licensor or any of its affiliates
|
|
83
|
-
began providing that product again within one year of your
|
|
84
|
-
starting to compete.
|
|
85
78
|
|
|
86
|
-
|
|
79
|
+
Permission for Use and Modification Without Distribution
|
|
87
80
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
[Noncompete](#noncompete) for that product.
|
|
81
|
+
(1) You are permitted to use the Standard Version and create and use
|
|
82
|
+
Modified Versions for any purpose without restriction, provided that
|
|
83
|
+
you do not Distribute the Modified Version.
|
|
92
84
|
|
|
93
|
-
## No Other Rights
|
|
94
85
|
|
|
95
|
-
|
|
96
|
-
your licenses to anyone else, or prevent the licensor from
|
|
97
|
-
granting licenses to anyone else. These terms do not imply
|
|
98
|
-
any other licenses.
|
|
86
|
+
Permissions for Redistribution of the Standard Version
|
|
99
87
|
|
|
100
|
-
|
|
88
|
+
(2) You may Distribute verbatim copies of the Source form of the
|
|
89
|
+
Standard Version of this Package in any medium without restriction,
|
|
90
|
+
either gratis or for a Distributor Fee, provided that you duplicate
|
|
91
|
+
all of the original copyright notices and associated disclaimers. At
|
|
92
|
+
your discretion, such verbatim copies may or may not include a
|
|
93
|
+
Compiled form of the Package.
|
|
101
94
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
immediately for work on behalf of your company.
|
|
95
|
+
(3) You may apply any bug fixes, portability changes, and other
|
|
96
|
+
modifications made available from the Copyright Holder. The resulting
|
|
97
|
+
Package will still be considered the Standard Version, and as such
|
|
98
|
+
will be subject to the Original License.
|
|
107
99
|
|
|
108
|
-
## Violations
|
|
109
100
|
|
|
110
|
-
|
|
111
|
-
violated any of these terms, or done anything with the software
|
|
112
|
-
not covered by your licenses, your licenses can nonetheless
|
|
113
|
-
continue if you come into full compliance with these terms,
|
|
114
|
-
and take practical steps to correct past violations, within
|
|
115
|
-
32 days of receiving notice. Otherwise, all your licenses
|
|
116
|
-
end immediately.
|
|
101
|
+
Distribution of Modified Versions of the Package as Source
|
|
117
102
|
|
|
118
|
-
|
|
103
|
+
(4) You may Distribute your Modified Version as Source (either gratis
|
|
104
|
+
or for a Distributor Fee, and with or without a Compiled form of the
|
|
105
|
+
Modified Version) provided that you clearly document how it differs
|
|
106
|
+
from the Standard Version, including, but not limited to, documenting
|
|
107
|
+
any non-standard features, executables, or modules, and provided that
|
|
108
|
+
you do at least ONE of the following:
|
|
119
109
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
110
|
+
(a) make the Modified Version available to the Copyright Holder
|
|
111
|
+
of the Standard Version, under the Original License, so that the
|
|
112
|
+
Copyright Holder may include your modifications in the Standard
|
|
113
|
+
Version.
|
|
124
114
|
|
|
125
|
-
|
|
115
|
+
(b) ensure that installation of your Modified Version does not
|
|
116
|
+
prevent the user installing or running the Standard Version. In
|
|
117
|
+
addition, the Modified Version must bear a name that is different
|
|
118
|
+
from the name of the Standard Version.
|
|
126
119
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
(c) allow anyone who receives a copy of the Modified Version to
|
|
121
|
+
make the Source form of the Modified Version available to others
|
|
122
|
+
under
|
|
130
123
|
|
|
131
|
-
|
|
132
|
-
terms.
|
|
124
|
+
(i) the Original License or
|
|
133
125
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
126
|
+
(ii) a license that permits the licensee to freely copy,
|
|
127
|
+
modify and redistribute the Modified Version using the same
|
|
128
|
+
licensing terms that apply to the copy that the licensee
|
|
129
|
+
received, and requires that the Source form of the Modified
|
|
130
|
+
Version, and of any works derived from it, be made freely
|
|
131
|
+
available in that license fees are prohibited but Distributor
|
|
132
|
+
Fees are allowed.
|
|
141
133
|
|
|
142
|
-
**your licenses** are all the licenses granted to you for the
|
|
143
|
-
software under these terms.
|
|
144
134
|
|
|
145
|
-
|
|
146
|
-
|
|
135
|
+
Distribution of Compiled Forms of the Standard Version
|
|
136
|
+
or Modified Versions without the Source
|
|
147
137
|
|
|
148
|
-
|
|
149
|
-
|
|
138
|
+
(5) You may Distribute Compiled forms of the Standard Version without
|
|
139
|
+
the Source, provided that you include complete instructions on how to
|
|
140
|
+
get the Source of the Standard Version. Such instructions must be
|
|
141
|
+
valid at the time of your distribution. If these instructions, at any
|
|
142
|
+
time while you are carrying out such distribution, become invalid, you
|
|
143
|
+
must provide new instructions on demand or cease further distribution.
|
|
144
|
+
If you provide valid instructions or cease distribution within thirty
|
|
145
|
+
days after you become aware that the instructions are invalid, then
|
|
146
|
+
you do not forfeit any of your rights under this license.
|
|
147
|
+
|
|
148
|
+
(6) You may Distribute a Modified Version in Compiled form without
|
|
149
|
+
the Source, provided that you comply with Section 4 with respect to
|
|
150
|
+
the Source of the Modified Version.
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
Aggregating or Linking the Package
|
|
154
|
+
|
|
155
|
+
(7) You may aggregate the Package (either the Standard Version or
|
|
156
|
+
Modified Version) with other packages and Distribute the resulting
|
|
157
|
+
aggregation provided that you do not charge a licensing fee for the
|
|
158
|
+
Package. Distributor Fees are permitted, and licensing fees for other
|
|
159
|
+
components in the aggregation are permitted. The terms of this license
|
|
160
|
+
apply to the use and Distribution of the Standard or Modified Versions
|
|
161
|
+
as included in the aggregation.
|
|
162
|
+
|
|
163
|
+
(8) You are permitted to link Modified and Standard Versions with
|
|
164
|
+
other works, to embed the Package in a larger work of your own, or to
|
|
165
|
+
build stand-alone binary or bytecode versions of applications that
|
|
166
|
+
include the Package, and Distribute the result without restriction,
|
|
167
|
+
provided the result does not expose a direct interface to the Package.
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
Items That are Not Considered Part of a Modified Version
|
|
171
|
+
|
|
172
|
+
(9) Works (including, but not limited to, modules and scripts) that
|
|
173
|
+
merely extend or make use of the Package, do not, by themselves, cause
|
|
174
|
+
the Package to be a Modified Version. In addition, such works are not
|
|
175
|
+
considered parts of the Package itself, and are not subject to the
|
|
176
|
+
terms of this license.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
General Provisions
|
|
180
|
+
|
|
181
|
+
(10) Any use, modification, and distribution of the Standard or
|
|
182
|
+
Modified Versions is governed by this Artistic License. By using,
|
|
183
|
+
modifying or distributing the Package, you accept this license. Do not
|
|
184
|
+
use, modify, or distribute the Package, if you do not accept this
|
|
185
|
+
license.
|
|
186
|
+
|
|
187
|
+
(11) If your Modified Version has been derived from a Modified
|
|
188
|
+
Version made by someone other than you, you are nevertheless required
|
|
189
|
+
to ensure that your Modified Version complies with the requirements of
|
|
190
|
+
this license.
|
|
191
|
+
|
|
192
|
+
(12) This license does not grant you the right to use any trademark,
|
|
193
|
+
service mark, tradename, or logo of the Copyright Holder.
|
|
194
|
+
|
|
195
|
+
(13) This license includes the non-exclusive, worldwide,
|
|
196
|
+
free-of-charge patent license to make, have made, use, offer to sell,
|
|
197
|
+
sell, import and otherwise transfer the Package with respect to any
|
|
198
|
+
patent claims licensable by the Copyright Holder that are necessarily
|
|
199
|
+
infringed by the Package. If you institute patent litigation
|
|
200
|
+
(including a cross-claim or counterclaim) against any party alleging
|
|
201
|
+
that the Package constitutes direct or contributory patent
|
|
202
|
+
infringement, then this Artistic License to you shall terminate on the
|
|
203
|
+
date that such litigation is filed.
|
|
204
|
+
|
|
205
|
+
(14) Disclaimer of Warranty:
|
|
206
|
+
THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
|
|
207
|
+
IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
|
|
208
|
+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
|
|
209
|
+
NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
|
|
210
|
+
LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
|
|
211
|
+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
212
|
+
DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
|
|
213
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
--------
|
package/README.md
CHANGED
|
@@ -2,12 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
A CLI for managing prompt skills across AI coding agents.
|
|
4
4
|
|
|
5
|
+
**Website:** [https://pspm.dev](https://pspm.dev)
|
|
6
|
+
|
|
5
7
|
## What is PSPM?
|
|
6
8
|
|
|
7
9
|
PSPM (Prompt Skill Package Manager) is a package manager for prompt skills - small, discoverable capabilities packaged as `SKILL.md` files. Think of it as npm for AI agent skills.
|
|
8
10
|
|
|
9
11
|
Skills are designed to work with any AI coding agent that supports the SKILL.md format, including Claude Code, Cursor, Windsurf, and others.
|
|
10
12
|
|
|
13
|
+
## Why PSPM?
|
|
14
|
+
|
|
15
|
+
**Easy Sharing** - Share your prompt skills with teammates or the community. Publish to the registry and let others install with a single command.
|
|
16
|
+
|
|
17
|
+
**Version Control** - Full semver support just like npm. Pin exact versions, use ranges (`^1.0.0`, `~1.2.0`), or reference GitHub tags directly. Lock versions with `pspm-lock.json` for reproducible installations.
|
|
18
|
+
|
|
19
|
+
**Public & Private Skills** - Keep proprietary skills private within your organization, or publish them publicly for anyone to use. Private skills require authentication to download.
|
|
20
|
+
|
|
11
21
|
## Installation
|
|
12
22
|
|
|
13
23
|
```bash
|
|
@@ -24,7 +34,10 @@ npx @anytio/pspm <command>
|
|
|
24
34
|
|
|
25
35
|
```bash
|
|
26
36
|
# Login with your API key
|
|
27
|
-
pspm login
|
|
37
|
+
pspm login
|
|
38
|
+
|
|
39
|
+
# Initialize a new skill project
|
|
40
|
+
pspm init
|
|
28
41
|
|
|
29
42
|
# Add a skill from the registry
|
|
30
43
|
pspm add @user/username/skill-name
|
|
@@ -36,7 +49,7 @@ pspm add github:owner/repo/path@main
|
|
|
36
49
|
pspm list
|
|
37
50
|
|
|
38
51
|
# Install all skills from lockfile
|
|
39
|
-
pspm install
|
|
52
|
+
pspm install
|
|
40
53
|
```
|
|
41
54
|
|
|
42
55
|
## Commands
|
|
@@ -45,21 +58,37 @@ pspm install --agent claude-code,cursor
|
|
|
45
58
|
|
|
46
59
|
```bash
|
|
47
60
|
pspm login --api-key <key> # Authenticate with API key
|
|
61
|
+
pspm login # Authenticate via browser
|
|
48
62
|
pspm logout # Clear stored credentials
|
|
49
63
|
pspm whoami # Show current user info
|
|
50
64
|
```
|
|
51
65
|
|
|
66
|
+
### Project Initialization
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pspm init # Create pspm.json manifest (interactive)
|
|
70
|
+
pspm init -y # Create pspm.json with defaults
|
|
71
|
+
pspm migrate # Migrate from old directory structure
|
|
72
|
+
```
|
|
73
|
+
|
|
52
74
|
### Skill Management
|
|
53
75
|
|
|
54
76
|
```bash
|
|
55
|
-
pspm add <
|
|
77
|
+
pspm add <specifiers...> # Add and install one or more skills
|
|
56
78
|
pspm remove <name> # Remove an installed skill (alias: rm)
|
|
57
79
|
pspm list # List installed skills (alias: ls)
|
|
58
|
-
pspm install
|
|
80
|
+
pspm install [specifiers...] # Install from lockfile, or add specific packages (alias: i)
|
|
59
81
|
pspm link # Recreate agent symlinks without reinstalling
|
|
60
82
|
pspm update # Update skills to latest compatible versions
|
|
61
83
|
```
|
|
62
84
|
|
|
85
|
+
**Multiple package support (like npm):**
|
|
86
|
+
```bash
|
|
87
|
+
pspm add @user/alice/skill1 @user/bob/skill2 # Add multiple packages
|
|
88
|
+
pspm install @user/alice/skill1 github:org/repo # Install specific packages
|
|
89
|
+
pspm install # Install all from lockfile
|
|
90
|
+
```
|
|
91
|
+
|
|
63
92
|
**Registry specifier formats:**
|
|
64
93
|
- `@user/username/skillname` - Latest version
|
|
65
94
|
- `@user/username/skillname@2.0.0` - Specific version
|
|
@@ -78,7 +107,7 @@ pspm install --agent none # Skip symlink creation
|
|
|
78
107
|
pspm link --agent codex # Recreate symlinks for specific agent
|
|
79
108
|
```
|
|
80
109
|
|
|
81
|
-
Default
|
|
110
|
+
Default is all agents (`claude-code`, `codex`, `cursor`, `gemini`, `kiro`, `opencode`). Use `--agent claude-code` to install for a single agent.
|
|
82
111
|
|
|
83
112
|
### Publishing
|
|
84
113
|
|
|
@@ -87,6 +116,7 @@ pspm publish # Publish current directory as a skill
|
|
|
87
116
|
pspm publish --bump patch # Auto-bump version (major, minor, patch)
|
|
88
117
|
pspm publish --access public # Publish and make public in one step
|
|
89
118
|
pspm unpublish <spec> --force # Remove a published skill version
|
|
119
|
+
pspm deprecate <spec> [msg] # Mark a version as deprecated
|
|
90
120
|
```
|
|
91
121
|
|
|
92
122
|
### Visibility
|
|
@@ -98,31 +128,6 @@ pspm access <spec> --public # Make specific package public
|
|
|
98
128
|
|
|
99
129
|
**Note:** Making a package public is irreversible (like npm). Public packages cannot be made private again.
|
|
100
130
|
|
|
101
|
-
**Publish Output:**
|
|
102
|
-
|
|
103
|
-
When publishing, PSPM displays detailed package information similar to npm:
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
pspm notice
|
|
107
|
-
pspm notice 📦 my-skill@1.0.0
|
|
108
|
-
pspm notice Tarball Contents
|
|
109
|
-
pspm notice 5.1kB SKILL.md
|
|
110
|
-
pspm notice 1.5kB package.json
|
|
111
|
-
pspm notice Tarball Details
|
|
112
|
-
pspm notice name: my-skill
|
|
113
|
-
pspm notice version: 1.0.0
|
|
114
|
-
pspm notice filename: my-skill-1.0.0.tgz
|
|
115
|
-
pspm notice package size: 2.3kB
|
|
116
|
-
pspm notice unpacked size: 6.6kB
|
|
117
|
-
pspm notice shasum: 4bb744fcfa90b8b033feed3deaeeb00f3a4503e5
|
|
118
|
-
pspm notice integrity: sha512-DqQJaugblfE5A...
|
|
119
|
-
pspm notice total files: 2
|
|
120
|
-
pspm notice
|
|
121
|
-
pspm notice Publishing to https://pspm.dev with tag latest
|
|
122
|
-
+ @user/username/my-skill@1.0.0
|
|
123
|
-
Checksum: abc123...
|
|
124
|
-
```
|
|
125
|
-
|
|
126
131
|
### Configuration
|
|
127
132
|
|
|
128
133
|
```bash
|
|
@@ -141,13 +146,6 @@ PSPM uses a simple npm-like INI configuration format.
|
|
|
141
146
|
registry = https://pspm.dev
|
|
142
147
|
authToken = sk_...
|
|
143
148
|
username = myuser
|
|
144
|
-
|
|
145
|
-
; Multi-registry: Scope mappings
|
|
146
|
-
@myorg:registry = https://corp.pspm.io
|
|
147
|
-
|
|
148
|
-
; Multi-registry: Per-registry tokens
|
|
149
|
-
//pspm.dev:authToken = sk_public_token
|
|
150
|
-
//corp.pspm.io:authToken = sk_corp_token
|
|
151
149
|
```
|
|
152
150
|
|
|
153
151
|
### Project Config (`.pspmrc`)
|
|
@@ -184,47 +182,14 @@ registry = https://custom-registry.example.com
|
|
|
184
182
|
}
|
|
185
183
|
```
|
|
186
184
|
|
|
187
|
-
### Configuration Resolution
|
|
188
|
-
|
|
189
|
-
Configuration is resolved in priority order:
|
|
190
|
-
|
|
191
|
-
1. **Environment Variables** (`PSPM_REGISTRY_URL`, `PSPM_API_KEY`) - Highest
|
|
192
|
-
2. **Project Config** (`.pspmrc` in project directory)
|
|
193
|
-
3. **User Config** (`~/.pspmrc`)
|
|
194
|
-
4. **Defaults** - Lowest
|
|
195
|
-
|
|
196
185
|
## Environment Variables
|
|
197
186
|
|
|
198
187
|
| Variable | Description |
|
|
199
188
|
|----------|-------------|
|
|
200
|
-
| `PSPM_REGISTRY_URL` | Override registry URL |
|
|
201
189
|
| `PSPM_API_KEY` | Override API key |
|
|
202
190
|
| `PSPM_DEBUG` | Enable debug logging |
|
|
203
191
|
| `GITHUB_TOKEN` | GitHub token for private repos and higher rate limits |
|
|
204
192
|
|
|
205
|
-
## Error Handling
|
|
206
|
-
|
|
207
|
-
PSPM provides clear, actionable error messages:
|
|
208
|
-
|
|
209
|
-
**Version Conflict:**
|
|
210
|
-
```
|
|
211
|
-
pspm error code E403
|
|
212
|
-
pspm error 403 403 Forbidden - You cannot publish over the previously published versions: 1.0.0.
|
|
213
|
-
Error: [BAD_REQUEST] Version 1.0.0 must be greater than existing version 1.0.0
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
**Validation Errors:**
|
|
217
|
-
```
|
|
218
|
-
Error: Validation failed:
|
|
219
|
-
- name: Skill name must start with a letter and contain only lowercase letters, numbers, and hyphens
|
|
220
|
-
- version: Invalid semver version
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
**Authentication Errors:**
|
|
224
|
-
```
|
|
225
|
-
Error: Not logged in. Run 'pspm login --api-key <key>' first, or set PSPM_API_KEY env var.
|
|
226
|
-
```
|
|
227
|
-
|
|
228
193
|
## Directory Structure
|
|
229
194
|
|
|
230
195
|
```
|
|
@@ -256,24 +221,24 @@ project/
|
|
|
256
221
|
|
|
257
222
|
## Creating a Skill
|
|
258
223
|
|
|
259
|
-
A skill is a directory containing at minimum a `
|
|
224
|
+
A skill is a directory containing at minimum a `pspm.json` and `SKILL.md`:
|
|
260
225
|
|
|
261
226
|
```
|
|
262
227
|
my-skill/
|
|
263
|
-
├──
|
|
228
|
+
├── pspm.json # Required: name, version
|
|
264
229
|
├── SKILL.md # Required: skill instructions
|
|
265
230
|
├── runtime/ # Optional: runtime files
|
|
266
231
|
├── scripts/ # Optional: scripts
|
|
267
232
|
└── data/ # Optional: data files
|
|
268
233
|
```
|
|
269
234
|
|
|
270
|
-
**
|
|
235
|
+
**pspm.json** (created with `pspm init`):
|
|
271
236
|
```json
|
|
272
237
|
{
|
|
273
238
|
"name": "@user/myusername/my-skill",
|
|
274
239
|
"version": "1.0.0",
|
|
275
240
|
"description": "A helpful skill for...",
|
|
276
|
-
"files": ["
|
|
241
|
+
"files": ["pspm.json", "SKILL.md", "runtime", "scripts", "data"]
|
|
277
242
|
}
|
|
278
243
|
```
|
|
279
244
|
|
|
@@ -292,33 +257,13 @@ When activated, this skill helps you...
|
|
|
292
257
|
## CI/CD Integration
|
|
293
258
|
|
|
294
259
|
```bash
|
|
295
|
-
# Use environment
|
|
260
|
+
# Use environment variable for authentication
|
|
296
261
|
export PSPM_API_KEY=sk_ci_key
|
|
297
|
-
export PSPM_REGISTRY_URL=https://registry.example.com/api/skills
|
|
298
262
|
|
|
299
263
|
# Install with frozen lockfile (fails if lockfile is outdated)
|
|
300
264
|
pspm install --frozen-lockfile
|
|
301
265
|
```
|
|
302
266
|
|
|
303
|
-
## Using Different Registries
|
|
304
|
-
|
|
305
|
-
Use environment variables to switch between registries:
|
|
306
|
-
|
|
307
|
-
```bash
|
|
308
|
-
# Development
|
|
309
|
-
PSPM_REGISTRY_URL=https://staging.example.com pspm add @user/bsheng/skill
|
|
310
|
-
|
|
311
|
-
# Production
|
|
312
|
-
PSPM_REGISTRY_URL=https://prod.example.com pspm publish
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
Or set the registry in your project's `.pspmrc`:
|
|
316
|
-
|
|
317
|
-
```ini
|
|
318
|
-
; .pspmrc
|
|
319
|
-
registry = https://custom-registry.example.com
|
|
320
|
-
```
|
|
321
|
-
|
|
322
267
|
## License
|
|
323
268
|
|
|
324
|
-
|
|
269
|
+
This project is licensed under [The Artistic License 2.0](LICENSE), the same license used by npm.
|
package/bin/pspm.js
ADDED