Skip to content

Commit ec4d5ac

Browse files
committed
docs: refresh AGENTS and README
1 parent 825805c commit ec4d5ac

2 files changed

Lines changed: 18 additions & 15 deletions

File tree

AGENTS.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,11 @@ Binary: `"$REPO/target/release/langcodec"`
7474

7575
- `convert`: Convert localization files between formats (auto-detect by extension)
7676
- `edit set`: Add/update/remove entries in-place (or to `--output`)
77-
- `view`: Pretty-print entries, filter by `--lang`, optional `--check_plurals`
77+
- `diff`: Compare two localization files and report added/removed/changed keys
78+
- `sync`: Sync existing entries from a source file into a target file
79+
- `view`: Pretty-print entries, filter by `--lang`, optional `--check-plurals`
7880
- `merge`: Merge multiple inputs to one output with conflict strategy
81+
- `normalize`: Normalize files and optionally fail on drift with `--check`
7982
- `stats`: Coverage and per-status counts (text or `--json`)
8083
- `debug`: Read file and emit JSON (to stdout or `--output`)
8184
- `completions`: Generate shell completion scripts
@@ -123,9 +126,9 @@ Custom inputs (one-way into internal Resources via CLI):
123126
"$REPO/target/release/langcodec" convert \
124127
--input "/abs/path/translations.json" \
125128
--output "/abs/path/Localizable.xcstrings" \
126-
--input_format json-language-map \
127-
--output_format xcstrings \
128-
--source_language en \
129+
--input-format json-language-map \
130+
--output-format xcstrings \
131+
--source-language en \
129132
--version 1.0
130133
```
131134

@@ -157,7 +160,7 @@ Custom inputs (one-way into internal Resources via CLI):
157160
--lang en \
158161
--key welcome_message \
159162
--value "Hello" \
160-
--dry_run
163+
--dry-run
161164
```
162165

163166
- View entries (full values) and check plurals:
@@ -167,7 +170,7 @@ Custom inputs (one-way into internal Resources via CLI):
167170
--input "/abs/path/Localizable.xcstrings" \
168171
--lang en \
169172
--full \
170-
--check_plurals
173+
--check-plurals
171174
```
172175

173176
- Merge multiple files (quote globs to avoid shell-side expansion):
@@ -178,7 +181,7 @@ Custom inputs (one-way into internal Resources via CLI):
178181
--output "/abs/path/merged.xcstrings" \
179182
--strategy last \
180183
--lang en \
181-
--source_language en \
184+
--source-language en \
182185
--version 1.0
183186
```
184187

@@ -204,12 +207,12 @@ Custom inputs (one-way into internal Resources via CLI):
204207

205208
- `0`: success
206209
- `1`: validation or runtime failure (e.g., invalid inputs, unsupported format)
207-
- `2`: plural validation failed (when `view --check_plurals` is used)
210+
- `2`: plural validation failed (when `view --check-plurals` is used)
208211

209212
## Behavior notes for agents
210213

211214
- All commands are non-interactive. Always pass explicit absolute paths.
212-
- Input/output formats are inferred from file extensions unless `--input_format` / `--output_format` is provided.
215+
- Input/output formats are inferred from file extensions unless `--input-format` / `--output-format` is provided.
213216
- For single-language formats, pass `--lang` when required (e.g., ambiguous inputs).
214217
- Quote glob patterns provided to `merge --inputs` to avoid slow shell-side expansion.
215218

@@ -230,10 +233,10 @@ Builder pattern and direct `Codec` manipulation are also available; see `langcod
230233

231234
## Extension points (for contributors/agents)
232235

233-
- Add/modify formats: edit files under `langcodec/src/formats/` and wire into `formats/mod.rs`
236+
- Add/modify formats: edit files under `langcodec/src/formats/` and wire into `langcodec/src/formats.rs`
234237
- Implement parsing/writing: implement `Parser` in `langcodec/src/traits.rs`
235238
- Add CLI subcommands/options: edit `langcodec-cli/src/main.rs` and corresponding modules
236-
- Support new custom one-way formats: add a transformer under `langcodec-cli/src/transformers/` and register in `transformers/mod.rs` and `formats.rs`
239+
- Support new custom one-way formats: add a transformer under `langcodec-cli/src/transformers/` and register in `langcodec-cli/src/transformers.rs` and `langcodec-cli/src/formats.rs`
237240

238241
## Reproducible CI example
239242

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Universal localization toolkit: library + CLI for Apple/Android/CSV/TSV.
44

55
- Library crate (`langcodec`): parse, write, convert, merge with a unified model
6-
- CLI crate (`langcodec-cli`): convert, diff, merge, sync, view, stats, debug, edit, normalize
6+
- CLI crate (`langcodec-cli`): convert, diff, merge, sync, edit, normalize, view, stats, debug, completions
77

88
---
99

@@ -25,7 +25,7 @@ This is a `0.9.1` release available on [crates.io](https://crates.io/crates/lang
2525
- Parse, write, convert, merge: `.strings`, `.xcstrings`, `strings.xml`, CSV, TSV
2626
- Unified `Resource` model (`Translation::Singular|Plural`)
2727
- Plurals: `.xcstrings` and Android `<plurals>` supported
28-
- CLI helpers: convert, merge, view, stats (JSON or human-readable)
28+
- CLI helpers: convert, diff, merge, sync, edit, normalize, view, stats, debug, completions
2929

3030
---
3131

@@ -91,8 +91,8 @@ This is a `0.9.1` release available on [crates.io](https://crates.io/crates/lang
9191
#### Notes
9292

9393
- For CSV/TSV single-language files, the language code (`--lang`) may be required.
94-
- All commands support Apple `.strings`, `.xcstrings`, Android `strings.xml`, CSV, and TSV.
95-
- The convert command also supports custom JSON/YAML input formats.
94+
- All file-processing commands support Apple `.strings`, `.xcstrings`, Android `strings.xml`, CSV, and TSV.
95+
- The convert command also supports custom JSON/YAML and `.langcodec` input formats.
9696
- The CLI will error if you try to merge files of different formats.
9797
- Edit supports multiple inputs and glob patterns. When multiple inputs are provided, edits are applied in-place and `--output` is not allowed.
9898
- Normalize supports `.strings`, Android `strings.xml`, `.csv`, `.tsv`, and `.xcstrings`.

0 commit comments

Comments
 (0)