{"id":52115403,"url":"https://github.com/halfmoon-mind/auto-translate","last_synced_at":"2026-08-05T01:30:44.652Z","repository":{"id":368167581,"uuid":"1283664437","full_name":"halfmoon-mind/auto-translate","owner":"halfmoon-mind","description":"Chrome extension that translates visible web-page paragraphs into Korean through a local Codex native bridge.","archived":false,"fork":false,"pushed_at":"2026-06-29T09:28:58.000Z","size":137,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-29T11:16:11.320Z","etag":null,"topics":["chrome-extension","codex","korean","native-messaging","translation"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halfmoon-mind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-29T06:04:15.000Z","updated_at":"2026-06-29T09:28:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/halfmoon-mind/auto-translate","commit_stats":null,"previous_names":["halfmoon-mind/auto-translate"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/halfmoon-mind/auto-translate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfmoon-mind%2Fauto-translate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfmoon-mind%2Fauto-translate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfmoon-mind%2Fauto-translate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfmoon-mind%2Fauto-translate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halfmoon-mind","download_url":"https://codeload.github.com/halfmoon-mind/auto-translate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfmoon-mind%2Fauto-translate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36293557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-08-04T02:00:06.901Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chrome-extension","codex","korean","native-messaging","translation"],"created_at":"2026-08-05T01:30:43.846Z","updated_at":"2026-08-05T01:30:44.486Z","avatar_url":"https://github.com/halfmoon-mind.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codex Context Translator\n\nChrome extension that translates visible web-page paragraphs into Korean through a local Codex native bridge. The bridge uses the user's local Codex CLI ChatGPT login and does not pass `OPENAI_API_KEY` or `CODEX_API_KEY` to translation runs.\n\n## Can This Be Extension-Only?\n\nNot with the current local-native architecture. Chrome extensions cannot install native messaging hosts, install the Codex CLI, or perform a local ChatGPT login for the user. A one-click Chrome-only install would require a hosted translation backend instead of the local Codex CLI bridge.\n\nFor this project, the smoothest distributable flow is:\n\n1. Install the Chrome extension.\n2. Follow the setup page shown by the extension if the local bridge is missing.\n3. Click the extension and choose `페이지 번역`.\n\nFor a truly polished release, ship a signed companion installer per OS. The installer should copy the native runtime, register the native messaging host, then open the extension setup page. The extension owns connection checks and next-step guidance from that setup page.\n\n## Requirements\n\n- macOS and Google Chrome for the packaged installer included here.\n- Windows is not provided as an installable release yet. Chrome Native Messaging supports Windows, but this repo still needs a Windows host executable wrapper and installer package before Windows users can complete setup.\n- Node.js 18 or newer.\n- Codex CLI installed and logged in with ChatGPT: `codex login`.\n\n## User Install\n\nInstall the extension:\n\n1. Use the published Chrome extension package, or open `chrome://extensions`.\n2. If loading locally, enable Developer mode, choose Load unpacked, and select the `extension` folder.\n\nInstall the native bridge once:\n\n1. Open `companion/macos`.\n2. Double-click `Codex Translator Installer.app`.\n3. Confirm the completion dialog.\n4. Use the opened setup page to run `다시 확인`.\n\nChrome launches the native host only while it is handling a health check or translation session. During a page translation, the extension keeps one native messaging port open so translation batches can reuse the same host process. The native host starts `codex app-server` for that translation session, and the extension keeps the session alive for a few idle minutes so consecutive page translations skip the cold start; the session closes automatically after the idle timeout.\n\nIf the bridge is missing or cannot start, the extension popup shows `설정 열기`. That opens an in-extension setup page, so users do not need to hunt through this README to understand the next step.\n\n## Installer Behavior\n\nThe macOS installer copies the runtime files into:\n\n```text\n~/Library/Application Support/CodexContextTranslator/app\n```\n\nIt then creates:\n\n```text\n~/Library/Application Support/CodexContextTranslator/native-host/run-host\n~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.codex_context_translator.host.json\n```\n\nWhen launched through `Codex Translator Installer.app`, the installer opens:\n\n```text\nchrome-extension://\u003cextension-id\u003e/setup.html\n```\n\nBecause the runtime is copied during install, users can move or delete the downloaded release folder after installation. Rerun the installer after updating the native host or server files.\n\nThe installer reports each step before it runs it. If a step fails, the dialog includes the failed step name, exit code, and a short recovery hint. The extension setup page then verifies the installed bridge from Chrome's point of view.\n\n## Windows Install Status\n\nWindows installation is not provided yet. There is currently no `.exe`, `.msi`, registry installer, or Windows host wrapper in this repo, so Windows users cannot complete the local bridge setup from the packaged release.\n\nThe Chrome extension can still be installed on Windows, but translation will not work until a Windows companion installer exists. A Windows release needs to implement the same Native Messaging architecture with Windows-specific installation mechanics:\n\n- The native host manifest must be registered under `HKCU\\Software\\Google\\Chrome\\NativeMessagingHosts\\com.codex_context_translator.host`.\n- The registry default value points to the host manifest JSON.\n- The manifest `path` should point to a Windows executable host wrapper.\n- The wrapper can launch the installed Node.js runtime script, but it should be packaged as an `.exe` for reliable Chrome startup.\n\nA Windows release should install runtime files under a per-user location such as:\n\n```text\n%LOCALAPPDATA%\\CodexContextTranslator\\app\n```\n\nThen it should write the registry key, verify Node.js and Codex CLI availability, and open the extension setup page or Chrome Web Store listing.\n\nUntil that Windows companion installer is added, Windows should be documented as unsupported for end-user installation.\n\n## Distribution Notes\n\nThe native messaging manifest must allow the exact Chrome extension ID. The installer defaults to the unpacked extension ID derived from `extension/manifest.json`:\n\n```text\nmildfcoedbkcjlcbfmalbfefchdhjdkk\n```\n\nFor a Chrome Web Store release, update the installer default after the store ID is known, or run the script with an override:\n\n```sh\nCODEX_TRANSLATOR_EXTENSION_ID=\u003cchrome-extension-id\u003e scripts/install-native-host-macos.sh\n```\n\nKeep `extension/background.js` and `scripts/install-native-host-macos.sh` on the same native host name:\n\n```text\ncom.codex_context_translator.host\n```\n\nDo not include local/generated files in release archives:\n\n```text\n.DS_Store\n.codegraph/*\n```\n\n## Configuration\n\nThe native bridge defaults prioritize speed:\n\n```sh\nCODEX_TRANSLATOR_MODEL=gpt-5.4-mini\nCODEX_TRANSLATOR_EFFORT=low\nCODEX_TRANSLATOR_TIMEOUT_MS=180000\nCODEX_TRANSLATOR_APP_SERVER_REQUEST_TIMEOUT_MS=30000\nCODEX_TRANSLATOR_MAX_CONTEXT_CHARS=6000\nCODEX_TRANSLATOR_MAX_PARAGRAPHS_PER_RUN=20\nCODEX_TRANSLATOR_MAX_TARGET_CHARS_PER_RUN=7000\nCODEX_TRANSLATOR_MAX_PARALLEL_RUNS=4\n```\n\nSet `CODEX_TRANSLATOR_MODEL=` to let Codex use its default model. Set `CODEX_TRANSLATOR_MODEL=gpt-5.3-codex-spark` if you have Spark quota and want the faster profile. `CODEX_TRANSLATOR_EFFORT=fast` is accepted as an alias for Codex's `low` reasoning effort.\n\n## API-Key Avoidance\n\nThe native bridge removes `OPENAI_API_KEY` and `CODEX_API_KEY` from the child process environment and passes `forced_login_method=\"chatgpt\"` to `codex app-server`. It also disables the shell tool for translation runs. If the local Codex CLI is not logged in with ChatGPT, translation fails instead of falling back to API-key billing.\n\n## Maintenance Notes\n\n- The extension sends one translation request per page translation. The local native host splits the page into char-balanced batches and runs up to 4 in parallel; translated paragraphs stream back and appear in the page as each one completes.\n- If individual paragraphs fail client-side validation (missing numbers, markers, or URLs), only those paragraphs are retried once with a hint; the rest of the page keeps its translations.\n- If the retry still fails and the only defect is broken inline-format markers (`[[CTX-FMT-*]]`, bold/italic), the translation is applied anyway with degraded formatting instead of leaving the paragraph untranslated. Link, preserve, URL, and number checks stay strict (`scripts/test-quality-validation.js` covers the decision).\n- Large pages can still consume Codex usage quickly because the page text is sent as translation input. Token usage shown in the popup is the real count reported by `codex app-server`.\n- The extension replaces paragraph text in the page. Use `원문 복원` before re-translating.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalfmoon-mind%2Fauto-translate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalfmoon-mind%2Fauto-translate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalfmoon-mind%2Fauto-translate/lists"}