You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: standardize CLI references to npx emulate (#87)
`emulate` is a zsh built-in command, so bare `emulate` invokes the
shell built-in instead of the npm binary. Update all user-facing CLI
examples, help output, and system prompts to use `npx emulate`. Add
an AGENTS.md rule to prevent regressions.
Copy file name to clipboardExpand all lines: AGENTS.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@ Use `pnpm` for all package management commands (not npm or yarn).
6
6
7
7
Exception: End-user install instructions should use `npm` (e.g. `npx emulate`, `npm install emulate`) since npm is universal.
8
8
9
+
## CLI Invocation
10
+
11
+
`emulate` is a zsh built-in command (it sets shell emulation mode). Running bare `emulate` in zsh invokes the shell built-in, not the npm binary. Always use `npx emulate` in user-facing CLI examples, docs, skills, help output, and post-command messages. The only exception is when `emulate` appears as a subprocess argument to another tool (e.g. `portless github.emulate emulate start`), where the binary is resolved by the parent process rather than the shell.
12
+
9
13
## Dependencies
10
14
11
15
Always check for the latest npm version when adding dependencies. Use `pnpm add <package>` (without version) to get the latest, or verify with `npm view <package> version` first.
The `PORTLESS_URL` env var is automatically set by the `portless` CLI wrapper when running a command through it (e.g. `portless github.emulate emulate start`), typically to a value like `https://{service}.emulate.localhost`. It supports `{service}` interpolation, just like `--base-url` and `EMULATE_BASE_URL`. When no explicit `baseUrl` is provided, it is used as a fallback.
Configuration is optional. The CLI auto-detects config files in this order: `emulate.config.yaml` / `.yml`, `emulate.config.json`, `service-emulator.config.yaml` / `.yml`, `service-emulator.config.json`. Or pass `--seed <file>` explicitly. Run `emulate init` to generate a starter file.
159
+
Configuration is optional. The CLI auto-detects config files in this order: `emulate.config.yaml` / `.yml`, `emulate.config.json`, `service-emulator.config.yaml` / `.yml`, `service-emulator.config.json`. Or pass `--seed <file>` explicitly. Run `npx emulate init` to generate a starter file.
constSYSTEM_PROMPT=`You are a helpful documentation assistant for emulate, a local drop-in replacement for Vercel, GitHub, Google, Slack, Apple, Microsoft, AWS, Okta, MongoDB Atlas, Resend, and Stripe APIs used in CI and no-network sandboxes.
16
16
17
-
emulate provides fully stateful, production-fidelity API emulation, not mocks. The CLI is installed as the "emulate" npm package and run via "npx emulate" or just "emulate". It also supports a programmatic API via createEmulator and a Next.js adapter (@emulators/adapter-next) for embedding emulators in your app.
17
+
emulate provides fully stateful, production-fidelity API emulation, not mocks. The CLI is installed as the "emulate" npm package and run via "npx emulate". It also supports a programmatic API via createEmulator and a Next.js adapter (@emulators/adapter-next) for embedding emulators in your app.
18
18
19
19
You have access to the full emulate documentation via the bash and readFile tools. The docs are available as markdown files in the /workspace/ directory.
Copy file name to clipboardExpand all lines: skills/emulate/SKILL.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,25 +30,25 @@ All services start with sensible defaults:
30
30
31
31
```bash
32
32
# Start all services (zero-config)
33
-
emulate
33
+
npx emulate
34
34
35
35
# Start specific services
36
-
emulate --service vercel,github
36
+
npx emulate --service vercel,github
37
37
38
38
# Custom base port (auto-increments per service)
39
-
emulate --port 3000
39
+
npx emulate --port 3000
40
40
41
41
# Use a seed config file
42
-
emulate --seed config.yaml
42
+
npx emulate --seed config.yaml
43
43
44
44
# Generate a starter config
45
-
emulate init
45
+
npx emulate init
46
46
47
47
# Generate config for a specific service
48
-
emulate init --service vercel
48
+
npx emulate init --service vercel
49
49
50
50
# List available services
51
-
emulate list
51
+
npx emulate list
52
52
```
53
53
54
54
### Options
@@ -133,7 +133,7 @@ Configuration is optional. The CLI auto-detects config files in this order:
133
133
3.`service-emulator.config.yaml` / `.yml`
134
134
4.`service-emulator.config.json`
135
135
136
-
Or pass `--seed <file>` explicitly. Run `emulate init` to generate a starter file.
136
+
Or pass `--seed <file>` explicitly. Run `npx emulate init` to generate a starter file.
137
137
138
138
### Config Structure
139
139
@@ -261,7 +261,7 @@ Each service also has a fallback user. If no token is provided, requests authent
261
261
[portless](https://github.com/vercel-labs/portless) gives emulators trusted HTTPS URLs with auto-generated certs. Use the `--portless` flag to auto-register each service as a portless alias:
The `PORTLESS_URL` env var is automatically set by the `portless` CLI wrapper when running a command through it (e.g. `portless github.emulate emulate start`), typically to a value like `https://{service}.emulate.localhost`. It supports `{service}` interpolation, just like `--base-url` and `EMULATE_BASE_URL`. When no explicit `baseUrl` is provided, it is used as a fallback.
0 commit comments