@supatest/cli 0.0.36 → 0.0.38

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.
Files changed (3) hide show
  1. package/README.md +137 -0
  2. package/dist/index.js +1319 -201
  3. package/package.json +2 -1
package/README.md CHANGED
@@ -136,6 +136,143 @@ test:
136
136
  SUPATEST_API_KEY: $SUPATEST_API_KEY
137
137
  ```
138
138
 
139
+ ## Advanced Features
140
+
141
+ ### LLM Provider Selection (`/provider`)
142
+
143
+ Supatest supports two LLM providers for running the AI agent:
144
+
145
+ #### Supatest Managed (Default)
146
+ Uses models available through the Supatest API. Your tasks are processed through Supatest infrastructure.
147
+
148
+ #### Claude Max
149
+ Uses your Claude Max subscription directly. This allows you to leverage Claude Max models while maintaining session tracking through Supatest.
150
+
151
+ **Requirements for Claude Max:**
152
+ - Active Claude Max subscription
153
+ - Claude Code login (automatic credential detection)
154
+ - Works on macOS, Linux, and Windows
155
+
156
+ **Switching Providers:**
157
+
158
+ In interactive mode, use the `/provider` command to switch between available providers:
159
+
160
+ ```
161
+ > /provider
162
+ ```
163
+
164
+ This opens a selector showing:
165
+ - Supatest Managed - Uses Supatest API with available models
166
+ - Claude Max - Direct Claude Max subscription (requires Claude Code login)
167
+
168
+ Navigate with arrow keys and press Enter to select. The current provider is highlighted.
169
+
170
+ **Note:** Provider selection is saved per session. You can also use `Ctrl+P` as a keyboard shortcut to cycle through providers.
171
+
172
+ ---
173
+
174
+ ### Model Context Protocol (`/mcp`)
175
+
176
+ MCP (Model Context Protocol) servers extend Supatest with additional tools and capabilities. For example, the Playwright MCP server enables browser automation for test generation.
177
+
178
+ #### Viewing Configured Servers
179
+
180
+ ```
181
+ > /mcp
182
+ ```
183
+
184
+ Shows all configured MCP servers with:
185
+ - Server name and scope (project or global)
186
+ - Connection status (after testing)
187
+ - Command and arguments
188
+ - Environment variables (if any)
189
+ - Description (if provided)
190
+
191
+ #### Configuration Files
192
+
193
+ MCP servers are configured in JSON files. Supatest supports two levels:
194
+
195
+ **Project-level** (`.supatest/mcp.json`):
196
+ Specific to your project, committed to version control.
197
+
198
+ **Global** (`~/.supatest/mcp.json`):
199
+ Applies to all projects, stored in your home directory.
200
+
201
+ Project-level servers take precedence over global servers with the same name.
202
+
203
+ #### Configuration Format
204
+
205
+ ```json
206
+ {
207
+ "mcpServers": {
208
+ "playwright": {
209
+ "command": "npx",
210
+ "args": ["@modelcontextprotocol/server-playwright"],
211
+ "description": "Browser automation via Playwright",
212
+ "enabled": true
213
+ },
214
+ "custom-tool": {
215
+ "command": "./scripts/custom-mcp.js",
216
+ "args": ["--option", "value"],
217
+ "env": {
218
+ "CUSTOM_VAR": "value"
219
+ },
220
+ "description": "Custom MCP server",
221
+ "enabled": true
222
+ }
223
+ }
224
+ }
225
+ ```
226
+
227
+ **Fields:**
228
+ - `command` (required) - Executable to run (e.g., `npx`, `node`, `python`)
229
+ - `args` (optional) - Arguments to pass to the command
230
+ - `env` (optional) - Environment variables to set for the server
231
+ - `description` (optional) - Human-readable description
232
+ - `enabled` (optional) - Whether the server is active (default: true)
233
+
234
+ #### Managing Servers Interactively
235
+
236
+ When viewing MCP servers with `/mcp`, you can:
237
+ - **A** - Add a new server (walks through configuration)
238
+ - **R** - Remove a selected server
239
+ - **T** - Test connection to all servers
240
+ - **ESC** or **Q** - Close the MCP view
241
+
242
+ #### Default Setup
243
+
244
+ When you run `/setup`, Supatest automatically configures the Playwright MCP server, which is essential for browser-based test generation and automation.
245
+
246
+ #### Example: Adding a Custom MCP Server
247
+
248
+ 1. Create your MCP server (implements the Model Context Protocol)
249
+ 2. Use `/mcp` and press **A** to add it
250
+ 3. Or manually edit `.supatest/mcp.json`:
251
+
252
+ ```json
253
+ {
254
+ "mcpServers": {
255
+ "my-tool": {
256
+ "command": "node",
257
+ "args": ["/path/to/my-mcp-server.js"],
258
+ "description": "My custom tool",
259
+ "enabled": true
260
+ }
261
+ }
262
+ }
263
+ ```
264
+
265
+ #### Debugging MCP Issues
266
+
267
+ If an MCP server isn't working:
268
+ 1. View servers with `/mcp`
269
+ 2. Press **T** to test all connections
270
+ 3. Check error messages displayed for failed servers
271
+ 4. Verify the command and arguments are correct
272
+ 5. Ensure any required environment variables are set
273
+
274
+ ---
275
+
139
276
  ## Support
140
277
 
141
278
  - [Documentation](https://supatest.ai/docs)