prompsit-cli 26.311.2245 → 26.314.1453
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 +191 -21
- package/README.md +140 -199
- package/assets/skills/README.md +33 -0
- package/assets/skills/prompsit-annotate/SKILL.md +55 -0
- package/assets/skills/prompsit-evaluate/SKILL.md +60 -0
- package/assets/skills/prompsit-score/SKILL.md +62 -0
- package/assets/skills/prompsit-setup/SKILL.md +146 -0
- package/assets/skills/prompsit-translate/SKILL.md +65 -0
- package/dist/api/auth-session.js +2 -2
- package/dist/api/auth-session.js.map +1 -1
- package/dist/api/errors.d.ts.map +1 -1
- package/dist/api/errors.js +13 -10
- package/dist/api/errors.js.map +1 -1
- package/dist/api/models.d.ts +19 -5
- package/dist/api/models.d.ts.map +1 -1
- package/dist/api/models.js +13 -5
- package/dist/api/models.js.map +1 -1
- package/dist/api/sse-models.d.ts +1 -1
- package/dist/api/sse-models.d.ts.map +1 -1
- package/dist/api/sse-models.js +4 -1
- package/dist/api/sse-models.js.map +1 -1
- package/dist/cli/prompts.d.ts +15 -0
- package/dist/cli/prompts.d.ts.map +1 -1
- package/dist/cli/prompts.js +89 -0
- package/dist/cli/prompts.js.map +1 -1
- package/dist/cli/skill-sync.d.ts +13 -0
- package/dist/cli/skill-sync.d.ts.map +1 -0
- package/dist/cli/skill-sync.js +234 -0
- package/dist/cli/skill-sync.js.map +1 -0
- package/dist/commands/config/command.d.ts.map +1 -1
- package/dist/commands/config/command.js +2 -1
- package/dist/commands/config/command.js.map +1 -1
- package/dist/commands/config/language.d.ts.map +1 -1
- package/dist/commands/config/language.js +3 -2
- package/dist/commands/config/language.js.map +1 -1
- package/dist/commands/error-handler.js +2 -2
- package/dist/commands/error-handler.js.map +1 -1
- package/dist/commands/error-presenter.d.ts.map +1 -1
- package/dist/commands/error-presenter.js +9 -1
- package/dist/commands/error-presenter.js.map +1 -1
- package/dist/commands/job-tracking.js +1 -1
- package/dist/commands/job-tracking.js.map +1 -1
- package/dist/commands/mappers.d.ts.map +1 -1
- package/dist/commands/mappers.js +4 -0
- package/dist/commands/mappers.js.map +1 -1
- package/dist/config/schemas.d.ts +2 -0
- package/dist/config/schemas.d.ts.map +1 -1
- package/dist/config/schemas.js +1 -0
- package/dist/config/schemas.js.map +1 -1
- package/dist/config/settings.js +1 -1
- package/dist/config/settings.js.map +1 -1
- package/dist/config/toml-io.d.ts.map +1 -1
- package/dist/config/toml-io.js +18 -5
- package/dist/config/toml-io.js.map +1 -1
- package/dist/errors/catalog.js +4 -4
- package/dist/errors/catalog.js.map +1 -1
- package/dist/errors/contracts.d.ts +2 -0
- package/dist/errors/contracts.d.ts.map +1 -1
- package/dist/errors/contracts.js +18 -0
- package/dist/errors/contracts.js.map +1 -1
- package/dist/i18n/catalog.d.ts +4 -6
- package/dist/i18n/catalog.d.ts.map +1 -1
- package/dist/i18n/catalog.js +4 -6
- package/dist/i18n/catalog.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/logging/external-transport.d.ts.map +1 -1
- package/dist/logging/external-transport.js +2 -1
- package/dist/logging/external-transport.js.map +1 -1
- package/dist/output/terminal.js +1 -1
- package/dist/output/terminal.js.map +1 -1
- package/dist/output/usage-display.d.ts +6 -5
- package/dist/output/usage-display.d.ts.map +1 -1
- package/dist/output/usage-display.js +42 -33
- package/dist/output/usage-display.js.map +1 -1
- package/dist/output/view-models.d.ts +4 -0
- package/dist/output/view-models.d.ts.map +1 -1
- package/dist/repl/controller.d.ts.map +1 -1
- package/dist/repl/controller.js +8 -7
- package/dist/repl/controller.js.map +1 -1
- package/dist/repl/input/autocomplete-provider.d.ts +4 -0
- package/dist/repl/input/autocomplete-provider.d.ts.map +1 -1
- package/dist/repl/input/autocomplete-provider.js +7 -3
- package/dist/repl/input/autocomplete-provider.js.map +1 -1
- package/dist/repl/loop.d.ts.map +1 -1
- package/dist/repl/loop.js +6 -3
- package/dist/repl/loop.js.map +1 -1
- package/dist/repl/service.d.ts.map +1 -1
- package/dist/repl/service.js +2 -1
- package/dist/repl/service.js.map +1 -1
- package/dist/runtime/execution-mode.d.ts +6 -0
- package/dist/runtime/execution-mode.d.ts.map +1 -0
- package/dist/runtime/execution-mode.js +17 -0
- package/dist/runtime/execution-mode.js.map +1 -0
- package/dist/runtime/format-extensions.d.ts.map +1 -1
- package/dist/runtime/format-extensions.js +2 -1
- package/dist/runtime/format-extensions.js.map +1 -1
- package/dist/runtime/update-check.d.ts.map +1 -1
- package/dist/runtime/update-check.js +2 -1
- package/dist/runtime/update-check.js.map +1 -1
- package/dist/tui/settings-screen.d.ts.map +1 -1
- package/dist/tui/settings-screen.js +38 -8
- package/dist/tui/settings-screen.js.map +1 -1
- package/package.json +20 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,191 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2025-2026 Prompsit Language Engineering, S.L.
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -4,277 +4,218 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/prompsit-cli)
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
6
|
|
|
7
|
-
CLI for the Prompsit Translation API. Translate text and documents, evaluate quality, score parallel corpora, and annotate monolingual data.
|
|
7
|
+
One CLI for the entire Prompsit Translation API. Translate text and documents, evaluate translation quality, score parallel corpora with Bicleaner-AI, and annotate monolingual data with Monotextor — from your terminal or an interactive REPL.
|
|
8
8
|
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
[Node.js](https://nodejs.org/) 22+
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
node -v # Should print v22.x or higher
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Install
|
|
9
|
+
## Quick Start
|
|
18
10
|
|
|
19
11
|
```bash
|
|
20
12
|
npm install -g prompsit-cli
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
**Update:** `npm install -g prompsit-cli@latest --prefer-online`
|
|
24
|
-
**Uninstall:** `npm uninstall -g prompsit-cli`
|
|
25
|
-
|
|
26
|
-
<details>
|
|
27
|
-
<summary>Command not found after install?</summary>
|
|
28
13
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
14
|
+
prompsit login -a "EMAIL" -s "SECRET"
|
|
15
|
+
prompsit translate "Hello world" -s "en" -t "es"
|
|
16
|
+
prompsit translate @"report.docx" -s "en" -t "es"
|
|
17
|
+
prompsit # Interactive REPL
|
|
33
18
|
```
|
|
34
19
|
|
|
35
|
-
|
|
20
|
+
> [!TIP]
|
|
21
|
+
> Run `prompsit` with no arguments to enter the **interactive REPL** with tab completion, command history, and bundled example files in `~/.prompsit/examples/`.
|
|
36
22
|
|
|
37
|
-
|
|
23
|
+
**Update:** `npm install -g prompsit-cli@latest`
|
|
24
|
+
**Uninstall:** `npm uninstall -g prompsit-cli`
|
|
38
25
|
|
|
39
|
-
|
|
26
|
+
---
|
|
40
27
|
|
|
41
|
-
|
|
42
|
-
prompsit # Enter interactive REPL
|
|
43
|
-
prompsit translate "Hello" -s "en" -t "es" # Run single command
|
|
44
|
-
```
|
|
28
|
+
## Features
|
|
45
29
|
|
|
46
|
-
|
|
30
|
+
| Feature | Description | Example |
|
|
31
|
+
|---------|-------------|---------|
|
|
32
|
+
| **Translate text** | Translate one or more segments with optional quality estimation | `translate "Hello" -s "en" -t "es" --qe` |
|
|
33
|
+
| **Translate files** | Translate documents with SSE progress tracking | `translate @"report.pdf" -s "en" -t "es"` |
|
|
34
|
+
| **Evaluate** | Measure translation quality (BLEU, chrF, MetricX, COMET) | `eval -s "Hello" -h "Hola" -r "Hola"` |
|
|
35
|
+
| **Score** | Score parallel corpora with Bicleaner-AI | `score @"corpus.tmx"` |
|
|
36
|
+
| **Annotate** | Add metadata to monolingual data (LID, PII, dedup, etc.) | `annotate @"data.jsonl" -l "en"` |
|
|
37
|
+
| **Engines** | List available translation engines by language pair | `engines -s "en" -t "es"` |
|
|
47
38
|
|
|
48
|
-
|
|
39
|
+
Supports XLIFF, CSV, PDF, DOCX, TMX, TSV, TXT, JSONL, and more. Run `prompsit translate --formats` for the full list.
|
|
49
40
|
|
|
50
|
-
|
|
41
|
+
---
|
|
51
42
|
|
|
52
|
-
|
|
43
|
+
## Commands
|
|
53
44
|
|
|
54
|
-
|
|
45
|
+
> [!IMPORTANT]
|
|
46
|
+
> **Quoting rule:** all values must be quoted. Commands, subcommands, and flags stay unquoted.
|
|
47
|
+
> Run `prompsit <command> --help` for the full flag reference.
|
|
55
48
|
|
|
56
|
-
|
|
57
|
-
- `-s, --secret "SECRET"` API secret
|
|
49
|
+
### Authentication
|
|
58
50
|
|
|
51
|
+
```bash
|
|
52
|
+
prompsit login -a "EMAIL" -s "SECRET" # Authenticate
|
|
53
|
+
prompsit login # Open contact page (no credentials)
|
|
54
|
+
prompsit logout # Clear stored credentials
|
|
55
|
+
prompsit status # Show auth state and token expiry
|
|
59
56
|
```
|
|
60
|
-
$ prompsit login # Open contact page
|
|
61
|
-
$ prompsit login -a "EMAIL" -s "SECRET" # Login with credentials
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
#### `logout`
|
|
65
57
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
#### `status`
|
|
69
|
-
|
|
70
|
-
Show auth state, plan type, and token expiry.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
### Configuration
|
|
75
|
-
|
|
76
|
-
#### `config` [subcommand|key] [value]
|
|
77
|
-
|
|
78
|
-
Interactive TUI settings screen, or manage config via subcommands.
|
|
58
|
+
### Translation
|
|
79
59
|
|
|
80
|
-
|
|
60
|
+
```bash
|
|
61
|
+
# Text mode
|
|
62
|
+
prompsit translate "Hello world" -s "en" -t "es"
|
|
63
|
+
prompsit translate "Hello" "Good morning" -s "en" -t "es" --qe
|
|
81
64
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
- `config api-url ["preset_or_url"]` Switch API endpoint
|
|
86
|
-
- `config reset [--force]` Reset to defaults
|
|
87
|
-
- `config path` Show config file path
|
|
65
|
+
# File mode (@ prefix)
|
|
66
|
+
prompsit translate @"report.pdf" -s "en" -t "es" --output-format "docx"
|
|
67
|
+
prompsit translate @"file1.csv" @"file2.csv" -s "en" -t "es" --out "./translated/"
|
|
88
68
|
|
|
69
|
+
# Discovery
|
|
70
|
+
prompsit translate --languages -s "en"
|
|
71
|
+
prompsit translate --formats
|
|
89
72
|
```
|
|
90
|
-
> config show
|
|
91
|
-
> config "api-base-url"
|
|
92
|
-
> config "api-base-url" "https://my-server.com"
|
|
93
|
-
> config api-url "test"
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
#### `language` [code]
|
|
97
73
|
|
|
98
|
-
|
|
74
|
+
### Evaluation
|
|
99
75
|
|
|
76
|
+
```bash
|
|
77
|
+
prompsit eval -s "Hello" -h "Hola" -r "Hola" # Inline
|
|
78
|
+
prompsit eval -s "Hello" -h "Hola" -r "Hola" -m "bleu,metricx" # Custom metrics
|
|
79
|
+
prompsit eval "segments.tsv" -m "bleu,chrf" # Batch from TSV
|
|
80
|
+
prompsit eval @"report.txt" -s "en" -t "es" # File scoring
|
|
100
81
|
```
|
|
101
|
-
> language "es"
|
|
102
|
-
$ prompsit language "en"
|
|
103
|
-
$ prompsit config language
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
---
|
|
107
82
|
|
|
108
|
-
###
|
|
109
|
-
|
|
110
|
-
#### `translate` "text" --source "lang" --target "lang" [--qe]
|
|
111
|
-
|
|
112
|
-
Translate text. Aliases: `t`
|
|
83
|
+
### Data Processing
|
|
113
84
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
85
|
+
```bash
|
|
86
|
+
prompsit score @"corpus.tmx" # Bicleaner-AI scoring
|
|
87
|
+
prompsit score "corpus.tsv" --output-format "tsv" --out "results/"
|
|
117
88
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
> t "Hello" -s "en" -t "es" --qe
|
|
122
|
-
$ prompsit translate "Hello world" -s "en" -t "es"
|
|
123
|
-
$ prompsit translate "Hello" "Good morning" "Thank you" -s "en" -t "es"
|
|
89
|
+
prompsit annotate @"data.jsonl" -l "en" --metadata "lid,docscorer" # Monotextor annotation
|
|
90
|
+
prompsit annotate @"data.jsonl" -l "en" --out "results/"
|
|
91
|
+
prompsit annotate --metadata # List available metadata
|
|
124
92
|
```
|
|
125
93
|
|
|
126
|
-
|
|
94
|
+
### Configuration
|
|
127
95
|
|
|
128
|
-
|
|
96
|
+
```bash
|
|
97
|
+
prompsit config # Open interactive TUI settings screen
|
|
98
|
+
prompsit config show # Show current configuration
|
|
99
|
+
prompsit config "api-base-url" # Get a value
|
|
100
|
+
prompsit config "api-base-url" "URL" # Set a value
|
|
101
|
+
prompsit config api-url "test" # Switch API endpoint preset
|
|
102
|
+
prompsit language "es" # Set interface language
|
|
103
|
+
```
|
|
129
104
|
|
|
130
|
-
|
|
131
|
-
- `-t, --target "lang"` Target language code
|
|
132
|
-
- `--out "dir"` Output directory (default: beside input file)
|
|
133
|
-
- `--output-format "fmt"` Output format (e.g. docx)
|
|
105
|
+
### System
|
|
134
106
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
$ prompsit translate @"report.pdf" -s "en" -t "es" --output-format "docx"
|
|
143
|
-
$ prompsit translate @"manual.md" @"notes.md" -s "en" -t "es" --output-format "docx"
|
|
144
|
-
```
|
|
107
|
+
| Command | Description |
|
|
108
|
+
|---------|-------------|
|
|
109
|
+
| `health` | API health check |
|
|
110
|
+
| `usage` | Show plan usage and quotas |
|
|
111
|
+
| `help` | Show all commands (also: `?`) |
|
|
112
|
+
| `clear` | Clear screen |
|
|
113
|
+
| `exit` | Quit REPL (also: `quit`, `q`) |
|
|
145
114
|
|
|
146
115
|
---
|
|
147
116
|
|
|
148
|
-
|
|
117
|
+
## FAQ
|
|
149
118
|
|
|
150
|
-
|
|
119
|
+
<details>
|
|
120
|
+
<summary><b>How do I get API credentials?</b></summary>
|
|
151
121
|
|
|
152
|
-
|
|
122
|
+
Run `prompsit login` without arguments to open the contact page. You'll receive an account email and API secret from Prompsit.
|
|
153
123
|
|
|
154
|
-
|
|
155
|
-
- `-t, --target "lang"` Filter by target language
|
|
124
|
+
</details>
|
|
156
125
|
|
|
157
|
-
|
|
158
|
-
>
|
|
159
|
-
> engines -s "en" -t "es"
|
|
160
|
-
$ prompsit engines
|
|
161
|
-
$ prompsit engines -s "en" -t "es"
|
|
162
|
-
```
|
|
126
|
+
<details>
|
|
127
|
+
<summary><b>REPL or CLI — which should I use?</b></summary>
|
|
163
128
|
|
|
164
|
-
|
|
129
|
+
**REPL** (`prompsit` with no args) — for interactive exploration. Tab completion, persistent command history, bundled examples in `~/.prompsit/examples/`, and a settings TUI (`config`).
|
|
165
130
|
|
|
166
|
-
|
|
131
|
+
**CLI** (`prompsit <command>`) — for scripts, pipelines, and one-off commands. Same commands, same flags.
|
|
167
132
|
|
|
168
|
-
|
|
133
|
+
</details>
|
|
169
134
|
|
|
170
|
-
|
|
135
|
+
<details>
|
|
136
|
+
<summary><b>What file formats are supported?</b></summary>
|
|
171
137
|
|
|
172
|
-
|
|
173
|
-
- `-h, --hypothesis "hyp"` Machine translation (hypothesis)
|
|
174
|
-
- `-r, --reference "ref"` Reference translation
|
|
175
|
-
- `-m, --metrics "metrics"` Comma-separated: bleu,chrf,metricx (default: bleu,chrf)
|
|
138
|
+
XLIFF, CSV, PDF, DOCX, TMX, TSV, TXT, JSONL, and others. Run `prompsit translate --formats` for the complete list. Use `--output-format` to convert between formats (e.g., PDF to DOCX).
|
|
176
139
|
|
|
177
|
-
|
|
140
|
+
</details>
|
|
178
141
|
|
|
179
|
-
|
|
142
|
+
<details>
|
|
143
|
+
<summary><b>How does configuration work?</b></summary>
|
|
180
144
|
|
|
181
|
-
|
|
145
|
+
Three-level precedence: **environment variables** (`PROMPSIT_API__BASE_URL`) > **config file** (`~/.prompsit/config.toml`) > **defaults**. Use `config show` to see active values. See [runbook](docs/project/runbook.md) for details.
|
|
182
146
|
|
|
183
|
-
|
|
147
|
+
</details>
|
|
184
148
|
|
|
185
|
-
|
|
186
|
-
>
|
|
187
|
-
> eval -s "Hello" -h "Hola" -r "Hola" -m "bleu,chrf,metricx"
|
|
188
|
-
> eval "segments.tsv" -m "bleu,chrf"
|
|
189
|
-
> eval @"report.txt" -s "en" -t "es"
|
|
190
|
-
$ prompsit eval -s "Hello" -h "Hola" -r "Hola"
|
|
191
|
-
$ prompsit eval -s "Hello" -h "Hola" -r "Hola" -m "bleu,chrf,metricx"
|
|
192
|
-
```
|
|
149
|
+
<details>
|
|
150
|
+
<summary><b>How do I change the interface language?</b></summary>
|
|
193
151
|
|
|
194
|
-
|
|
152
|
+
```bash
|
|
153
|
+
prompsit language "es" # CLI
|
|
154
|
+
> language "es" # REPL
|
|
155
|
+
```
|
|
195
156
|
|
|
196
|
-
|
|
157
|
+
Translations are fetched from the API on first use and cached in `~/.prompsit/translations/`.
|
|
197
158
|
|
|
198
|
-
|
|
159
|
+
</details>
|
|
199
160
|
|
|
200
|
-
|
|
161
|
+
<details>
|
|
162
|
+
<summary><b>Command not found after install?</b></summary>
|
|
201
163
|
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
164
|
+
```bash
|
|
165
|
+
# Check global npm bin is on PATH
|
|
166
|
+
echo "$PATH" | tr ':' '\n' | grep '.npm-global/bin'
|
|
167
|
+
command -v prompsit
|
|
206
168
|
```
|
|
207
169
|
|
|
208
|
-
|
|
170
|
+
</details>
|
|
209
171
|
|
|
210
|
-
|
|
172
|
+
<details>
|
|
173
|
+
<summary><b>Something is broken — where do I start?</b></summary>
|
|
211
174
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
175
|
+
1. `prompsit health` — verify API connectivity
|
|
176
|
+
2. `prompsit status` — check authentication state
|
|
177
|
+
3. `prompsit config show` — review active configuration
|
|
178
|
+
4. See the [runbook](docs/project/runbook.md) for common errors and fixes
|
|
215
179
|
|
|
216
|
-
|
|
217
|
-
> annotate @"data.jsonl" -l "en" --metadata "lid,docscorer"
|
|
218
|
-
> annotate @"data.jsonl" -l "en" --out "results/"
|
|
219
|
-
> annotate --metadata
|
|
220
|
-
$ prompsit annotate @"data.jsonl" -l "en" --metadata "lid,docscorer" --out "results/"
|
|
221
|
-
$ prompsit annotate --metadata
|
|
222
|
-
```
|
|
180
|
+
</details>
|
|
223
181
|
|
|
224
182
|
---
|
|
225
183
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
#### `formats`
|
|
229
|
-
|
|
230
|
-
List supported file formats. Alias: `f`
|
|
184
|
+
## Project Structure
|
|
231
185
|
|
|
232
186
|
```
|
|
233
|
-
|
|
234
|
-
|
|
187
|
+
src/
|
|
188
|
+
├── index.ts # Entry point
|
|
189
|
+
├── program.ts # Commander.js program definition
|
|
190
|
+
├── commands/ # CLI command handlers
|
|
191
|
+
├── api/ # HTTP client (got) + Zod models + SSE
|
|
192
|
+
├── config/ # Settings (Zod + smol-toml + env vars)
|
|
193
|
+
├── repl/ # Interactive REPL (pi-tui)
|
|
194
|
+
├── tui/ # TUI settings screen
|
|
195
|
+
├── output/ # Terminal formatting (chalk + cli-table3)
|
|
196
|
+
├── i18n/ # Internationalization
|
|
197
|
+
├── errors/ # Error contracts
|
|
198
|
+
├── cli/ # Global options, exit codes
|
|
199
|
+
├── runtime/ # Platform abstractions
|
|
200
|
+
└── logging/ # Telemetry transport
|
|
235
201
|
```
|
|
236
202
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
### System
|
|
240
|
-
|
|
241
|
-
| Command | Description |
|
|
242
|
-
|---------|-------------|
|
|
243
|
-
| `health` | API health check |
|
|
244
|
-
| `help` | Show all commands (also: `?`) |
|
|
245
|
-
| `clear` | Clear screen |
|
|
246
|
-
| `exit` | Quit CLI (also: `quit`, `q`) |
|
|
203
|
+
> [!TIP]
|
|
204
|
+
> **For AI agents:** entry point is `src/index.ts` -> `src/program.ts`. Commands in `src/commands/`, REPL in `src/repl/`, config in `src/config/`. TypeScript strict, ESM-only, layered architecture (Presentation -> Application -> Domain -> Infrastructure). Full docs: [architecture.md](docs/project/architecture.md), [CLAUDE.md](CLAUDE.md).
|
|
247
205
|
|
|
248
206
|
---
|
|
249
207
|
|
|
250
|
-
##
|
|
251
|
-
|
|
252
|
-
Config file: `~/.prompsit/config.toml` | Env override: `PROMPSIT_<SECTION>__<KEY>`
|
|
253
|
-
|
|
254
|
-
| Key | CLI Command | Default | Description |
|
|
255
|
-
|-----|-------------|---------|-------------|
|
|
256
|
-
| `api.base_url` | `config api-url` | `https://edge.prompsit.com` | API endpoint |
|
|
257
|
-
| `api.timeout` | - | `30` | HTTP read timeout (sec) |
|
|
258
|
-
| `cli.language` | `language "code"` | `en` | Interface language |
|
|
259
|
-
| `cli.log_level` | `config set log-level "val"` | `INFO` | Log level |
|
|
260
|
-
|
|
261
|
-
## Data Directory: `~/.prompsit/`
|
|
262
|
-
|
|
263
|
-
| Path | Purpose |
|
|
264
|
-
|------|---------|
|
|
265
|
-
| `config.toml` | User configuration (TOML) |
|
|
266
|
-
| `credentials.json` | OAuth2 tokens |
|
|
267
|
-
| `history` | REPL command history |
|
|
268
|
-
| `translations/{lang}.json` | Interface translation cache |
|
|
269
|
-
| `examples/translate/` | Translation examples (txt, csv, xliff) |
|
|
270
|
-
| `examples/evaluate/` | Evaluation examples (tmx) |
|
|
271
|
-
| `examples/score/` | Scoring examples (tmx) |
|
|
272
|
-
| `examples/annotate/` | Annotation examples (jsonl) |
|
|
273
|
-
|
|
274
|
-
## Troubleshooting
|
|
208
|
+
## Links
|
|
275
209
|
|
|
276
|
-
|
|
210
|
+
| | |
|
|
211
|
+
|---|---|
|
|
212
|
+
| **Documentation** | [docs/README.md](docs/README.md) |
|
|
213
|
+
| **Architecture** | [docs/project/architecture.md](docs/project/architecture.md) |
|
|
214
|
+
| **Runbook** | [docs/project/runbook.md](docs/project/runbook.md) |
|
|
215
|
+
| **Contributing** | [CONTRIBUTING.md](CONTRIBUTING.md) |
|
|
216
|
+
| **Issues** | [GitHub Issues](https://github.com/Prompsit/prompsit-cli/issues) |
|
|
217
|
+
| **npm** | [prompsit-cli](https://www.npmjs.com/package/prompsit-cli) |
|
|
277
218
|
|
|
278
219
|
## License
|
|
279
220
|
|
|
280
|
-
|
|
221
|
+
Apache-2.0 — [Prompsit Language Engineering, S.L.](https://www.prompsit.com/)
|