ghostrun-cli 1.0.0 → 1.0.1
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 +64 -0
- package/CODE_OF_CONDUCT.md +41 -0
- package/CONTRIBUTING.md +90 -0
- package/README.md +25 -5
- package/package.json +12 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to GhostRun are documented here.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## [1.0.0] — 2026-04-14
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
**Core CLI**
|
|
14
|
+
- `ghostrun learn <url>` — record browser flows interactively with Playwright
|
|
15
|
+
- `ghostrun run <flow>` — replay flows, with `--output json` for machine-readable results
|
|
16
|
+
- `ghostrun run <flow> --report html` — generate a self-contained HTML run report
|
|
17
|
+
- `ghostrun list` — list all saved flows
|
|
18
|
+
- `ghostrun flow:import` / `ghostrun flow:export` — share flows as JSON files
|
|
19
|
+
- `ghostrun flow:rename <id> <new-name>` — rename a saved flow
|
|
20
|
+
- `ghostrun flow:clone <id>` — duplicate a flow with a new ID
|
|
21
|
+
- `ghostrun flow:from-curl "<curl command>"` — generate an API test flow from a curl command
|
|
22
|
+
- `ghostrun flow:from-spec <openapi.json|yaml>` — generate flows from an OpenAPI/Swagger spec
|
|
23
|
+
- `ghostrun env:set` / `ghostrun env:list` — manage named environment profiles (staging, prod, etc.)
|
|
24
|
+
|
|
25
|
+
**API Testing**
|
|
26
|
+
- `http:request` action — supports GET, POST, PUT, PATCH, DELETE with headers and body
|
|
27
|
+
- `assert:response` action — assert status codes, JSON body values, response time
|
|
28
|
+
- `extract:json` action — pull values from responses into variables for downstream steps
|
|
29
|
+
- `set:variable` action — define variables inline within flows
|
|
30
|
+
|
|
31
|
+
**Performance Testing**
|
|
32
|
+
- `ghostrun perf:run <flow>` — run load tests with configurable VUs and duration
|
|
33
|
+
- `ghostrun perf:run <flow> --report html` — HTML performance report with p50/p95/p99 charts
|
|
34
|
+
- `ghostrun perf:compare <run1> <run2>` — side-by-side comparison of two perf runs
|
|
35
|
+
|
|
36
|
+
**MCP Server**
|
|
37
|
+
- Full MCP server (`mcp-server.js`) exposing 7 tools: `list_flows`, `get_flow`, `run_flow`, `get_run_result`, `list_runs`, `delete_flow`, `get_status`
|
|
38
|
+
- `run_flow` delegates to the CLI via `--output json` — always in sync, no duplication
|
|
39
|
+
- Works with Claude Desktop, Cursor, and any MCP-compatible client
|
|
40
|
+
|
|
41
|
+
**Templates** (installed via `ghostrun store install`)
|
|
42
|
+
- `github-login` — GitHub OAuth flow
|
|
43
|
+
- `checkout-flow` — e-commerce checkout automation
|
|
44
|
+
- `form-submit` — generic form fill and submit
|
|
45
|
+
- `api-auth-flow` — token auth + protected endpoint test
|
|
46
|
+
- `api-crud` — full CRUD lifecycle (create → read → update → delete)
|
|
47
|
+
- `load-baseline` — warmup → ramp → sustained → cooldown perf baseline
|
|
48
|
+
|
|
49
|
+
**Misc**
|
|
50
|
+
- `ghostrun monitor <url>` — continuous uptime monitoring with alerts
|
|
51
|
+
- `ghostrun init` — initialize GhostRun with guided setup
|
|
52
|
+
- `ghostrun store list` / `ghostrun store install` — template marketplace
|
|
53
|
+
- `--visible` flag on `learn` / `run` — show the browser window during execution
|
|
54
|
+
- SQLite-backed storage (`~/.ghostrun/data/ghostrun.db`)
|
|
55
|
+
- AI-powered failure summaries (requires `GHOSTRUN_ANTHROPIC_API_KEY`)
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Versioning
|
|
60
|
+
|
|
61
|
+
GhostRun follows [Semantic Versioning](https://semver.org/):
|
|
62
|
+
- **MAJOR** — breaking changes to CLI commands or flow JSON schema
|
|
63
|
+
- **MINOR** — new commands, new flow actions, new MCP tools
|
|
64
|
+
- **PATCH** — bug fixes, performance improvements, doc updates
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as contributors and maintainers pledge to make participation in GhostRun a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
## Our Standards
|
|
8
|
+
|
|
9
|
+
**Examples of behavior that contributes to a positive environment:**
|
|
10
|
+
|
|
11
|
+
- Using welcoming and inclusive language
|
|
12
|
+
- Being respectful of differing viewpoints and experiences
|
|
13
|
+
- Gracefully accepting constructive criticism
|
|
14
|
+
- Focusing on what is best for the community
|
|
15
|
+
- Showing empathy towards other community members
|
|
16
|
+
|
|
17
|
+
**Examples of unacceptable behavior:**
|
|
18
|
+
|
|
19
|
+
- The use of sexualized language or imagery
|
|
20
|
+
- Trolling, insulting/derogatory comments, and personal or political attacks
|
|
21
|
+
- Public or private harassment
|
|
22
|
+
- Publishing others' private information without explicit permission
|
|
23
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
24
|
+
|
|
25
|
+
## Our Responsibilities
|
|
26
|
+
|
|
27
|
+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
|
28
|
+
|
|
29
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct.
|
|
30
|
+
|
|
31
|
+
## Scope
|
|
32
|
+
|
|
33
|
+
This Code of Conduct applies within all project spaces — GitHub issues, pull requests, and discussions — and in public spaces when an individual is representing the project.
|
|
34
|
+
|
|
35
|
+
## Enforcement
|
|
36
|
+
|
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting the maintainer at [builtbysharan.com](https://builtbysharan.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
|
|
38
|
+
|
|
39
|
+
## Attribution
|
|
40
|
+
|
|
41
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Contributing to GhostRun
|
|
2
|
+
|
|
3
|
+
Thanks for taking the time to contribute! GhostRun is an open-source project and contributions of all kinds are welcome.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Getting started
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://github.com/TechBuiltBySharan/ghostrun
|
|
11
|
+
cd ghostrun
|
|
12
|
+
npm install
|
|
13
|
+
npm run build # compile ghostrun.ts → ghostrun.js
|
|
14
|
+
node ghostrun.js help
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Project structure
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
ghostrun.ts # Main CLI — all commands live here (~6400 lines)
|
|
23
|
+
mcp-server.ts # MCP server — delegates flow execution to ghostrun.js
|
|
24
|
+
templates/ # Built-in flow templates (ghostrun store install)
|
|
25
|
+
test-flows/ # Example API test flows for development
|
|
26
|
+
packages/database/ # DatabaseManager (extracted from main CLI)
|
|
27
|
+
landing/ # Landing page (ghostrun.builtbysharan.com)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The project is a single-file TypeScript CLI compiled with esbuild into `ghostrun.js`. The monorepo packages under `packages/` are stubs for a future refactor — the active code is in `ghostrun.ts`.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## How to contribute
|
|
35
|
+
|
|
36
|
+
### Bug reports
|
|
37
|
+
|
|
38
|
+
Open an issue with:
|
|
39
|
+
- The exact command you ran
|
|
40
|
+
- What you expected vs what happened
|
|
41
|
+
- Your OS and Node version (`node --version`)
|
|
42
|
+
- Any error output
|
|
43
|
+
|
|
44
|
+
### Feature requests
|
|
45
|
+
|
|
46
|
+
Open an issue describing the use case. Explain what you're trying to do, not just the feature itself.
|
|
47
|
+
|
|
48
|
+
### Pull requests
|
|
49
|
+
|
|
50
|
+
1. Fork the repo and create a branch: `git checkout -b fix/my-fix`
|
|
51
|
+
2. Make your changes in `ghostrun.ts`
|
|
52
|
+
3. Run `npm run build` to compile
|
|
53
|
+
4. Test manually: `node ghostrun.js <your-command>`
|
|
54
|
+
5. Open a PR with a clear description of what changed and why
|
|
55
|
+
|
|
56
|
+
### Adding a flow template
|
|
57
|
+
|
|
58
|
+
Templates live in `templates/` as `.flow.json` files. Copy an existing one as a starting point. They use `{{VARIABLE}}` placeholders for anything site-specific.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Development tips
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Quick rebuild and test
|
|
66
|
+
npm run build && node ghostrun.js help
|
|
67
|
+
|
|
68
|
+
# Watch for changes (no watcher built in — just re-run build)
|
|
69
|
+
npm run build
|
|
70
|
+
|
|
71
|
+
# Run against the test API server
|
|
72
|
+
node test-api-server.mjs &
|
|
73
|
+
ghostrun flow:import test-flows/health-check.flow.json
|
|
74
|
+
ghostrun run "API Health Check"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Code style
|
|
80
|
+
|
|
81
|
+
- TypeScript, no external formatter enforced
|
|
82
|
+
- Keep functions focused — one command per `async function run*()`
|
|
83
|
+
- New commands need: a function, a `case` in the switch, and a help entry
|
|
84
|
+
- No new runtime dependencies without discussion (bundle size matters)
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Questions?
|
|
89
|
+
|
|
90
|
+
Open an issue or reach out at [builtbysharan.com](https://builtbysharan.com).
|
package/README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
# GhostRun
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/ghostrun-cli)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](http://makeapullrequest.com)
|
|
6
|
+
[](https://www.npmjs.com/package/ghostrun-cli)
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
Record once. Replay as a ghost.
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
Browser automation + API testing + load testing in one CLI — record real browser flows, test REST APIs with assertions and variable extraction, run VU-based load tests, export to k6, detect failures with AI analysis, and chat with your test suite. Entirely local.
|
|
8
11
|
|
|
9
12
|
---
|
|
10
13
|
|
|
@@ -17,7 +20,7 @@ npm install -g ghostrun-cli
|
|
|
17
20
|
Or run from source:
|
|
18
21
|
|
|
19
22
|
```bash
|
|
20
|
-
git clone https://github.com/
|
|
23
|
+
git clone https://github.com/TechBuiltBySharan/ghostrun
|
|
21
24
|
cd ghostrun
|
|
22
25
|
npm install
|
|
23
26
|
npm run build
|
|
@@ -621,6 +624,23 @@ ghostrun init
|
|
|
621
624
|
|
|
622
625
|
---
|
|
623
626
|
|
|
627
|
+
## Trust & Transparency
|
|
628
|
+
|
|
629
|
+
- **100% local by default** — No cloud, no telemetry, no tracking. Everything runs on your machine.
|
|
630
|
+
- **Open source (MIT)** — Full source code at [github.com/TechBuiltBySharan/ghostrun](https://github.com/TechBuiltBySharan/ghostrun)
|
|
631
|
+
- **No surprise costs** — AI works offline with [Ollama](https://ollama.com) (free). Anthropic API key is optional.
|
|
632
|
+
- **PII sanitization built-in** — Emails, passwords, tokens, and API keys are redacted before being stored in the local SQLite database.
|
|
633
|
+
- **No vendor lock-in** — Flows are plain JSON files you own. Export, import, version-control them like code.
|
|
634
|
+
- **I use this for** — Regression testing my own web apps, monitoring live API endpoints, and running load tests before deploys.
|
|
635
|
+
|
|
636
|
+
---
|
|
637
|
+
|
|
638
|
+
## Contributing
|
|
639
|
+
|
|
640
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for how to get started.
|
|
641
|
+
|
|
642
|
+
---
|
|
643
|
+
|
|
624
644
|
## Built with
|
|
625
645
|
|
|
626
646
|
This project was built with the help of [Claude](https://claude.ai) and [Goose](https://goose-docs.ai).
|
|
@@ -629,4 +649,4 @@ This project was built with the help of [Claude](https://claude.ai) and [Goose](
|
|
|
629
649
|
|
|
630
650
|
## License
|
|
631
651
|
|
|
632
|
-
MIT
|
|
652
|
+
MIT — see [LICENSE](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ghostrun-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Browser automation + API testing + load testing in one tool. Record flows, test REST APIs, run VU-based load tests, export to k6. Entirely local.",
|
|
5
5
|
"main": "ghostrun.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,13 +8,21 @@
|
|
|
8
8
|
"ghostrun-mcp": "mcp-server.js"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|
|
11
|
-
"browser-automation",
|
|
12
|
-
"
|
|
11
|
+
"browser-automation",
|
|
12
|
+
"api-testing",
|
|
13
|
+
"load-testing",
|
|
14
|
+
"playwright",
|
|
15
|
+
"test-runner",
|
|
16
|
+
"cli",
|
|
17
|
+
"k6",
|
|
18
|
+
"local-first",
|
|
19
|
+
"mcp",
|
|
20
|
+
"e2e-testing"
|
|
13
21
|
],
|
|
14
22
|
"homepage": "https://ghostrun.builtbysharan.com",
|
|
15
23
|
"repository": {
|
|
16
24
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/
|
|
25
|
+
"url": "https://github.com/TechBuiltBySharan/ghostrun"
|
|
18
26
|
},
|
|
19
27
|
"license": "MIT",
|
|
20
28
|
"scripts": {
|