{"id":18789148,"url":"https://github.com/hmasdev/quicktypofix","last_synced_at":"2025-07-11T14:34:13.377Z","repository":{"id":228036820,"uuid":"772071624","full_name":"hmasdev/QuickTypoFix","owner":"hmasdev","description":"QuickTypoFix: A versatile VSCode extension designed to instantly correct typos across all text files, streamlining your coding workflow with seamless LLM-powered typo correction","archived":false,"fork":false,"pushed_at":"2025-04-27T02:22:20.000Z","size":864,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T13:13:48.951Z","etag":null,"topics":["llm","typo","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmasdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-03-14T13:36:03.000Z","updated_at":"2025-04-27T02:22:19.000Z","dependencies_parsed_at":"2024-03-16T15:36:31.563Z","dependency_job_id":"6c1d9fbc-97d2-4b90-9fb1-15b2036d656d","html_url":"https://github.com/hmasdev/QuickTypoFix","commit_stats":null,"previous_names":["hmasdev/quicktypofix"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/hmasdev/QuickTypoFix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmasdev%2FQuickTypoFix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmasdev%2FQuickTypoFix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmasdev%2FQuickTypoFix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmasdev%2FQuickTypoFix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmasdev","download_url":"https://codeload.github.com/hmasdev/QuickTypoFix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmasdev%2FQuickTypoFix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264833281,"owners_count":23670617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["llm","typo","vscode-extension"],"created_at":"2024-11-07T21:06:48.850Z","updated_at":"2025-07-11T14:34:13.366Z","avatar_url":"https://github.com/hmasdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QuickTypoFix\n\n![GitHub top language](https://img.shields.io/github/languages/top/hmasdev/QuickTypoFix)\n![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/hmasdev/QuickTypoFix?sort=semver)\n![GitHub](https://img.shields.io/github/license/hmasdev/QuickTypoFix)\n![GitHub last commit](https://img.shields.io/github/last-commit/hmasdev/QuickTypoFix)\n![Test](https://github.com/hmasdev/QuickTypoFix/actions/workflows/unit-test.yml/badge.svg)\n\n![demo](https://github.com/hmasdev/QuickTypoFix/blob/main/images/demo.gif)\n\nA versatile VSCode extension designed to instantly correct typos across all text files,\nstreamlining your coding workflow with seamless LLM-powered typo correction.\n\nYou can use [OpenAI chat completion API](https://platform.openai.com/docs/guides/text-generation/chat-completions-api) and also OpenAI compatible chat completion API like [groq](https://wow.groq.com/).\n\n## Features\n\n- Quickly fix typos in your line.\n- Highlights the fixed typos for a short period of time.\n\n## Requirements\n\n- [Visual Studio Code](https://code.visualstudio.com/) \u003e= 1.87.0\n- [OpenAI API Key](https://platform.openai.com/api-keys)\n\n  - Note that you can use the API key for an OpenAI compatible chat completion API like [groq](https://wow.groq.com/).\n\n## Installation\n\nYou can install this extension in two ways:\n\n### Download `.vsix` file\n\n1. Download the `.vsix` file from [https://github.com/hmasdev/QuickTypoFix/releases](https://github.com/hmasdev/QuickTypoFix/releases)\n\n2. Install the extension with `install from VSIX...` in VS Code.\n\n    ![Install the extension](https://github.com/hmasdev/QuickTypoFix/blob/main/images/install-extension.png)\n\n### Build from Source\n\n1. Clone the repository:\n\n    ```sh\n    git clone https://github.com/hmasdev/QuickTypoFix\n    ```\n\n2. Change to the directory:\n\n    ```sh\n    cd QuickTypoFix\n    ```\n\n3. Install the dependencies:\n\n    ```sh\n    npm install\n    ```\n\n4. Build the extension:\n\n    ```sh\n    npx @vscode/vsce package\n    ```\n\n5. Install the extension with `install from VSIX...` in VS Code in the same way as the [above](#download-vsix-file).\n\n## Usage\n\n### Preparation(Configuration)\n\n#### Required Configuration\n\nOpen the command palette with `Ctrl+Shift+P` and type `QuickTypoFix: Register API Key`.\nThen type your OpenAI API key and press `Enter`.\n\n#### Optional Configuration\n\nOpen the setting page with `Ctrl+,` and search `quicktypofix`.\nThen you can customize this extension as follows:\n\n- **Optional**\n  - `quicktypofix.apiEndpoint`: The OpenAI-compatible chat completion API endpoint for typo corrections. Default is [https://api.openai.com/v1/chat/completions](https://api.openai.com/v1/chat/completions);\n  - `quicktypofix.modelName`: The LLM model name for typo corrections. Default is `gpt-4o-mini`;\n  - `quicktypofix.systemPrompt`: The system prompt for typo corrections. Default is 'Excellent Typo Fixer. Output the only fixed sentence without any header or any footer.';\n  - `quicktypofix.highlightTimeout`: The timeout for the highlight in milliseconds. Default is 3000;\n  - `quicktypofix.addedHighlightColor`: The highlight color for added characters like `rgba(0, 255, 0, 0.5)` or `#00FF00`. Default is `rgba(0, 255, 0, 0.5)`;\n  - `quicktypofix.removedHighlightColor`: The highlight color for removed characters like `rgba(255, 0, 0, 0.5)` or `#FF0000`. Default is `rgba(255, 0, 0, 0.5)`;\n\n### Use this Extension\n\nDuring writing codes or texts in VS Code, you can use the QuickTypoFix command to fix typos in the following two ways.\n\n1. `Ctrl+Shift+P` to open the command palette, then type `Fix typo in this line` and select the command.\n\n   or\n\n2. `Crtl+K Ctrl+N` to execute the command directly.\n\n   - NOTE: You can remeber the shortcut by `Ctrl+K` followed by `Ctrl+N` as \"これ直して（Kore Naoshite）\".\n\nAfter fixed, the typo will be highlighted for a short period of time. Check them.\n\n#### Optional Usage\n\nHere is the list of ways to use this extension in the command palette:\n\n1. `\"QuickTypoFix: Register API Key\"`: to register your OpenAI API key.\n2. `\"QuickTypoFix: Clear Stored API Key\"`: to clear the stored OpenAI API key.\n3. `\"QuickTypoFix: Preview Masked API Key\"`: to preview your OpenAI API key with the masked format.\n   - For example, if your OpenAI API key is `sk-1234567890890890`, the masked format is `sk-**********890`.\n4. `\"QuickTypoFix: Fix typo in this line\"`: to fix the typos in the current line, which is the same as the default shortcut `Ctrl+K Ctrl+N`.\n\n## Development\n\n### Development Requirements\n\n- [Node.js](https://nodejs.org/) \u003e= v20.11.1\n- [npm](https://www.npmjs.com/get-npm)\n  - Dependencies (See the [package.json](./package.json) for the details)\n    - [vsce](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) \u003e= 2.24.0\n    - [diff](https://www.npmjs.com/package/diff) \u003e= 5.2.0\n    - [node-fetch](https://www.npmjs.com/package/node-fetch) \u003e= 2.6.7\n\n### How to Develop\n\n1. Fork the repository: [https://github.com/hmasdev/QuickTypoFix/fork](https://github.com/hmasdev/QuickTypoFix/fork)\n\n2. Clone the forked repository:\n\n    ```sh\n    git clone https://github.com/{YOUR_ACCOUT_HERE}/QuickTypoFix\n    ```\n\n3. Change to the directory:\n\n    ```sh\n    cd QuickTypoFix\n    ```\n\n4. Git checkout to the branch for development:\n\n    ```sh\n    git checkout -b {YOUR_BRANCH_NAME_HERE}\n    ```\n\n5. Install the dependencies:\n\n    ```sh\n    npm install\n    ```\n\n6. Edit the source code. Some notes as follows:\n\n   - Implement tests as follows:\n     - Unit Test: attach 'Unit Test' to the title in `describe`\n     - Integration Test: attach 'Integration Test' to the title in `describe`\n       - Note that \"Integration Test\" means the tests which require an external services like the OpenAI API.\n\n7. Test the extension:\n\n   - Unit Test\n\n     ```sh\n     npm run test\n     ```\n\n   - Integration Test\n\n     ```sh\n     npm run test-integration\n     ```\n\n     Note that you need to add your OpenAI API key to the `.env` file before running integration tests. The `.env` file should be like this:\n\n     ```sh\n     OPENAI_API_KEY={YOUR_OPENAI_API_KEY}\n     ```\n\n8. Git commit and push the changes:\n\n    ```sh\n    git add .\n    git commit -m \"Add xxxx feature\"\n    git push origin add_xxxx_feature\n    ```\n\n9. Create a pull request from the following link: `https://github.com/hmasdev/QuickTypoFix/compare/master...{YOUR_ACCOUT_HERE}:QuickTypoFix:{YOUR_BRANCH_NAME_HERE}`\n\n### Release\n\nRelease the extension is automated by GitHub Actions. The following steps are for the maintainers:\n\n```sh\nnpm version {HERE_IS_THE_VERSION}\ngit push origin {HERE_IS_THE_VERSION}\n```\n\nwhere the tag format must be `%d.%d.%d` like `0.0.1`.\n\nAfter that, the maintainers should check the release page: [https://github.com/hmasdev/QuickTypoFix/releases](https://github.com/hmasdev/QuickTypoFix/releases)\n\n## TODO\n\n- [x] ~~Specify the versions of requirements~~\n- [ ] Implement the customizable dictionaries\n- [x] ~~Add the tests for ./temporalHighlight.js~~\n\n## License\n\n- [MIT](https://github.com/hmasdev/QuickTypoFix/blob/main/LICENSE)\n\n## Author\n\n- [hmasdev](https://github.com/hmasdev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmasdev%2Fquicktypofix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmasdev%2Fquicktypofix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmasdev%2Fquicktypofix/lists"}