localship 0.0.0-stage โ†’ 0.2.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jigar Fumakiya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,309 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ # ๐ŸŒ Localship
4
+
5
+ **Translate your app with the AI you already use.**
6
+
7
+ Free and open source ยท No account, no server ยท Any AI model ยท Every translation checked
8
+
9
+ [![npm](https://img.shields.io/npm/v/localship?color=cb3837&logo=npm)](https://www.npmjs.com/package/localship)
10
+ [![CI](https://github.com/jigarfumakiya/localship/actions/workflows/ci.yml/badge.svg)](https://github.com/jigarfumakiya/localship/actions/workflows/ci.yml)
11
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
12
+ [![MCP](https://img.shields.io/badge/MCP-server-8A2BE2)](https://modelcontextprotocol.io)
13
+ [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
14
+
15
+ [Highlights](#-highlights) ยท [See it in action](#-see-it-in-action) ยท [How it works](#-how-it-works) ยท [What you can ask](#-what-you-can-ask) ยท [Formats](#-formats) ยท [Install](#-install) ยท [Questions](#-questions) ยท [Roadmap](#%EF%B8%8F-roadmap) ยท [Reference](docs/reference.md)
16
+
17
+ </div>
18
+
19
+ ---
20
+
21
+ Ask your coding agent to translate your app. Localship gives it the context it needs, checks
22
+ every translation before it's written, and remembers what's done, so updates only redo what
23
+ changed. Think of it as a localization platform that runs inside your coding agent: no account,
24
+ no server, no monthly bill.
25
+
26
+ > [!NOTE]
27
+ > **Early days.** Localship is new. It's tested on real-world translation files and a real app,
28
+ > but expect rough edges, and please [open an issue](https://github.com/jigarfumakiya/localship/issues)
29
+ > when you hit one.
30
+
31
+ ## โœจ Highlights
32
+
33
+ - ๐Ÿ†“ **Free and open source.** MIT-licensed. You pay only for your own AI usage, or nothing with a
34
+ local model.
35
+ - ๐Ÿค– **Your AI, your model.** Your coding agent's own model, or Claude, GPT, Gemini, OpenRouter
36
+ or Ollama.
37
+ - ๐Ÿ›ก๏ธ **Catches broken translations.** Placeholders, plural forms, escaping and markup are checked
38
+ in code before anything is written. Failures go back to the AI with the reason.
39
+ - ๐Ÿง  **More context for the AI.** Each string comes with the code that uses it, its comment, your
40
+ glossary and voice notes, and earlier translations of the same text.
41
+ - ๐Ÿ”’ **Stays in your repo.** No server, no account, no upload. Your own translation files, formatted
42
+ the way your tools write them.
43
+ - ๐Ÿ’ป **Runs anywhere.** Claude Code, Cursor, VS Code, Codex, Gemini CLI, Claude Desktop or the
44
+ terminal, on macOS, Linux and Windows.
45
+
46
+ ### ๐Ÿค” Why use Localship?
47
+
48
+ | | โŒ Asking an AI directly | โœ… With Localship |
49
+ |---|---|---|
50
+ | Context | One string at a time | Code, comments, brief and glossary |
51
+ | Placeholders | Sometimes dropped | Checked before writing |
52
+ | Plural forms | Often incomplete | Every form each language needs |
53
+ | Escaping and markup | Can break the build | Checked and escaped |
54
+ | Terms and tone | Drift across strings | Same glossary and voice everywhere |
55
+ | Changed copy | Everything redone | Only what changed |
56
+ | Your edits | Overwritten | Kept |
57
+
58
+ ## ๐ŸŽฌ See it in action
59
+
60
+ ```
61
+ You: Translate this app into Hindi and Arabic.
62
+ Agent: Found 18 strings (2 plurals, 3 with placeholders). I'll add a short brief and
63
+ glossary, and keep "Jotter Pro" as written. Say "start translating" to go.
64
+
65
+ You: Start translating.
66
+ Agent: 36 translations written as drafts, 0 errors. Arabic has all six plural forms.
67
+
68
+ You: Review the Arabic, then approve them.
69
+ Agent: Two small fixes made. All approved.
70
+
71
+ You: I reworded two buttons. Update the translations.
72
+ Agent: Updated the 2 changed strings. Your hand edit in Hindi was kept.
73
+ ```
74
+
75
+ ## ๐Ÿ” How it works
76
+
77
+ ```mermaid
78
+ flowchart LR
79
+ A[๐Ÿ“ Your repo] --> B[๐Ÿ”Ž Find strings]
80
+ B --> C[๐Ÿง  Batch + context<br/><sub>code usage ยท comments<br/>glossary ยท voice ยท memory</sub>]
81
+ C --> D[๐Ÿค– AI translates<br/><sub>your agent or any model</sub>]
82
+ D --> E{๐Ÿ›ก๏ธ Checks<br/><sub>placeholders ยท plurals<br/>escaping ยท markup</sub>}
83
+ E -- fails --> D
84
+ E -- passes --> F[๐Ÿ“ Drafts in your files]
85
+ F --> G[๐Ÿ‘€ Review] --> H[โœ… Approved]
86
+ ```
87
+
88
+ Setup adds one folder to your repo. Commit it: the brief, glossary and voice notes are yours to
89
+ edit, and the lockfile is how Localship knows what's new, what changed and what someone edited by
90
+ hand.
91
+
92
+ ```
93
+ .localship/
94
+ โ”œโ”€โ”€ config.yaml where your strings live, and which languages
95
+ โ”œโ”€โ”€ brief.md what the app is and who it's for
96
+ โ”œโ”€โ”€ glossary.yaml terms to keep as they are or translate one way
97
+ โ”œโ”€โ”€ voice/ tone and formality per language
98
+ โ””โ”€โ”€ lock.json what was translated from which text
99
+ ```
100
+
101
+ ## ๐Ÿ’ฌ What you can ask
102
+
103
+ Wherever your app is today, one sentence gets it started.
104
+
105
+ | Your app today | Just ask |
106
+ |---|---|
107
+ | ๐Ÿ“ Has strings, no translations yet | "Translate the app into French and German." |
108
+ | ๐ŸŒ Already has some translations | "Set up localization." Existing translations are kept and checked |
109
+ | ๐Ÿงฑ Text is written straight into the code | "Make this app localizable." The agent moves it into `strings.xml` or a String Catalog |
110
+ | โž• Adding a language later | "Add Japanese." |
111
+ | โœ๏ธ You changed some copy | "Update the translations." Only changed strings are redone |
112
+ | ๐Ÿงน You deleted or renamed strings | "Clean up old translations." |
113
+ | ๐Ÿ‘€ Ready to check the result | "Review the Arabic translations." |
114
+
115
+ ## ๐Ÿ“ฆ Formats
116
+
117
+ | Format | Status |
118
+ |---|---|
119
+ | Android `strings.xml` | โœ… Supported |
120
+ | Apple String Catalog `.xcstrings` | โœ… Supported |
121
+ | gettext `.po` / `.pot` | โœ… Supported |
122
+ | Flutter ARB `.arb` | ๐Ÿ—“๏ธ Planned |
123
+ | JSON (flat, nested, i18next, ICU) | ๐Ÿ—“๏ธ Planned |
124
+ | Apple `.strings` / `.stringsdict` | ๐Ÿ—“๏ธ Planned |
125
+ | XLIFF `.xliff` | ๐Ÿ—“๏ธ Planned |
126
+
127
+ Android string arrays and plurals, String Catalog plural variations, and gettext plural forms are
128
+ all supported.
129
+
130
+ ## ๐Ÿš€ Install
131
+
132
+ **Claude Code plugin**
133
+
134
+ ```
135
+ /plugin marketplace add jigarfumakiya/localship
136
+ /plugin install localship@localship
137
+ ```
138
+
139
+ **Claude Code, Codex, Gemini CLI and other CLIs:** add the server, then the skills.
140
+
141
+ ```sh
142
+ claude mcp add localship -- npx -y localship mcp # Claude Code
143
+ codex mcp add localship -- npx -y localship mcp # Codex
144
+ gemini mcp add localship npx -y localship mcp # Gemini CLI
145
+ npx skills add jigarfumakiya/localship # the skills, for any agent
146
+ ```
147
+
148
+ **Cursor and VS Code**
149
+
150
+ [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=localship&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImxvY2Fsc2hpcCIsIm1jcCJdfQ%3D%3D)
151
+ [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_server-0098FF?logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522localship%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522localship%2522%252C%2522mcp%2522%255D%257D)
152
+
153
+ Add the skills too: `npx skills add jigarfumakiya/localship`.
154
+
155
+ Now ask your agent: *"Translate this app into Hindi and Arabic."* Needs Node.js 22 or newer.
156
+
157
+ ### ๐Ÿ”Œ Other tools
158
+
159
+ Add this MCP server to your tool's config:
160
+
161
+ ```json
162
+ { "mcpServers": { "localship": { "command": "npx", "args": ["-y", "localship", "mcp"] } } }
163
+ ```
164
+
165
+ | Tool | Config file |
166
+ |---|---|
167
+ | Cursor | `.cursor/mcp.json` |
168
+ | VS Code | `.vscode/mcp.json` (use `"servers"`) |
169
+ | Claude Desktop | `claude_desktop_config.json` (add `"-C", "/path/to/app"` before `"mcp"`) |
170
+
171
+ <details>
172
+ <summary><b>MCP tools</b></summary>
173
+
174
+ Your agent picks these itself; you just ask. ๐Ÿ‘€ marks tools that only read and never change a file.
175
+
176
+ | Tool | What it does |
177
+ |---|---|
178
+ | `localship_plan` ๐Ÿ‘€ | Looks at the project and returns one plan for a request: what it found, blockers, steps and defaults |
179
+ | `localship_start` | Sets up a confirmed plan: config, default voice notes and glossary, never overwriting yours |
180
+ | `localship_status` ๐Ÿ‘€ | Progress per language: missing, changed, drafts, approved |
181
+ | `localship_validate` ๐Ÿ‘€ | Checks placeholders, plural forms, escaping, markup and the glossary |
182
+ | `localship_detect` ๐Ÿ‘€ | Finds translation files in the repo |
183
+ | `localship_init` | Writes the config from what was detected |
184
+ | `localship_add_locales` | Adds languages to translate into |
185
+ | `localship_get_context` ๐Ÿ‘€ | Reads the brief, voice notes and glossary |
186
+ | `localship_update_context` | Writes the brief, voice notes or glossary |
187
+ | `localship_next_batch` ๐Ÿ‘€ | The next strings to translate, with their context |
188
+ | `localship_submit` | Checks translations and writes the good ones as drafts |
189
+ | `localship_approve` | Marks drafts reviewed or approved, when you say so |
190
+ | `localship_remove` | Clears translations so they're redone; keeps your edits unless you ask |
191
+ | `localship_prune` | Removes translations of deleted strings |
192
+ | `localship_translate` | Translates everything missing through a model API, for large apps |
193
+
194
+ </details>
195
+
196
+ ## ๐Ÿ”’ Security and privacy
197
+
198
+ - **Stays in your project.** Localship reads and writes only your translation files and the
199
+ `.localship/` folder. Changes to your code are made by your agent, where you can see them.
200
+ - **No Localship server.** No account, no telemetry. The only calls Localship makes go to a model
201
+ API you set up, with your own key. With your coding agent's model or a local Ollama, it sends
202
+ nothing over the internet.
203
+ - **Nothing is final until you say so.** Translations are written as drafts, and hand edits and
204
+ approved translations are never replaced unless you ask.
205
+
206
+ ## โŒจ๏ธ From the command line
207
+
208
+ No agent needed: run Localship straight from your terminal with any model.
209
+
210
+ ```sh
211
+ npm install -g localship
212
+
213
+ localship plan hindi arabic # what it takes, before changing anything
214
+ localship start hi,ar --model anthropic:claude-sonnet-5-5 # set up and translate in one go
215
+ localship status # progress per language
216
+ localship validate # exits 1 on errors
217
+ localship approve --locale hi # after review
218
+ ```
219
+
220
+ Every command, option and config key is in the [reference](docs/reference.md).
221
+
222
+ ## โ“ Questions
223
+
224
+ <details>
225
+ <summary><b>The Localship tools don't show up. What do I check?</b></summary>
226
+
227
+ - Node.js 22 or newer: run `node --version`.
228
+ - The first start takes a minute while it installs; try again after that.
229
+ - Reconnect the server: `/mcp` in Claude Code, or restart your editor.
230
+ - Open your app's folder in your tool, so Localship starts in the right project.
231
+ </details>
232
+
233
+ <details>
234
+ <summary><b>Can I try it before using it on my app?</b></summary>
235
+
236
+ Yes. [examples/android-notes](examples/android-notes) is a small Android app with its Hindi and
237
+ Arabic translations. Open it with Localship installed and ask your agent to add another language.
238
+ </details>
239
+
240
+ <details>
241
+ <summary><b>Do I need an API key?</b></summary>
242
+
243
+ No. Inside a coding agent, Localship uses the agent's own model. An API key is only needed to
244
+ translate from the terminal or CI, and a local model through Ollama needs none at all.
245
+ </details>
246
+
247
+ <details>
248
+ <summary><b>Where do my strings go?</b></summary>
249
+
250
+ Only to the AI you choose. There's no Localship server.
251
+ </details>
252
+
253
+ <details>
254
+ <summary><b>Will it overwrite my translators' work?</b></summary>
255
+
256
+ No. Hand edits and anything approved are never replaced unless you explicitly ask.
257
+ </details>
258
+
259
+ <details>
260
+ <summary><b>I have an iOS and an Android app. Can they share translations?</b></summary>
261
+
262
+ Yes. One config can list both, and they share the same brief, glossary and voice notes. When the
263
+ same text appears in both apps, the earlier translation is offered to the AI, so "Sign in"
264
+ reads the same on both.
265
+ </details>
266
+
267
+ <details>
268
+ <summary><b>Which languages?</b></summary>
269
+
270
+ Any. Plural rules come from Unicode's CLDR data, so Arabic gets six plural forms, Russian three and
271
+ Japanese one, automatically.
272
+ </details>
273
+
274
+ <details>
275
+ <summary><b>How good are the translations?</b></summary>
276
+
277
+ As good as the model and the context you give it. The brief, voice and glossary make the biggest
278
+ difference. The checks catch mechanical errors, not wrong meaning, so review the drafts, ideally
279
+ with a native speaker.
280
+ </details>
281
+
282
+ <details>
283
+ <summary><b>Does it check right-to-left layout and cut-off text?</b></summary>
284
+
285
+ Not yet. Localship checks the translation files, not how your app draws them. Charts that don't
286
+ mirror, signs on the wrong side of amounts, or text stored in a database won't show up in the
287
+ files, so test right-to-left languages on a device before you ship. The agent skills list what
288
+ to look for.
289
+ </details>
290
+
291
+ ## ๐Ÿ›ฃ๏ธ Roadmap
292
+
293
+ | | Feature | Status |
294
+ |---|---|---|
295
+ | ๐Ÿ“ฆ | Android, String Catalog and gettext formats | โœ… Done |
296
+ | ๐Ÿง  | Translation with context, checks, review, approval and cleanup | โœ… Done |
297
+ | ๐Ÿค– | MCP server, agent skills, Claude Code plugin | โœ… Done |
298
+ | ๐Ÿงฉ | Flutter ARB and JSON (i18next, flat, nested) | ๐Ÿ—“๏ธ Planned |
299
+ | โœ… | GitHub Action that checks pull requests | ๐Ÿ—“๏ธ Planned |
300
+ | ๐Ÿ”Ž | Tools that find hardcoded text in Kotlin and Swift | ๐Ÿ—“๏ธ Planned |
301
+ | ๐Ÿ‘€ | AI reviewer, and a review page for human translators | ๐Ÿ—“๏ธ Planned |
302
+ | ๐Ÿช | App Store and Play Store listings | ๐Ÿ—“๏ธ Planned |
303
+ | ๐Ÿ“ฑ | Screenshot checks for cut-off and right-to-left text | ๐Ÿ—“๏ธ Planned |
304
+
305
+ Want something sooner? [Open an issue](https://github.com/jigarfumakiya/localship/issues) or ๐Ÿ‘ an existing one.
306
+
307
+ ## ๐Ÿค Contributing
308
+
309
+ Found a bug or have an idea? [Open an issue](https://github.com/jigarfumakiya/localship/issues).