@iamsaroj/replicax 0.0.2 → 0.0.4
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/README.md +118 -12
- package/dist/index.js +1354 -175
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
None of your business code. None of your secrets. Just the setup.
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
|
-
[](https://www.npmjs.com/package/@iamsaroj/replicax)
|
|
14
|
+
[](https://nodejs.org)
|
|
15
|
+
[](https://www.typescriptlang.org)
|
|
16
|
+

|
|
17
|
+
[](LICENSE)
|
|
18
18
|
|
|
19
19
|
<sub>
|
|
20
20
|
<a href="#quick-start"><b>Quick start</b></a> •
|
|
@@ -219,6 +219,9 @@ No `.env`. No `Button.tsx`. No `UserService.ts`. No `react` runtime dependency.
|
|
|
219
219
|
| [`replicax validate`](#replicax-validate) | Schema + integrity (SHA‑256) check — CI‑friendly |
|
|
220
220
|
| [`replicax export`](#replicax-export--import) / [`import`](#replicax-export--import) | Portable `.tar.gz` profile in/out |
|
|
221
221
|
| [`replicax init-skill`](#replicax-init-skill) | Author an AI‑assistant skill from your stack |
|
|
222
|
+
| [`replicax doctor`](#replicax-doctor) | Check which dev tools are installed locally |
|
|
223
|
+
| [`replicax compare <a> <b>`](#replicax-compare-source-target) | Diff two profiles/projects: tooling, config, … |
|
|
224
|
+
| [`replicax audit`](#replicax-audit) | Score a setup vs best practices + recommendations |
|
|
222
225
|
|
|
223
226
|
> Every write operation accepts `--dry-run` (preview, touch nothing) and `--verbose` (list every file).
|
|
224
227
|
|
|
@@ -347,10 +350,92 @@ replicax init-skill --target claude --force # overwrite exist
|
|
|
347
350
|
`codex` → `.codex/skills/<name>/SKILL.md`, `antigravity` → `.agents/skills/<name>.md`. The **provider** (auto‑detected,
|
|
348
351
|
or forced with `--provider`) is the AI that _authors_ it — the two are independent.
|
|
349
352
|
|
|
353
|
+
> **Bring your own template.** If the project root has a `SKILL.md`, `init-skill` hands it to the AI as the **base** to
|
|
354
|
+
> refine — the model preserves your headings, structure, and instructions and fills them in from the detected setup,
|
|
355
|
+
> instead of starting from scratch.
|
|
356
|
+
|
|
350
357
|
> **Privacy:** only the project's _setup_ is sent to the provider — the same safe surface ReplicaX captures (config
|
|
351
358
|
> files, structure, `package.json` scripts/deps). Source code and secrets are never sent. With `--no-ai` (or no provider
|
|
352
359
|
> configured), ReplicaX falls back to a deterministic, fully offline template.
|
|
353
360
|
|
|
361
|
+
### `replicax doctor`
|
|
362
|
+
|
|
363
|
+
Report which developer tools are installed locally — runtimes, package managers, Docker, and editors — with versions.
|
|
364
|
+
Cross‑platform and read‑only; a missing tool is a finding, not an error.
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
replicax doctor
|
|
368
|
+
replicax doctor --json # machine-readable
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
```console
|
|
372
|
+
$ replicax doctor
|
|
373
|
+
Developer environment
|
|
374
|
+
|
|
375
|
+
✓ Node.js 22.17.1
|
|
376
|
+
✓ Git 2.45.1
|
|
377
|
+
✓ npm 10.2.0
|
|
378
|
+
✗ Docker not found
|
|
379
|
+
✓ Claude Code 2.1.0
|
|
380
|
+
|
|
381
|
+
8/11 tools found
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
### `replicax compare <source> <target>`
|
|
385
|
+
|
|
386
|
+
Diff two profiles — or two project directories — across tooling, configuration files, `package.json`, structure, and
|
|
387
|
+
metadata. Each argument may be a `.replicax` profile, a directory containing one, or a plain project folder (scanned on
|
|
388
|
+
the fly), so you can compare anything against anything.
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
replicax compare ./examples/react-vite ./examples/nextjs-enterprise
|
|
392
|
+
replicax compare ./my-app ./other-app --json
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
```text
|
|
396
|
+
Added:
|
|
397
|
+
+ Docker (Tooling)
|
|
398
|
+
+ src/api (Structure)
|
|
399
|
+
Removed:
|
|
400
|
+
- Jest (Tooling)
|
|
401
|
+
Changed:
|
|
402
|
+
~ eslint.config.js (Configuration files)
|
|
403
|
+
~ language: javascript → typescript (Metadata)
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### `replicax audit`
|
|
407
|
+
|
|
408
|
+
Score a project's setup against best‑practice rules — linting, formatting, testing, git hooks, CI/CD, containerization —
|
|
409
|
+
and get concrete recommendations for what's missing. Scans the current directory by default, or evaluates a stored
|
|
410
|
+
profile with `--profile`.
|
|
411
|
+
|
|
412
|
+
```bash
|
|
413
|
+
replicax audit
|
|
414
|
+
replicax audit --path ./some/project
|
|
415
|
+
replicax audit --profile ./examples/nextjs-enterprise/.replicax --json
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
```text
|
|
419
|
+
Project Score: 60/100
|
|
420
|
+
|
|
421
|
+
✓ Formatting
|
|
422
|
+
✓ Testing
|
|
423
|
+
✗ Git hooks
|
|
424
|
+
✗ Containerization
|
|
425
|
+
|
|
426
|
+
Missing:
|
|
427
|
+
- Git hooks
|
|
428
|
+
- Containerization
|
|
429
|
+
|
|
430
|
+
Recommendations:
|
|
431
|
+
- Add Husky to run checks before each commit.
|
|
432
|
+
- Add a Dockerfile to containerize the application.
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
> `compare` and `audit` build on the detection engine: every scan now reports the **detected stack** (React, TypeScript,
|
|
436
|
+
> Docker, GitHub Actions, …) with a confidence score, persisted in the profile and viewable via `inspect --section
|
|
437
|
+
> detections`.
|
|
438
|
+
|
|
354
439
|
---
|
|
355
440
|
|
|
356
441
|
## What gets captured
|
|
@@ -364,6 +449,7 @@ or forced with `--provider`) is the AI that _authors_ it — the two are indepen
|
|
|
364
449
|
| `.editorconfig`, Husky hooks | IDE folders (`.vscode/`, `.idea/`, `.vs/`, `.fleet/`, `.zed/`) |
|
|
365
450
|
| Test configs (Vitest/Jest/Playwright/Cypress) | Anything matched by `.replicaxignore` |
|
|
366
451
|
| Monorepo files, commitlint/lint‑staged/release/knip | |
|
|
452
|
+
| JVM build (Maven/Gradle) + Spring `application.*` | Compiled output (`target/`, `*.class`), the gradle wrapper JAR |
|
|
367
453
|
| Folder hierarchy (directories only) | Folder _contents_ |
|
|
368
454
|
|
|
369
455
|
**`package.json` is curated, not copied.** Only `scripts`, `devDependencies`, `engines`, `type`, `packageManager`, and
|
|
@@ -393,10 +479,10 @@ The same guarantees apply to `extract` — a remote repo's secrets are filtered
|
|
|
393
479
|
|
|
394
480
|
---
|
|
395
481
|
|
|
396
|
-
## Configuration — `.replicaxignore`
|
|
482
|
+
## Configuration — `.replicaxignore` and `.replicaxinclude`
|
|
397
483
|
|
|
398
|
-
|
|
399
|
-
from the profile — but their parent directories are still captured for structure.
|
|
484
|
+
**`.replicaxignore`** controls what gets *excluded*, with **gitignore syntax**. `init` can scaffold a starter for you.
|
|
485
|
+
Ignored files are excluded from the profile — but their parent directories are still captured for structure.
|
|
400
486
|
|
|
401
487
|
```gitignore
|
|
402
488
|
# Business logic (folders kept, contents dropped)
|
|
@@ -408,22 +494,42 @@ src/**/*.ts
|
|
|
408
494
|
*.log
|
|
409
495
|
```
|
|
410
496
|
|
|
497
|
+
**`.replicaxinclude`** is the opposite: a list of **glob patterns** (one per line, `#` comments) for *extra* files to
|
|
498
|
+
capture verbatim, on top of the auto-detected catalogue. Use it for config ReplicaX doesn't recognize by default
|
|
499
|
+
(`*.toml`, a `config/` directory, an IDE file you do want shared, …). A trailing `/` means "the whole directory".
|
|
500
|
+
|
|
501
|
+
```gitignore
|
|
502
|
+
# Capture these in addition to the auto-detected setup
|
|
503
|
+
app.config.toml
|
|
504
|
+
config/**
|
|
505
|
+
.vscode/extensions.json
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
**Precedence** (highest first): the **secret guard** always wins (a secret can never be included) →
|
|
509
|
+
**`.replicaxignore`** (your excludes beat your includes) → **`.replicaxinclude`** (overrides the default prune/ignore
|
|
510
|
+
lists, so it can reach normally-skipped locations) → the **built-in catalogue**.
|
|
511
|
+
|
|
411
512
|
---
|
|
412
513
|
|
|
413
514
|
## Profile format
|
|
414
515
|
|
|
415
|
-
A profile is five JSON files under `.replicax
|
|
516
|
+
A profile is five required JSON files under `.replicax/`, plus an optional manifest:
|
|
416
517
|
|
|
417
518
|
```text
|
|
418
519
|
.replicax/
|
|
419
520
|
├── profile.json # identity & metadata (name, version, timestamps)
|
|
420
521
|
├── tooling.json # every captured config file (verbatim) + the package.json template
|
|
421
522
|
├── structure.json # folder hierarchy (sorted POSIX directory paths)
|
|
422
|
-
├── metadata.json # node version, package manager, framework, language
|
|
423
|
-
|
|
523
|
+
├── metadata.json # node version, package manager, framework, language + detected stack
|
|
524
|
+
├── checksum.json # SHA-256 integrity hashes
|
|
525
|
+
└── manifest.json # content-free index of artifacts (path, category, size, hash)
|
|
424
526
|
```
|
|
425
527
|
|
|
426
|
-
All
|
|
528
|
+
All files are schema‑validated (zod) on load; `validate` additionally re‑checks checksums and rejects unsafe paths.
|
|
529
|
+
|
|
530
|
+
**Schema version 2.1.0** added the detected stack (`metadata.detections`), an optional `registry` block (for future
|
|
531
|
+
registry support), and `manifest.json` — all backward‑compatible. Profiles written by older ReplicaX (2.0.0) are
|
|
532
|
+
**migrated automatically on load** and the manifest is synthesized when absent, so existing profiles keep working.
|
|
427
533
|
|
|
428
534
|
---
|
|
429
535
|
|