@kopynator/cli 1.0.0 → 1.0.5

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 ADDED
@@ -0,0 +1,53 @@
1
+ # @kopynator/cli
2
+
3
+ The official Command Line Interface for [Kopynator](https://kopynator.com).
4
+ Manage your internationalization workflow directly from your terminal.
5
+
6
+ ## Installation
7
+
8
+ You don't need to install it globally! We recommend using `npx` for the latest version:
9
+
10
+ ```bash
11
+ npx -y @kopynator/cli <command>
12
+ ```
13
+
14
+ If you prefer a global installation:
15
+
16
+ ```bash
17
+ npm install -g @kopynator/cli
18
+ ```
19
+
20
+ ## Commands
21
+
22
+ ### 1. Initialize
23
+ Sets up Kopynator in your project. Creates the configuration file and guides you verify the setup.
24
+
25
+ ```bash
26
+ npx -y @kopynator/cli init
27
+ ```
28
+
29
+ ### 2. Check / Validate
30
+ Validates your local JSON translation files for syntax errors. Useful for CI/CD pipelines.
31
+
32
+ ```bash
33
+ npx -y @kopynator/cli check
34
+ ```
35
+
36
+ ### 3. Sync (Premium)
37
+ Synchronizes your local keys with the Kopynator Cloud. Uploads new keys and downloads approved translations.
38
+
39
+ ```bash
40
+ npx -y @kopynator/cli sync
41
+ ```
42
+
43
+ ## Configuration
44
+ The `init` command creates a `kopynator.config.json` file in your root:
45
+
46
+ ```json
47
+ {
48
+ "apiKey": "YOUR_API_KEY",
49
+ "defaultLocale": "en",
50
+ "languages": ["en", "es"],
51
+ "mode": "local"
52
+ }
53
+ ```
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@kopynator/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.5",
4
4
  "description": "CLI tool for Kopynator - The i18n management solution",
5
5
  "bin": {
6
- "kopynator": "./dist/index.js"
6
+ "kopynator": "dist/index.js"
7
7
  },
8
8
  "main": "./dist/index.js",
9
9
  "scripts": {
@@ -0,0 +1,3 @@
1
+ export * from './init';
2
+ export * from './check';
3
+ export * from './sync';
package/src/index.ts CHANGED
@@ -1,9 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
3
  import chalk from 'chalk';
4
- import { initCommand } from './commands/init';
5
- import { checkCommand } from './commands/check';
6
- import { syncCommand } from './commands/sync';
4
+ import { initCommand, checkCommand, syncCommand } from './commands';
7
5
 
8
6
  const program = new Command();
9
7