{"id":13393878,"url":"https://github.com/megahertz/spech","last_synced_at":"2025-10-25T02:34:02.735Z","repository":{"id":47929481,"uuid":"227901187","full_name":"megahertz/spech","owner":"megahertz","description":"Check your text for grammar and spelling mistakes using multiple providers","archived":false,"fork":false,"pushed_at":"2023-05-07T12:58:04.000Z","size":529,"stargazers_count":31,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-05-16T14:04:38.925Z","etag":null,"topics":[],"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/megahertz.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}},"created_at":"2019-12-13T18:40:00.000Z","updated_at":"2023-03-17T12:20:59.000Z","dependencies_parsed_at":"2024-01-13T17:11:12.302Z","dependency_job_id":"d03a4a36-a47a-46b4-8dcc-915f4803ce4c","html_url":"https://github.com/megahertz/spech","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fspech","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fspech/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fspech/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/megahertz%2Fspech/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/megahertz","download_url":"https://codeload.github.com/megahertz/spech/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227812895,"owners_count":17823619,"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":[],"created_at":"2024-07-30T17:01:01.752Z","updated_at":"2025-10-25T02:33:57.699Z","avatar_url":"https://github.com/megahertz.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# spech\n\n[![Build Status](https://travis-ci.org/megahertz/spech.svg?branch=master)](https://travis-ci.org/megahertz/spech)\n[![NPM version](https://badge.fury.io/js/spech.svg)](https://badge.fury.io/js/spech)\n\nCheck your text for grammar and spelling mistakes using multiple providers\n\n - Multiple libraries/services for grammar and spelling checking\n - Multilingual document support\n - Zero config\n - Can work offline (only with Hunspell provider)\n\n![Screenshot](docs/img/screenshot.png)\n\n## Usage\n\n### Files checking\n\n`npx spech README.md`\n\nFile name can be omitted, by default it searches files by `**/*.md` mask.\nDefault language is English, it can be changed with `-l` flag: \n\n`spech -l ru`\n\n`spech -l ru-RU -l en-US` - for multilingual documents\n\n### String and STDIN checking\n\nYou can check a string value using STDIN or --input argument\n\n`cat README.md | spech`\n\n`spech --input 'Check the text'`\n\n### Directives\n\n#### disable\n\n```Markdown\n\u003c!-- spech-disable --\u003e\nThis text is ignored\n\u003c!-- spech-enable --\u003e\n```\n\n#### dictionary\n\nAdd a phrase to a local document dictionary\n\n```Markdown\n\u003c!-- spech-dictionary myword --\u003e\n```\n\n#### languages\n\nAdd document-specific languages\n\n```Markdown\n\u003c!-- spech-languages en es --\u003e\n```\n\n## Providers\n\nTo configure a provider pass `-p` flag:\n\n`spech -p hunspell -p yandex`\n\nOther options can be set in a config file. \n\n### Hunspell\n\nHunspell is the most popular open-source spell checker which supports a great\nvariety of languages.\n\n[Read more](docs/providers/hunspell.md).\n\n### GrammarBot\n\nFree grammar checking API. With an API key, you can receive 250 requests/day\n(~7500/mo) at no cost. Without an API key, requests are limited to 100 per\nday per IP address (~3000/mo). The API supports only English (en-US and en-GB).\n\n[Read more](docs/providers/grammarBot.md).\n\n### Yandex Speller\n\nFree and very fast spell checker API for en, ru and uk languages. It provides\nfree 10k requests/day or 10m characters/day.\n\n[Read more](docs/providers/yandex.md).\n\n## [Configuring](docs/config.md)\n\nConfiguration can be stored in:\n\n - spech.config.js\n - \"spech\" section of the package.json\n\nspech.config.js\n\n```js\nmodule.exports = {\n  languages: ['en-us'],\n  providers: [\n    { name: 'hunspell' },\n    { name: 'grammarBot', apiKey: 'YOUR_API_KEY' },\n  ],\n};\n```\n\n[More details](docs/config.md).\n\n### Dictionaries\nIt's possible to add words which are marked as a mistake into a dictionary file.\nJust create a file with .dic extension in your project root:\n\nmydictionary.dic\n```\n# Simple word\nbrowserify\n# Regexp\n/Component.tsx?/\n```\n\n[More details](docs/config.md#dictionaries-string--string).\n\n## API Usage\n\nThe most useful parts of the library are available through facade class\n[SpellChecker](src/SpellChecker.js).\n\nHere is a simple example how it can be used:\n\n```js\nconst { Config, SpellChecker } = require('spech');\n\nasync function getMistakes() {\n  const config = new Config({ ignoreCase: false });\n  const checker = new SpellChecker(config);\n\n  await checker.addDocumentsByMask(process.cwd(), 'docs/*.md');\n  checker.addDictionaryPhrase('exceptionphrase');\n  checker.addProviderByConfig({ name: 'hunspell' });\n\n  const noMistakes = await checker.checkDocuments();\n  if (noMistakes) {\n    return [];\n  }\n  \n  const corrections = checker.documents.map(doc =\u003e doc.corrections).flat();\n  return corrections.map(correction =\u003e correction.fragment);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegahertz%2Fspech","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegahertz%2Fspech","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegahertz%2Fspech/lists"}