@superdoc-dev/cli 0.1.1-next.1 → 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.
Files changed (5) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +228 -37
  3. package/dist/index.js +233590 -174815
  4. package/package.json +39 -17
  5. package/skill/SKILL.md +45 -0
package/package.json CHANGED
@@ -1,34 +1,56 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.1.1-next.1",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
7
7
  },
8
8
  "files": [
9
- "dist"
9
+ "dist",
10
+ "skill"
10
11
  ],
12
+ "dependencies": {
13
+ "@hocuspocus/provider": "^2.13.6",
14
+ "fast-glob": "^3.3.3",
15
+ "y-websocket": "^3.0.0",
16
+ "yjs": "13.6.19",
17
+ "@superdoc/document-api": "0.0.1"
18
+ },
19
+ "devDependencies": {
20
+ "@types/bun": "^1.3.8",
21
+ "@types/node": "22.19.2",
22
+ "typescript": "^5.9.2",
23
+ "superdoc": "1.15.0",
24
+ "@superdoc/super-editor": "0.0.1"
25
+ },
26
+ "module": "src/index.ts",
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "optionalDependencies": {
31
+ "@superdoc-dev/cli-darwin-arm64": "1.0.1",
32
+ "@superdoc-dev/cli-darwin-x64": "1.0.1",
33
+ "@superdoc-dev/cli-linux-x64": "1.0.1",
34
+ "@superdoc-dev/cli-linux-arm64": "1.0.1",
35
+ "@superdoc-dev/cli-windows-x64": "1.0.1"
36
+ },
11
37
  "scripts": {
12
38
  "dev": "bun run src/index.ts",
13
39
  "build": "bun build src/index.ts --outdir dist --target node --format esm",
14
- "test": "bun test",
40
+ "build:native": "bun build src/index.ts --compile --outfile dist/superdoc",
41
+ "build:native:all": "node scripts/build-native-cli.js --all",
42
+ "build:native:host": "node scripts/build-native-cli.js",
43
+ "build:stage": "node scripts/stage-artifacts.js",
44
+ "build:sync-version": "node scripts/sync-version.js",
45
+ "build:prepublish": "node scripts/build-and-stage.js",
46
+ "publish:platforms": "node scripts/publish.js --tag latest",
47
+ "publish:platforms:dry": "node scripts/publish.js --tag latest --dry-run",
48
+ "test": "NODE_ENV=test bun test",
15
49
  "lint": "eslint .",
16
50
  "lint:fix": "eslint --fix .",
17
51
  "format": "prettier --write .",
18
- "typecheck": "tsc --noEmit",
19
- "prepublishOnly": "pnpm run build",
52
+ "typecheck": "tsc --noEmit -p tsconfig.check.json",
20
53
  "release": "pnpx semantic-release",
21
54
  "release:dry-run": "pnpx semantic-release --dry-run"
22
- },
23
- "devDependencies": {
24
- "@types/bun": "catalog:",
25
- "@types/node": "catalog:",
26
- "fast-glob": "catalog:",
27
- "superdoc": "workspace:*",
28
- "typescript": "catalog:"
29
- },
30
- "module": "src/index.ts",
31
- "publishConfig": {
32
- "access": "public"
33
55
  }
34
- }
56
+ }
package/skill/SKILL.md ADDED
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: editing-docx
3
+ description: Searches, replaces, and reads text in Word documents. Use when the user asks to edit, search, or extract text from .docx files.
4
+ ---
5
+
6
+ # SuperDoc CLI
7
+
8
+ Edit Word documents from the command line. Use instead of python-docx.
9
+
10
+ ## Commands
11
+
12
+ | Command | Description |
13
+ |---------|-------------|
14
+ | `npx @superdoc-dev/cli@latest search <pattern> <files...>` | Find text across documents |
15
+ | `npx @superdoc-dev/cli@latest replace-legacy <find> <to> <files...>` | Find and replace text |
16
+ | `npx @superdoc-dev/cli@latest read <file>` | Extract plain text |
17
+
18
+ ## When to Use
19
+
20
+ Use superdoc when the user asks to:
21
+ - Search text in .docx files
22
+ - Find and replace text in Word documents
23
+ - Extract text content from .docx files
24
+ - Bulk edit multiple Word documents
25
+
26
+ ## Examples
27
+
28
+ ```bash
29
+ # Search across documents
30
+ npx @superdoc-dev/cli@latest search "indemnification" ./contracts/*.docx
31
+
32
+ # Find and replace
33
+ npx @superdoc-dev/cli@latest replace-legacy "ACME Corp" "Globex Inc" ./merger/*.docx
34
+
35
+ # Extract text
36
+ npx @superdoc-dev/cli@latest read ./proposal.docx
37
+
38
+ # JSON output for scripting
39
+ npx @superdoc-dev/cli@latest search "Article 7" ./**/*.docx --json
40
+ ```
41
+
42
+ ## Options
43
+
44
+ - `--json` — Machine-readable output
45
+ - `--help` — Show help