openreplica 1.0.0__tar.gz

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 (40) hide show
  1. openreplica-1.0.0/AUTHORS +5 -0
  2. openreplica-1.0.0/LICENSE +21 -0
  3. openreplica-1.0.0/NOTICE +20 -0
  4. openreplica-1.0.0/PKG-INFO +338 -0
  5. openreplica-1.0.0/README.md +318 -0
  6. openreplica-1.0.0/pyproject.toml +36 -0
  7. openreplica-1.0.0/setup.cfg +4 -0
  8. openreplica-1.0.0/tests/test_browser_stub.py +73 -0
  9. openreplica-1.0.0/tests/test_cli.py +103 -0
  10. openreplica-1.0.0/tests/test_contrast_listing.py +125 -0
  11. openreplica-1.0.0/tests/test_doctor.py +41 -0
  12. openreplica-1.0.0/tests/test_extract.py +47 -0
  13. openreplica-1.0.0/tests/test_imgdiff.py +210 -0
  14. openreplica-1.0.0/tests/test_install.py +105 -0
  15. openreplica-1.0.0/tests/test_parity.py +113 -0
  16. openreplica-1.0.0/tests/test_repo.py +155 -0
  17. openreplica-1.0.0/tests/test_reviews.py +132 -0
  18. openreplica-1.0.0/tests/test_state_gate.py +213 -0
  19. openreplica-1.0.0/tests/test_sweep.py +85 -0
  20. openreplica-1.0.0/tools/openreplica.egg-info/PKG-INFO +338 -0
  21. openreplica-1.0.0/tools/openreplica.egg-info/SOURCES.txt +38 -0
  22. openreplica-1.0.0/tools/openreplica.egg-info/dependency_links.txt +1 -0
  23. openreplica-1.0.0/tools/openreplica.egg-info/entry_points.txt +2 -0
  24. openreplica-1.0.0/tools/openreplica.egg-info/top_level.txt +1 -0
  25. openreplica-1.0.0/tools/replkit/__init__.py +8 -0
  26. openreplica-1.0.0/tools/replkit/__main__.py +6 -0
  27. openreplica-1.0.0/tools/replkit/browser.py +299 -0
  28. openreplica-1.0.0/tools/replkit/cli.py +197 -0
  29. openreplica-1.0.0/tools/replkit/contrast.py +152 -0
  30. openreplica-1.0.0/tools/replkit/data/themes.json +52 -0
  31. openreplica-1.0.0/tools/replkit/doctor.py +145 -0
  32. openreplica-1.0.0/tools/replkit/extract.py +239 -0
  33. openreplica-1.0.0/tools/replkit/gate.py +438 -0
  34. openreplica-1.0.0/tools/replkit/imgdiff.py +456 -0
  35. openreplica-1.0.0/tools/replkit/listing.py +181 -0
  36. openreplica-1.0.0/tools/replkit/parity.py +228 -0
  37. openreplica-1.0.0/tools/replkit/reviews.py +311 -0
  38. openreplica-1.0.0/tools/replkit/state.py +213 -0
  39. openreplica-1.0.0/tools/replkit/sweep.py +178 -0
  40. openreplica-1.0.0/tools/replkit/util.py +64 -0
@@ -0,0 +1,5 @@
1
+ OpenReplica is maintained by:
2
+
3
+ Miguel <miguelabrador1414@gmail.com>
4
+
5
+ Based on "The Replica skill" by Jake Schincariol.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jake Schincariol
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,20 @@
1
+ OpenReplica
2
+ Copyright (c) 2026 Miguel <miguelabrador1414@gmail.com>
3
+
4
+ This project is a fork of "The Replica skill" by Jake Schincariol:
5
+ https://github.com/Jakeschincariol/replica-skill
6
+
7
+ The upstream project is licensed under the MIT License. The original
8
+ copyright notice is retained in LICENSE. The deterministic tooling in
9
+ tools/replkit (image diff, parity matrix, brand sweep, contrast checker,
10
+ review ranking, store listing linter) is derived from the upstream
11
+ implementation and has been adapted to run as a single Python CLI.
12
+
13
+ Upstream copyright:
14
+ Copyright (c) 2026 Jake Schincariol
15
+
16
+ Modifications and new code:
17
+ Copyright (c) 2026 Miguel
18
+
19
+ Both the upstream and modified code are distributed under the MIT License.
20
+ See LICENSE for the full text.
@@ -0,0 +1,338 @@
1
+ Metadata-Version: 2.4
2
+ Name: openreplica
3
+ Version: 1.0.0
4
+ Summary: Rebuild any app's functionality clean-room with gated opencode skills and a dependency-free CLI.
5
+ Author: Miguel
6
+ License: MIT
7
+ Project-URL: Homepage, https://miguelabrador1414-commits.github.io/openreplica/
8
+ Project-URL: Repository, https://github.com/miguelabrador1414-commits/openreplica
9
+ Project-URL: Changelog, https://github.com/miguelabrador1414-commits/openreplica/blob/main/CHANGELOG.md
10
+ Keywords: opencode,agent-skills,clean-room,cli,ai-agents
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3 :: Only
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ License-File: NOTICE
18
+ License-File: AUTHORS
19
+ Dynamic: license-file
20
+
21
+ # OpenReplica
22
+
23
+ [![tests](https://github.com/miguelabrador1414-commits/openreplica/actions/workflows/tests.yml/badge.svg)](https://github.com/miguelabrador1414-commits/openreplica/actions/workflows/tests.yml)
24
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
25
+ [![Python 3.8+](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/)
26
+ [![opencode native](https://img.shields.io/badge/opencode-native-667eea.svg)](https://opencode.ai)
27
+
28
+ Rebuild any app's functionality from scratch, clean-room, then launch it under
29
+ your own brand. Eleven gated skills for [opencode](https://opencode.ai) carry
30
+ the whole workflow, from reverse-engineering the target to deploy. Free, MIT,
31
+ no signup, no API key required by the pack itself.
32
+
33
+ [Leer en español](README.es.md)
34
+
35
+ OpenReplica is a fork of [The Replica skill](https://github.com/Jakeschincariol/replica-skill)
36
+ by Jake Schincariol, rebuilt around a single `replica` CLI, explicit project
37
+ state and deterministic quality gates.
38
+
39
+ ![OpenReplica terminal demo](docs/assets/demo.gif)
40
+
41
+ ## Who is this for
42
+
43
+ - **Solo builders and indie hackers** who want a working clone of a proven app
44
+ to adapt to a niche, instead of starting from a blank page.
45
+ - **Teams rescuing an abandoned product** by rebuilding its functionality from
46
+ public behaviour, without touching the original code or assets.
47
+ - **Developers learning architecture** by mapping a real app's features, flows
48
+ and design system, then rebuilding them phase by phase.
49
+
50
+ ## What it does
51
+
52
+ One skill reverse-engineers the app you want to clone. One rebuilds it. One
53
+ tests it for bugs. Another reads what the original's users hate and turns it
54
+ into a fix plan. In between, the pack plans the stack, rebuilds the design
55
+ system, wires auth and payments, scores parity, names and rebrands the result,
56
+ writes the launch, and ships it.
57
+
58
+ The workflow is:
59
+
60
+ ```text
61
+ recon -> architect -> design -> build -> backend -> test -> diff
62
+ -> entrepreneur -> brand -> launch -> deploy
63
+ ```
64
+
65
+ Each phase writes evidence into `replica/` in your project. Each phase has a
66
+ gate. You do not move on until the gate passes.
67
+
68
+ **It rebuilds what an app does, never what it owns.** Features and flows,
69
+ clean-room style. Not its source code, logo, copy, fonts, content or private
70
+ APIs.
71
+
72
+ ## Requirements
73
+
74
+ - [opencode](https://opencode.ai) with a model that can call tools.
75
+ - Python 3.8 or newer for the CLI.
76
+ - Optional: Playwright and Chromium for real browser capture. The default
77
+ capture path is offline and does not download anything.
78
+
79
+ The core CLI has no runtime dependencies outside the Python standard library.
80
+
81
+ ## Install
82
+
83
+ ### One line
84
+
85
+ ```bash
86
+ curl -fsSL https://raw.githubusercontent.com/miguelabrador1414-commits/openreplica/main/scripts/get.sh | sh -s -- --global
87
+ ```
88
+
89
+ This clones the repo to a temporary folder, runs the installer, and cleans up.
90
+ It installs the CLI, the wrapper, the skills, the commands and the agent. Then
91
+ restart opencode.
92
+
93
+ ### Global
94
+
95
+ ```bash
96
+ git clone https://github.com/miguelabrador1414-commits/openreplica.git
97
+ cd openreplica
98
+ ./scripts/install.sh --global
99
+ export PATH="$HOME/.local/bin:$PATH"
100
+ replica doctor
101
+ ```
102
+
103
+ This installs:
104
+
105
+ - the CLI in `~/.local/share/openreplica`,
106
+ - the wrapper in `~/.local/bin/replica`,
107
+ - skills in `~/.config/opencode/skills`,
108
+ - commands in `~/.config/opencode/commands`,
109
+ - the agent in `~/.config/opencode/agents`.
110
+
111
+ Restart opencode after installing so it loads the new files.
112
+
113
+ ### Per project
114
+
115
+ ```bash
116
+ ./scripts/install.sh --project /path/to/your-app
117
+ ```
118
+
119
+ This copies the skills, commands, agent, project config and a local CLI into
120
+ the target project. It does not touch your global config. If the project
121
+ already has `.opencode/opencode.json`, the installer leaves it alone and asks
122
+ you to add the two settings yourself. Use the local CLI when `replica` is not
123
+ on your `PATH`:
124
+
125
+ ```bash
126
+ /path/to/your-app/.opencode/bin/replica doctor
127
+ ```
128
+
129
+ ### Manual
130
+
131
+ ```bash
132
+ git clone https://github.com/miguelabrador1414-commits/openreplica.git
133
+ cp -R openreplica/.opencode/skills/* ~/.config/opencode/skills/
134
+ cp -R openreplica/.opencode/commands/* ~/.config/opencode/commands/
135
+ cp -R openreplica/.opencode/agents/* ~/.config/opencode/agents/
136
+ ln -sf "$PWD/openreplica/bin/replica" ~/.local/bin/replica
137
+ ```
138
+
139
+ ### Claude Code compatibility
140
+
141
+ The upstream `.claude-plugin` manifest is kept and points at `.opencode/skills`.
142
+ opencode is the tested target; Claude Code support is best-effort and not part
143
+ of the test matrix.
144
+
145
+ ## Quick start
146
+
147
+ ```bash
148
+ cd my-app
149
+ replica init
150
+ opencode
151
+ ```
152
+
153
+ Then run the phases in order:
154
+
155
+ ```text
156
+ /replica-recon https://example.com
157
+ /replica-architect
158
+ /replica-design
159
+ /replica-build
160
+ /replica-backend
161
+ /replica-test
162
+ /replica-diff
163
+ /replica-entrepreneur
164
+ /replica-brand
165
+ /replica-launch
166
+ /replica-deploy
167
+ ```
168
+
169
+ You can run any phase on its own. `/replica-entrepreneur` on an app you are
170
+ only thinking about cloning is a good way to decide whether it is worth it.
171
+
172
+ ## The eleven phases
173
+
174
+ | # | Command | What it produces | Gate checks |
175
+ | --- | --- | --- | --- |
176
+ | 1 | `/replica-recon` | `replica/recon.md`, `replica/features.csv`, screenshots | Map, matrix, priorities, must-haves |
177
+ | 2 | `/replica-architect` | `replica/architecture.md` | Stack, schema, routes, build order |
178
+ | 3 | `/replica-design` | `replica/design/tokens.json`, component specs | Tokens and WCAG AA contrast |
179
+ | 4 | `/replica-build` | App screens, `replica/build-log.md`, updated matrix | Implemented features and clone screenshots |
180
+ | 5 | `/replica-backend` | Migrations, server code, `replica/backend.md` | Backend notes, `.env.example`, no secrets |
181
+ | 6 | `/replica-test` | `replica/test-plan.md`, `replica/bugs.md`, e2e tests | Plan present, no open S1 or S2 |
182
+ | 7 | `/replica-diff` | `replica/parity.json`, diff images | Parity score at least 70 |
183
+ | 8 | `/replica-entrepreneur` | `replica/reviews.csv`, `replica/feedback.md`, `replica/fixes.md` | Linked reviews and a fix plan |
184
+ | 9 | `/replica-brand` | `replica/brand.md`, `replica/brand.json` | Clean rebrand sweep |
185
+ | 10 | `/replica-launch` | `replica/launch/`, `replica/listing.json` | Store listing lint has no errors |
186
+ | 11 | `/replica-deploy` | `replica/preflight.md`, production setup | Full preflight, parity at least 80, clean sweep |
187
+
188
+ The skills contain the detailed method. The gates are the contract.
189
+
190
+ ## State and gates
191
+
192
+ ```bash
193
+ replica init # create replica/state.json
194
+ replica status # current phase and next step
195
+ replica mark recon in_progress
196
+ # do the work
197
+ replica gate recon # exit 0 pass, exit 2 blocked
198
+ replica mark recon passed # only after the gate passes
199
+ ```
200
+
201
+ `replica gate` checks the artifacts, not your confidence. If it fails, it
202
+ lists the exact file or value to fix.
203
+
204
+ ## The CLI
205
+
206
+ | Command | Purpose |
207
+ | --- | --- |
208
+ | `replica init` | Create `replica/` and the state file. |
209
+ | `replica status` | Show phase status and the next phase. |
210
+ | `replica mark` | Update a phase status, note or artifact list. |
211
+ | `replica gate` | Check a phase against its evidence rules. |
212
+ | `replica doctor` | Check Python, git, node, Playwright, state and PATH. |
213
+ | `replica capture` | Capture a URL or a local fixture. Offline by default. |
214
+ | `replica extract` | Read routes, controls, colours and fonts from HTML. |
215
+ | `replica imgdiff` | Compare two screenshots by layout or pixels. |
216
+ | `replica parity` | Score the feature matrix and list what is missing. |
217
+ | `replica contrast` | Check WCAG contrast on design tokens. |
218
+ | `replica sweep` | Find the original's name, domain or colours. |
219
+ | `replica reviews` | Rank real reviews into complaints and requests. |
220
+ | `replica listing` | Lint an App Store or Google Play listing. |
221
+
222
+ Examples:
223
+
224
+ ```bash
225
+ replica parity replica/features.csv --visual replica/diffs/*.json --markdown
226
+ replica imgdiff replica/screens/S07.png replica/clone-screens/S07.png --out diff-S07.png
227
+ replica contrast replica/design/tokens.json
228
+ replica sweep . --config replica/brand.json
229
+ replica listing replica/launch/listing.json
230
+ ```
231
+
232
+ ## Offline capture, real capture
233
+
234
+ `replica capture` defaults to a deterministic path:
235
+
236
+ - `--backend stub` with `--fixture` reads a local HTML or folder. No network,
237
+ no downloads.
238
+ - `--backend manual` writes a checklist with the exact viewports to capture.
239
+ - `--backend playwright --allow-network` uses a real browser. It only works if
240
+ Playwright and Chromium are installed by you.
241
+
242
+ The pack never downloads Chromium on its own.
243
+
244
+ ## Models
245
+
246
+ The project default is `opencode/deepseek-v4.1-flash-free`. It is set in:
247
+
248
+ - `.opencode/opencode.json` as the project model and default agent,
249
+ - `.opencode/agents/replica.md` as the agent model.
250
+
251
+ To use another model, change both files. Model IDs always carry a provider
252
+ prefix. The deterministic CLI and the gates reduce how much the result depends
253
+ on the model, but use a model that can call tools reliably.
254
+
255
+ ## Repository layout
256
+
257
+ ```text
258
+ .opencode/
259
+ skills/replica-*/SKILL.md the 11 phase skills and their references
260
+ commands/replica-*.md one opencode command per phase
261
+ agents/replica.md orchestrator agent
262
+ opencode.json project default agent and model
263
+ tools/replkit/ dependency-free Python CLI
264
+ bin/replica wrapper for a checkout
265
+ tests/ unit, fixture and repository tests
266
+ docs/es/ Spanish guides
267
+ scripts/install.sh global or per-project install
268
+ ```
269
+
270
+ Your project artifacts live in `replica/` in your own app, not in this repo.
271
+
272
+ ## Development
273
+
274
+ ```bash
275
+ make check # compile, run 102 tests, lint if ruff is installed
276
+ make test # unit tests only
277
+ ./bin/replica --help
278
+ ```
279
+
280
+ Rules for contributors:
281
+
282
+ - Core Python stays standard library only.
283
+ - Deterministic logic goes in `tools/replkit/`, not in skill prose.
284
+ - Every CLI command needs a test.
285
+ - English is the main language. Keep `README.es.md` and `docs/es/` in sync.
286
+ - No em dashes in repository text. The tests enforce it.
287
+ - Do not commit secrets, private screenshots or personal review exports.
288
+
289
+ ## Spanish guides
290
+
291
+ - [Instalación](docs/es/instalacion.md)
292
+ - [Flujo de trabajo](docs/es/flujo.md)
293
+ - [Referencia del CLI](docs/es/cli.md)
294
+ - [Modelos y agente](docs/es/modelos.md)
295
+ - [Seguridad y legal](docs/es/seguridad-legal.md)
296
+
297
+ ## Safety and legal
298
+
299
+ **Clean room.** OpenReplica studies what an app does and how a user moves
300
+ through it, then writes everything fresh. It never copies the target's source
301
+ code, proprietary assets, logos, trademarks, copy or private APIs.
302
+
303
+ **Allowed sources only.** Public pages and your own account. It never logs into
304
+ someone else's account, bypasses a paywall or scrapes behind a login. If your
305
+ account terms forbid using it to build a competitor, the skills say so and
306
+ stick to public sources.
307
+
308
+ **Rebrand before launch.** New name, new palette, new logo, new words. The
309
+ deploy gate blocks until the sweep is clean.
310
+
311
+ **"Clone any app" means functionality and flow.** Not the content, network or
312
+ licences an app owns. You can rebuild a music app's player, playlists and
313
+ sharing. You cannot clone its catalogue.
314
+
315
+ **No perfect clone guarantee.** Results depend on the app. A booking tool is
316
+ weeks. A spreadsheet engine is not. Recon sizes it honestly and parity gives
317
+ you a number, not a vibe.
318
+
319
+ **No invented evidence.** The Entrepreneur never fabricates reviews, quotes,
320
+ ratings or sources. Every quote is verbatim and linked, and the sample size is
321
+ stated.
322
+
323
+ **Check before you sell.** Run the trademark and domain checks the brand phase
324
+ lists, read the terms of everything you use, and talk to a lawyer before
325
+ launch if there is money on the line. This is not legal advice.
326
+
327
+ ## Credit
328
+
329
+ Original project: [The Replica skill](https://github.com/Jakeschincariol/replica-skill)
330
+ by Jake Schincariol, [opusjake.ai](https://opusjake.ai). The upstream
331
+ copyright and MIT terms are retained in `LICENSE` and `NOTICE`.
332
+
333
+ OpenReplica modifications and the opencode integration are maintained by
334
+ Miguel.
335
+
336
+ ## License
337
+
338
+ MIT. Take it, change it, ship it. See [LICENSE](LICENSE).