stpr 1.0.8 → 1.0.10
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 +159 -0
- package/dist/cli.js +2 -2
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# stpr — Stepper Skills CLI
|
|
2
|
+
|
|
3
|
+
Skill Sets are a Stepper feature that let you bundle integration actions into curated, authenticated toolkits — and expose them to AI agents, CLIs, and any MCP-compatible client.
|
|
4
|
+
|
|
5
|
+
`stpr` is a command-line interface for interacting with [Stepper](https://stepper.io) Skill Sets. Discover, inspect, and execute integration actions directly from your terminal. This is perfect for OpenClaw or agents that can interact with a CLI, or for developers who want to use skills in their own scripts.
|
|
6
|
+
|
|
7
|
+
If you prefer, you can directly use the Stepper MCP server at `https://mcp.stepper.io/skill-sets/mcp`instead of the CLI.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g stpr
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
The CLI supports three authentication methods:
|
|
18
|
+
|
|
19
|
+
### OAuth Login (recommended)
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
stpr login
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Opens your browser to authenticate and select a Skill Set. Credentials are saved to `~/.config/stepper-skillsets/config.json` and automatically refreshed when they expire.
|
|
26
|
+
|
|
27
|
+
### Static Token
|
|
28
|
+
|
|
29
|
+
Generate a token from [Stepper](https://app.stepper.io/flow/skill-sets) and pass it directly:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
stpr --token sst_your_token_here list
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Environment Variable
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
export STEPPER_SKILL_TOKEN=sst_your_token_here
|
|
39
|
+
stpr list
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Commands
|
|
43
|
+
|
|
44
|
+
### Profile Management
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
stpr login # Authenticate via OAuth (opens browser)
|
|
48
|
+
stpr logout [name] # Remove a saved profile, or all profiles if no name given
|
|
49
|
+
stpr profiles # List all saved profiles
|
|
50
|
+
stpr use <name> # Switch the active profile
|
|
51
|
+
stpr whoami # Show active profile and server info
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Discovering Skills
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
stpr list # List all available skills, grouped by service
|
|
58
|
+
stpr list --verbose # Include full input schemas
|
|
59
|
+
stpr list <service> # List skills for a specific service
|
|
60
|
+
stpr <service> # Shorthand for listing a service's skills
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Inspecting Parameters
|
|
64
|
+
|
|
65
|
+
Many skills have dynamic parameters — fields that change based on the values of other fields. Calling a skill without `--call` returns its current parameter schema.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# See what fields are needed for add_row, given a spreadsheet
|
|
69
|
+
stpr google-sheets add_row -i '{"spreadsheet_id": "abc123"}'
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Some parameters have dynamic dropdown options. Fetch them with `--options`:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
stpr google-sheets add_row --options worksheet_id \
|
|
76
|
+
-i '{"spreadsheet_id": "abc123"}' \
|
|
77
|
+
--search "Sheet" \
|
|
78
|
+
--cursor "next_page"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Calling Skills
|
|
82
|
+
|
|
83
|
+
Use the `--call` flag to execute an action:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
stpr google-sheets create_sheet --call \
|
|
87
|
+
-i '{"name": "Q1 Report", "columns": "Name, Email, Phone"}'
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Polling Async Results
|
|
91
|
+
|
|
92
|
+
Component library tools run asynchronously. Poll for results with:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
stpr status <statusId>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Input
|
|
99
|
+
|
|
100
|
+
Pass JSON input via the `-i` / `--input` flag or pipe it through stdin:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Flag
|
|
104
|
+
stpr slack send_message --call -i '{"channel": "#general", "text": "Hello!"}'
|
|
105
|
+
|
|
106
|
+
# Stdin
|
|
107
|
+
echo '{"channel": "#general", "text": "Hello!"}' | stpr slack send_message --call
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Options Reference
|
|
111
|
+
|
|
112
|
+
| Flag | Description |
|
|
113
|
+
| -------------------- | --------------------------------------------------------------- |
|
|
114
|
+
| `--token <token>` | Auth token (overrides saved profiles and `STEPPER_SKILL_TOKEN`) |
|
|
115
|
+
| `--base-url <url>` | Override MCP server URL (default: `https://mcp.stepper.io`) |
|
|
116
|
+
| `--skillset <name>` | Use a specific saved profile instead of the active one |
|
|
117
|
+
| `--call` | Execute the skill (default behavior is parameter inspection) |
|
|
118
|
+
| `--verbose` | Include full `inputSchema` when listing skills |
|
|
119
|
+
| `-i, --input <json>` | JSON input for calls, parameter fetches, or option queries |
|
|
120
|
+
| `--options <param>` | Fetch dynamic dropdown options for a parameter |
|
|
121
|
+
| `--search <query>` | Filter dropdown options by search term |
|
|
122
|
+
| `--cursor <cursor>` | Pagination cursor for dropdown options |
|
|
123
|
+
| `-h, --help` | Show help |
|
|
124
|
+
| `-v, --version` | Show version |
|
|
125
|
+
|
|
126
|
+
## Environment Variables
|
|
127
|
+
|
|
128
|
+
| Variable | Description |
|
|
129
|
+
| --------------------- | ------------------------------------------------------------- |
|
|
130
|
+
| `STEPPER_SKILL_TOKEN` | Auth token (used when no `--token` flag and no saved profile) |
|
|
131
|
+
| `STEPPER_URL` | Override the MCP server base URL |
|
|
132
|
+
|
|
133
|
+
## Examples
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Authenticate
|
|
137
|
+
stpr login
|
|
138
|
+
|
|
139
|
+
# List everything available
|
|
140
|
+
stpr list
|
|
141
|
+
|
|
142
|
+
# Explore a service
|
|
143
|
+
stpr google-sheets
|
|
144
|
+
|
|
145
|
+
# Inspect dynamic parameters step by step
|
|
146
|
+
stpr google-sheets add_row -i '{}'
|
|
147
|
+
stpr google-sheets add_row -i '{"spreadsheet_id": "abc123"}'
|
|
148
|
+
|
|
149
|
+
# Fetch dropdown options
|
|
150
|
+
stpr google-sheets add_row --options worksheet_id -i '{"spreadsheet_id": "abc123"}'
|
|
151
|
+
|
|
152
|
+
# Execute
|
|
153
|
+
stpr google-sheets add_row --call -i '{"spreadsheet_id": "abc123", "worksheet_id": "Sheet1", "values": {"Name": "Alice"}}'
|
|
154
|
+
|
|
155
|
+
# Switch between skill sets
|
|
156
|
+
stpr profiles
|
|
157
|
+
stpr use "Production Tools"
|
|
158
|
+
stpr list
|
|
159
|
+
```
|
package/dist/cli.js
CHANGED
|
@@ -118,7 +118,7 @@ var StepperClient = class {
|
|
|
118
118
|
throw new Error(`tools/list failed: ${res.error.message}`);
|
|
119
119
|
}
|
|
120
120
|
const tools = res.result.tools;
|
|
121
|
-
allTools = tools.map(
|
|
121
|
+
allTools = tools.filter((tool) => !tool.name.startsWith("__")).map(
|
|
122
122
|
(tool) => ({
|
|
123
123
|
service: tool.name.split("__")[0],
|
|
124
124
|
action: tool.name.split("__")[1],
|
|
@@ -128,7 +128,7 @@ var StepperClient = class {
|
|
|
128
128
|
);
|
|
129
129
|
writeCache(cacheKey, allTools);
|
|
130
130
|
return allTools.filter(
|
|
131
|
-
(tool) => service ? tool.service === service :
|
|
131
|
+
(tool) => service ? tool.service === service : true
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
134
|
async callTool(name, args) {
|