@tsproxy/cli 0.0.1 → 0.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.
Files changed (2) hide show
  1. package/README.md +63 -0
  2. package/package.json +8 -7
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # @tsproxy/cli
2
+
3
+ CLI for [tsproxy](https://github.com/akshitkrnagpal/tsproxy) — a Typesense search proxy framework.
4
+
5
+ > **This project is under heavy development.**
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ npx @tsproxy/cli init
11
+ docker compose up -d
12
+ npx tsproxy dev
13
+ ```
14
+
15
+ ## Commands
16
+
17
+ ```bash
18
+ tsproxy init # Interactive project setup
19
+ tsproxy dev # Start proxy in dev mode (hot reload)
20
+ tsproxy start # Start proxy in production mode
21
+ tsproxy build # Build for production
22
+ tsproxy seed <file> # Seed data via the ingest API
23
+ tsproxy migrate # Sync Typesense schema with config
24
+ tsproxy health # Check Typesense + Redis status
25
+ ```
26
+
27
+ ## `tsproxy init`
28
+
29
+ Interactive setup that asks:
30
+
31
+ 1. **What to set up** — Backend / Frontend / Both
32
+ 2. **How you run Typesense** — Docker / Typesense Cloud / Self-hosted
33
+ 3. **Persistent queue** — Redis (optional)
34
+ 4. **Frontend framework** — React / Vanilla JS
35
+
36
+ Generates `tsproxy.config.ts`, `docker-compose.yml`, `.env`, and installs dependencies.
37
+
38
+ ## `tsproxy migrate`
39
+
40
+ Diffs your `tsproxy.config.ts` collections against live Typesense schema:
41
+
42
+ ```bash
43
+ npx tsproxy migrate # dry run
44
+ npx tsproxy migrate --apply # apply changes
45
+ npx tsproxy migrate --apply --drop # drop and recreate
46
+ ```
47
+
48
+ ## `tsproxy seed`
49
+
50
+ Seeds data through the proxy's ingest API (applies computed fields, uses queue):
51
+
52
+ ```bash
53
+ npx tsproxy seed products.json --collection products
54
+ npx tsproxy seed products.json --collection products --locale en
55
+ ```
56
+
57
+ ## Documentation
58
+
59
+ [tsproxy.akshit.io](https://tsproxy.akshit.io)
60
+
61
+ ## License
62
+
63
+ MIT
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@tsproxy/cli",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "CLI for tsproxy — Typesense search proxy framework",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "tsproxy": "./dist/index.js"
8
8
  },
9
9
  "files": [
10
- "dist"
10
+ "dist",
11
+ "README.md"
11
12
  ],
12
13
  "publishConfig": {
13
14
  "access": "public"
@@ -24,6 +25,10 @@
24
25
  "proxy",
25
26
  "cli"
26
27
  ],
28
+ "scripts": {
29
+ "build": "tsup src/index.ts --format esm --target node22",
30
+ "dev": "tsx src/index.ts"
31
+ },
27
32
  "dependencies": {
28
33
  "@clack/prompts": "^0.10.0",
29
34
  "commander": "^13.1.0",
@@ -34,9 +39,5 @@
34
39
  "tsup": "^8.4.0",
35
40
  "tsx": "^4.19.0",
36
41
  "typescript": "^5"
37
- },
38
- "scripts": {
39
- "build": "tsup src/index.ts --format esm --target node22",
40
- "dev": "tsx src/index.ts"
41
42
  }
42
- }
43
+ }