sygal-cli 0.1.0
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/LICENSE +19 -0
- package/README.md +128 -0
- package/bin/sygal.js +2 -0
- package/dist/index.js +2858 -0
- package/package.json +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Sygal CLI License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cyrill Semah. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software is proprietary. You may install and use it, free of charge
|
|
6
|
+
during the trial period and under a valid Sygal license thereafter, for
|
|
7
|
+
personal or internal business purposes.
|
|
8
|
+
|
|
9
|
+
You may not copy, modify, reverse engineer, redistribute, sublicense or
|
|
10
|
+
sell this software or any part of it without prior written permission
|
|
11
|
+
from the author.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
14
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
15
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
16
|
+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY ARISING FROM THE USE OF THE SOFTWARE.
|
|
18
|
+
|
|
19
|
+
More information: https://sygal.app
|
package/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# Sygal CLI
|
|
4
|
+
|
|
5
|
+
Convertit fichiers, dossiers et pages web en Markdown / JSON, en local.
|
|
6
|
+
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<div align="center">
|
|
10
|
+
<a href="#français">Français</a> · <a href="#english">English</a>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Français
|
|
16
|
+
|
|
17
|
+
Le moteur de l'app desktop Sygal, en ligne de commande : pipeline local
|
|
18
|
+
MarkItDown (aucun document envoyé sur le réseau), OCR API pour les images,
|
|
19
|
+
pensé pour les humains ET pour les agents IA (sortie `--json` stricte,
|
|
20
|
+
mode OCR différé).
|
|
21
|
+
|
|
22
|
+
### Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g sygal-cli
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Le moteur de conversion natif (macOS Apple Silicon, Windows x64) est installé
|
|
29
|
+
automatiquement. Essai gratuit 14 jours, puis licence LemonSqueezy
|
|
30
|
+
(https://sygal.lemonsqueezy.com) - un poste par activation, pool partagé avec
|
|
31
|
+
l'app desktop.
|
|
32
|
+
|
|
33
|
+
### Conversion
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
sygal convert rapport.pdf # rapport.pdf.md à côté de la source
|
|
37
|
+
sygal convert dossier/ --format both -o ./sorties # récursif, .md + .json
|
|
38
|
+
sygal convert https://example.com/article # page web → markdown
|
|
39
|
+
sygal convert scan.pdf --pdf-ocr all # PDF scanné, OCR page par page
|
|
40
|
+
sygal convert doc.docx --advanced # OCR des images embarquées
|
|
41
|
+
sygal convert note.txt --translate en # traduction du résultat
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- Routage automatique par type de fichier : images → OCR API, tout le reste →
|
|
45
|
+
MarkItDown 100% local (27 extensions : pdf, docx, xlsx, pptx, xls, html,
|
|
46
|
+
csv, txt, md, json, xml, epub, msg, eml, ipynb, zip, png, jpg, gif, webp,
|
|
47
|
+
tiff, heic...).
|
|
48
|
+
- Sortie par défaut : dossier source de chaque fichier, collisions gérées
|
|
49
|
+
(`nom.md` → `nom (1).md`). Enveloppe JSON identique à l'export de l'app.
|
|
50
|
+
- Garde-fou de coût : `--max-ocr-calls N` (ou `sygal config set-max-ocr-calls`).
|
|
51
|
+
|
|
52
|
+
### Configuration OCR
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
sygal config set-ocr-provider openai # openai | mistral | claude | nvidia | gemini
|
|
56
|
+
sygal config set-api-key openai # clé lue sur stdin, chiffrée (liée à la machine)
|
|
57
|
+
sygal config show # présence des clés, jamais leur valeur
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Variables d'environnement : `SYGAL_OCR_PROVIDER`, `SYGAL_OCR_API_KEY`,
|
|
61
|
+
`SYGAL_LICENSE_KEY` (activation auto), `SYGAL_SIDECAR_PATH`, `SYGAL_CONFIG_PATH`.
|
|
62
|
+
|
|
63
|
+
### Pour les agents IA (Hermes, OpenClaw...)
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Sortie strictement machine, codes d'erreur stables, exit 1 si échec
|
|
67
|
+
sygal convert dossier/ --json
|
|
68
|
+
|
|
69
|
+
# OCR différé : AUCUN appel API - l'agent transcrit lui-même
|
|
70
|
+
sygal convert doc.docx --advanced --ocr defer --json
|
|
71
|
+
# → images extraites dans doc.docx.images/, marqueurs ![sygal:ocr:N] dans le .md,
|
|
72
|
+
# liste "deferred" dans le JSON (index, chemin, page)
|
|
73
|
+
sygal inject doc.docx.md --transcripts transcriptions.json
|
|
74
|
+
# → réintègre chaque transcription à sa position exacte
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Codes d'erreur (`--json`) : `unsupported_format`, `api_key_missing`,
|
|
78
|
+
`invalid_api_key`, `rate_limited`, `network_error`, `scanned_pdf_detected`,
|
|
79
|
+
`ocr_call_limit_exceeded`, `license_expired`, `sidecar_down`, `timeout`...
|
|
80
|
+
|
|
81
|
+
### Licence et mise à jour
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
sygal license activate <clé> # active (un poste)
|
|
85
|
+
sygal license status # essai / active / expirée
|
|
86
|
+
sygal license deactivate # libère le poste
|
|
87
|
+
sygal update # met à jour via npm (--check : vérifier seulement)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## English
|
|
93
|
+
|
|
94
|
+
The Sygal desktop engine as a CLI: local MarkItDown pipeline (documents never
|
|
95
|
+
leave your machine), API OCR for images, built for humans AND AI agents
|
|
96
|
+
(strict `--json` output, deferred OCR mode).
|
|
97
|
+
|
|
98
|
+
### Install
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npm install -g sygal-cli
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Native conversion engine (macOS Apple Silicon, Windows x64) installs
|
|
105
|
+
automatically. 14-day free trial, then a LemonSqueezy license
|
|
106
|
+
(https://sygal.lemonsqueezy.com) - one seat per activation, shared with the
|
|
107
|
+
desktop app.
|
|
108
|
+
|
|
109
|
+
### Usage
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
sygal convert report.pdf # report.pdf.md next to the source
|
|
113
|
+
sygal convert folder/ --format both # recursive, .md + .json
|
|
114
|
+
sygal convert https://example.com --json
|
|
115
|
+
sygal convert scan.pdf --pdf-ocr all # scanned PDF, per-page OCR
|
|
116
|
+
sygal convert doc.docx --advanced --ocr defer --json # agent-side OCR
|
|
117
|
+
sygal inject doc.docx.md --transcripts t.json
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Configuration: `sygal config set-ocr-provider`, `sygal config set-api-key`
|
|
121
|
+
(read from stdin, encrypted at rest with a machine-bound key). License:
|
|
122
|
+
`sygal license activate/status/deactivate`. Updates: `sygal update`.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
<div align="center">
|
|
127
|
+
© 2026 Cyrill Semah. All rights reserved.
|
|
128
|
+
</div>
|
package/bin/sygal.js
ADDED