@certivu/cli 2.0.0 → 2.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.
- package/README.md +9 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,10 +18,11 @@ certivu --version
|
|
|
18
18
|
# Save your API key
|
|
19
19
|
certivu config set api-key ctv_key_...
|
|
20
20
|
certivu config set generator-id your-generator-id
|
|
21
|
-
certivu config set private-key BASE64_PRIVATE_KEY
|
|
22
21
|
|
|
23
|
-
# Sign a file
|
|
22
|
+
# Sign a file — images, audio, or text; format auto-detected
|
|
24
23
|
certivu sign ./output.jpg --model stable-diffusion-xl
|
|
24
|
+
certivu sign ./podcast.wav --model whisper-v3
|
|
25
|
+
certivu sign ./report.pdf --model gpt-4o --format text
|
|
25
26
|
|
|
26
27
|
# Verify a file
|
|
27
28
|
certivu verify ./output.jpg
|
|
@@ -34,20 +35,23 @@ certivu status ctv_7f3kx9mq2...
|
|
|
34
35
|
|
|
35
36
|
### `certivu sign <file>`
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
Sign AI-generated content. Signing, watermarking, and ML-DSA are all server-side — no private key required locally. Accepts images (JPEG/PNG/WebP), audio (MP3/FLAC/WAV), and text (PDF/HTML/plain text). Format is auto-detected from magic bytes; use `--format` to override.
|
|
38
39
|
|
|
39
40
|
```
|
|
40
41
|
certivu sign ./output.jpg --model stable-diffusion-xl
|
|
41
42
|
✓ Signed
|
|
42
43
|
Token ctv_7f3kx9mq2...
|
|
43
44
|
Record ID rec-00000000-...
|
|
45
|
+
Format image
|
|
46
|
+
Output ./output.signed.jpg
|
|
44
47
|
```
|
|
45
48
|
|
|
46
49
|
| Flag | Description |
|
|
47
50
|
|------|-------------|
|
|
48
51
|
| `--model <name>` | AI model name — required |
|
|
52
|
+
| `--format <type>` | `image`, `audio`, or `text` — auto-detected if omitted |
|
|
49
53
|
| `--generator-id <id>` | Override generator ID |
|
|
50
|
-
| `--
|
|
54
|
+
| `--output <path>` | Output file path (default: `<input>.signed.<ext>`) |
|
|
51
55
|
| `--api-key <key>` | Override API key |
|
|
52
56
|
|
|
53
57
|
### `certivu verify <file>`
|
|
@@ -78,11 +82,10 @@ Look up a token without re-uploading the file.
|
|
|
78
82
|
```bash
|
|
79
83
|
certivu config set api-key ctv_key_abc123
|
|
80
84
|
certivu config set generator-id <uuid>
|
|
81
|
-
certivu config set private-key <base64>
|
|
82
85
|
certivu config get
|
|
83
86
|
```
|
|
84
87
|
|
|
85
|
-
Config is stored at `~/.config/certivu/config.json`. Environment variables (`CERTIVU_API_KEY`, `CERTIVU_GENERATOR_ID`, `
|
|
88
|
+
Config is stored at `~/.config/certivu/config.json`. Environment variables (`CERTIVU_API_KEY`, `CERTIVU_GENERATOR_ID`, `CERTIVU_BASE_URL`) override the config file.
|
|
86
89
|
|
|
87
90
|
## Requirements
|
|
88
91
|
|
package/dist/index.js
CHANGED
|
@@ -328,7 +328,7 @@ async function signCommand(filePath, flags) {
|
|
|
328
328
|
const client = new CertivuClient(clientConfig);
|
|
329
329
|
let result;
|
|
330
330
|
try {
|
|
331
|
-
result = await client.sign({ content, model: flags.model, generatorId, format });
|
|
331
|
+
result = await client.sign({ content, model: flags.model, generatorId, ...format ? { format } : {} });
|
|
332
332
|
} catch (e) {
|
|
333
333
|
const msg = e instanceof Error ? e.message : String(e);
|
|
334
334
|
die(`Sign failed: ${msg}`);
|