@superdoc-dev/cli 0.5.0-next.2 → 0.5.0-next.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.
Files changed (3) hide show
  1. package/README.md +21 -0
  2. package/dist/index.js +13953 -12095
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -41,6 +41,27 @@ superdoc save --in-place
41
41
  superdoc close
42
42
  ```
43
43
 
44
+ ## Encrypted Documents
45
+
46
+ Open password-protected `.docx` files with `--password` or the `SUPERDOC_DOC_PASSWORD` env var:
47
+
48
+ ```bash
49
+ # Explicit flag
50
+ superdoc open ./secret.docx --password 'mypassword'
51
+
52
+ # Env var (preferred — avoids password in process listings)
53
+ SUPERDOC_DOC_PASSWORD='mypassword' superdoc open ./secret.docx
54
+
55
+ # Via call
56
+ superdoc call doc.open --input-json '{"doc":"./secret.docx","password":"mypassword"}'
57
+ ```
58
+
59
+ If the password is missing or incorrect, the CLI returns a structured error with one of these codes:
60
+ - `DOCX_PASSWORD_REQUIRED` — encrypted file, no password supplied
61
+ - `DOCX_PASSWORD_INVALID` — wrong password
62
+ - `DOCX_ENCRYPTION_UNSUPPORTED` — recognized but unsupported encryption method
63
+ - `DOCX_DECRYPTION_FAILED` — crypto failure or corrupt data
64
+
44
65
  ## Choosing the Right Command
45
66
 
46
67
  ### Which command should I use?