ghostrun-cli 1.0.0 → 1.0.2

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 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.
@@ -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).