Sign In

@sonenta/cli

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sonenta/cli - npm Package Compare versions

Comparing version
0.48.4
to
0.49.0
+1
-1
package.json
{
"name": "@sonenta/cli",
"version": "0.48.4",
"version": "0.49.0",
"description": "Command-line interface for Sonenta translation management.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -83,2 +83,3 @@ # @sonenta/cli

| `missing` | List runtime-detected missing keys |
| `a11y scan` | Read your source, infer each key's semantic type from how it is USED, and set it (`type_source=detected`) |
| `agents list` | List the bundled Claude agents available to install |

@@ -91,2 +92,40 @@ | `agents add <name>`| Write a bundled agent into `.claude/agents/<name>.md` + auto-wire `.mcp.json` + run a preflight |

### `sonenta a11y scan`
Every key carries a semantic `type` (one of 17: `button`, `link`, `image`,
`heading`, `input_placeholder`, …). That type decides which accessibility
treatments the key offers, so a project where everything is still the default
`text` reports a false a11y coverage on every screen.
Nothing in the string itself can tell a button label from a paragraph. Only the
code can, so this reads it:
```bash
sonenta a11y scan --dry-run # show what it would classify, write nothing
sonenta a11y scan # set the types, record the scan
sonenta a11y scan --offline # code-side report only, no API call at all
```
It parses your i18n usage sites (`t('key')`, `$t`, `<Trans>`, `data-i18n`, in
`.tsx/.jsx/.vue/.svelte/.astro/.html`), reads the markup around each one, and
infers the type: a call inside `<button>` is a `button`, an `alt=` is an
`image`, a `<nav>` list item is a `menu_item`, `toast.success(t(…))` is a
`toast`. Then it sets the types with **`type_source=detected`** and records the
scan (`keys_scanned`, `keys_classified`, tool + version), which is what lets the
Accessibility screen say when the analysis last ran.
Local analysis, no AI, **0 credit**.
Three behaviours worth knowing:
- **A key you typed by hand is never overwritten.** A `manual` type is a human
correction; the scan reports it as *skipped (manual)* and moves on.
- **It refuses to guess.** A key used as a button in one place and a heading in
another is reported as a conflict and left alone, as is a key with no usable
context. Better an honest gap than a wrong type.
- **Evidence is graded.** `--min-confidence` (default `medium`) sets the floor:
`high` = the markup states it, `medium` = a naming convention, `low` = only
the key name hints at it. Run with `--min-confidence low` to include key-name
hints, `--format json` to audit which rule fired on every key.
### `sonenta doctor`

@@ -93,0 +132,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display