
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
Check your text for grammar and spelling mistakes using multiple providers

npx spech README.md
File name can be omitted, by default it searches files by **/*.md mask.
Default language is English, it can be changed with -l flag:
spech -l ru
spech -l ru-RU -l en-US - for multilingual documents
You can check a string value using STDIN or --input argument
cat README.md | spech
spech --input 'Check the text'
<!-- spech-disable -->
This text is ignored
<!-- spech-enable -->
Add a phrase to a local document dictionary
<!-- spech-dictionary myword -->
Add document-specific languages
<!-- spech-languages en es -->
To configure a provider pass -p flag:
spech -p hunspell -p yandex
Other options can be set in a config file.
Hunspell is the most popular open-source spell checker which supports a great variety of languages.
Free grammar checking API. With an API key, you can receive 250 requests/day (~7500/mo) at no cost. Without an API key, requests are limited to 100 per day per IP address (~3000/mo). The API supports only English (en-US and en-GB).
Free and very fast spell checker API for en, ru and uk languages. It provides free 10k requests/day or 10m characters/day.
Configuration can be stored in:
spech.config.js
module.exports = {
languages: ['en-us'],
providers: [
{ name: 'hunspell' },
{ name: 'grammarBot', apiKey: 'YOUR_API_KEY' },
],
};
It's possible to add words which are marked as a mistake into a dictionary file. Just create a file with .dic extension in your project root:
mydictionary.dic
# Simple word
browserify
# Regexp
/Component.tsx?/
The most useful parts of the library are available through facade class SpellChecker.
Here is a simple example how it can be used:
const { Config, SpellChecker } = require('spech');
async function getMistakes() {
const config = new Config({ ignoreCase: false });
const checker = new SpellChecker(config);
await checker.addDocumentsByMask(process.cwd(), 'docs/*.md');
checker.addDictionaryPhrase('exceptionphrase');
checker.addProviderByConfig({ name: 'hunspell' });
const noMistakes = await checker.checkDocuments();
if (noMistakes) {
return [];
}
const corrections = checker.documents.map(doc => doc.corrections).flat();
return corrections.map(correction => correction.fragment);
}
FAQs
Check your text for grammar and spelling error using multiple providers
The npm package spech receives a total of 38 weekly downloads. As such, spech popularity was classified as not popular.
We found that spech demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.