{"id":19911068,"url":"https://github.com/streetsidesoftware/cspell-cli","last_synced_at":"2026-04-07T07:49:21.417Z","repository":{"id":36977350,"uuid":"374109780","full_name":"streetsidesoftware/cspell-cli","owner":"streetsidesoftware","description":"CSpell command line spell checker.","archived":false,"fork":false,"pushed_at":"2024-04-28T12:04:46.000Z","size":1425,"stargazers_count":63,"open_issues_count":4,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-01T09:41:32.386Z","etag":null,"topics":["code","cspell","spellchecker","spelling"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/streetsidesoftware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"patreon":"streetsidesoftware","tidelift":"npm/cspell","github":["streetsidesoftware"],"open_collective":"cspell"}},"created_at":"2021-06-05T12:33:44.000Z","updated_at":"2024-07-23T08:20:24.709Z","dependencies_parsed_at":"2023-09-24T13:45:55.748Z","dependency_job_id":"fb5ec1a4-1161-493a-9edf-71a0e0820e93","html_url":"https://github.com/streetsidesoftware/cspell-cli","commit_stats":{"total_commits":464,"total_committers":10,"mean_commits":46.4,"dds":0.5905172413793103,"last_synced_commit":"02e50df200284e5aae23b288febb3bde14d5625f"},"previous_names":[],"tags_count":107,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streetsidesoftware%2Fcspell-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streetsidesoftware%2Fcspell-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streetsidesoftware%2Fcspell-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/streetsidesoftware%2Fcspell-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/streetsidesoftware","download_url":"https://codeload.github.com/streetsidesoftware/cspell-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241338986,"owners_count":19946742,"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":["code","cspell","spellchecker","spelling"],"created_at":"2024-11-12T21:23:25.699Z","updated_at":"2026-04-07T07:49:21.410Z","avatar_url":"https://github.com/streetsidesoftware.png","language":"Dockerfile","funding_links":["https://patreon.com/streetsidesoftware","https://tidelift.com/funding/github/npm/cspell","https://github.com/sponsors/streetsidesoftware","https://opencollective.com/cspell"],"categories":["Dockerfile"],"sub_categories":[],"readme":"# cspell-cli\n\n## Usage\n\nTo check all files under the current directory, run:\n\n```\nnpx cspell-cli --gitignore .\n```\n\n## Setup [pre-commit](https://pre-commit.com) Hook\n\nThis repository enables using [cspell](https://github.com/streetsidesoftware/cspell) as a [pre-commit](https://pre-commit.com) hook.\n\n\u003c!-- x-release-please-start-version --\u003e\n\n```yaml\n# .pre-commit-config.yaml\nrepos:\n  - repo: https://github.com/streetsidesoftware/cspell-cli\n    rev: v10.0.0\n    hooks:\n      - id: cspell # Spell check changed files\n      - id: cspell # Spell check the commit message\n        name: check commit message spelling\n        args:\n          - --no-must-find-files\n          - --no-progress\n          - --no-summary\n          - --files\n          - .git/COMMIT_EDITMSG\n        stages: [commit-msg]\n        always_run: true # This might not be necessary.\n```\n\n\u003c!-- x-release-please-end --\u003e\n\n## Setup Custom Dictionary\n\nTo use a custom dictionary with the `pre-commit` hook, create either a `cspell.config.yaml` or `cspell.json` file in your project's root directory.\n\n`cspell.config.yaml`\n\n```yaml\ndictionaryDefinitions:\n  - name: myWords\n    path: ./path/to/cSpell_dict.txt\n    addWords: true\ndictionaries:\n  - myWords\n```\n\n`cSpell.json`\n\n```json\n{\n  \"dictionaryDefinitions\": [\n    {\n      \"name\": \"myWords\",\n      \"path\": \"./path/to/cSpell_dict.txt\",\n      \"addWords\": true\n    }\n  ],\n  \"dictionaries\": [\"myWords\"]\n}\n```\n\nIf you installed the [Code Spell Checker extension](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) for VS Code, this can be done automatically from the command palette by running \"Spell: Create a CSpell configuration file\".\n\n## Install from GitHub\n\nThis repo also allows installing the `cspell-cli` directly from GitHub:\n\n```\nnpm install -g git+https://github.com/streetsidesoftware/cspell-cli\n```\n\n## Docker\n\n[Package cspell](https://github.com/streetsidesoftware/cspell-cli/pkgs/container/cspell)\n\n```sh\ndocker run -v $PWD:/workdir ghcr.io/streetsidesoftware/cspell:latest .\n```\n\nSee [Extending the Docker Container to include German](https://github.com/streetsidesoftware/cspell-cli/tree/main/docker/german/README.md)\n\n## Usage\n\n`cspell --help`:\n\n\u003c!--- @@inject: static/help.txt ---\u003e\n\n```\nUsage: cspell [options] [command]\n\nSpelling Checker for Code\n\nOptions:\n  -V, --version                         output the version number\n  -h, --help                            display help for command\n\nCommands:\n  lint [options] [globs...]             Check spelling\n  trace [options] [words...]            Trace words -- Search for words in the\n                                        configuration and dictionaries.\n  check [options] \u003cfiles...\u003e            Spell check file(s) and display the\n                                        result. The full file is displayed in\n                                        color.\n  suggestions|sug [options] [words...]  Spelling Suggestions for words.\n  init [options]                        Initialize a CSpell configuration file.\n  link                                  Link dictionaries and other settings to\n                                        the cspell global config.\n  dictionaries [options]                List dictionaries\n  help [command]                        display help for command\n```\n\n\u003c!--- @@inject-end: static/help.txt ---\u003e\n\n### Lint\n\n`lint` is the default command.\n\n`cspell lint --help`:\n\n\u003c!--- @@inject: static/help-lint.txt ---\u003e\n\n```\nUsage: cspell lint [options] [globs...] [file://\u003cpath\u003e ...] [stdin[://\u003cpath\u003e]]\n\nPatterns:\n - [globs...]            Glob Patterns\n - [stdin]               Read from \"stdin\" assume text file.\n - [stdin://\u003cpath\u003e]      Read from \"stdin\", use \u003cpath\u003e for file type and config.\n - [file://\u003cpath\u003e]       Check the file at \u003cpath\u003e\n\nExamples:\n    cspell .                        Recursively check all files.\n    cspell lint .                   The same as \"cspell .\"\n    cspell \"*.js\"                   Check all .js files in the current directory\n    cspell \"**/*.js\"                Check all .js files recursively\n    cspell \"src/**/*.js\"            Only check .js under src\n    cspell \"**/*.txt\" \"**/*.js\"     Check both .js and .txt files.\n    cspell \"**/*.{txt,js,md}\"       Check .txt, .js, and .md files.\n    cat LICENSE | cspell stdin      Check stdin\n    cspell stdin://docs/doc.md      Check stdin as if it was \"./docs/doc.md\"\n\nCheck spelling\n\nOptions:\n  -c, --config \u003ccspell.json\u003e     Configuration file to use.  By default cspell\n                                 looks for cspell.json in the current directory.\n  --no-config-search             Disable automatic searching for additional\n                                 configuration files in parent directories. Only\n                                 the specified config file (if any) will be\n                                 used.\n  --stop-config-search-at \u003cdir\u003e  Specify a directory at which to stop searching\n                                 for configuration files when walking up from\n                                 the files being checked. Useful for limiting\n                                 config inheritance.\n  -v, --verbose                  Display more information about the files being\n                                 checked. Add more than one -v for increased\n                                 verbosity.\n  --locale \u003clocale\u003e              Set language locales. i.e. \"en,fr\" for English\n                                 and French, or \"en-GB\" for British English.\n  --language-id \u003cfile-type\u003e      Force programming language for unknown\n                                 extensions. i.e. \"php\" or \"scala\"\n  --words-only                   Only output the words not found in the\n                                 dictionaries.\n  -u, --unique                   Only output the first instance of a word not\n                                 found in the dictionaries.\n  -e, --exclude \u003cglob\u003e           Exclude files matching the glob pattern. This\n                                 option can be used multiple times to add\n                                 multiple globs.\n  --file-list \u003cpath or stdin\u003e    Specify a list of files to be spell checked.\n                                 The list is filtered against the glob file\n                                 patterns. Note: the format is 1 file path per\n                                 line.\n  --file [file...]               Specify files to spell check. They are filtered\n                                 by the [globs...].\n  --no-issues                    Do not show the spelling errors.\n  --no-progress                  Turn off progress messages\n  --no-summary                   Turn off summary message in console.\n  -s, --silent                   Silent mode, suppress error messages.\n  --no-exit-code                 Do not return an exit code if issues are found.\n  --quiet                        Only show spelling issues or errors.\n  --fail-fast                    Exit after first file with an issue or error.\n  --continue-on-error            Continue processing files even if there is a\n                                 configuration error.\n  -r, --root \u003croot folder\u003e       Root directory, defaults to current directory.\n  --no-relative                  Issues are displayed with absolute path instead\n                                 of relative to the root.\n  --show-context                 Show the surrounding text around an issue.\n  --show-suggestions             Show spelling suggestions.\n  --no-show-suggestions          Do not show spelling suggestions or fixes.\n  --no-must-find-files           Do not error if no files are found.\n  --cache                        Use cache to only check changed files.\n  --no-cache                     Do not use cache.\n  --cache-reset                  Reset the cache file.\n  --cache-strategy \u003cstrategy\u003e    Strategy to use for detecting changed files.\n                                 (choices: \"content\", \"metadata\", default:\n                                 \"content\")\n  --cache-location \u003cpath\u003e        Path to the cache file or directory. (default:\n                                 \".cspellcache\")\n  --dot                          Include files and directories starting with `.`\n                                 (period) when matching globs.\n  --gitignore                    Ignore files matching glob patterns found in\n                                 .gitignore files.\n  --no-gitignore                 Do NOT use .gitignore files.\n  --gitignore-root \u003cpath\u003e        Prevent searching for .gitignore files past\n                                 root.\n  --validate-directives          Validate in-document CSpell directives.\n  --max-file-size \u003csize\u003e         Prevent checking large files. i.e 1MB, 50KB,\n                                 1GB\n  --color                        Force color.\n  --no-color                     Turn off color.\n  --no-default-configuration     Do not load the default configuration and\n                                 dictionaries.\n  --dictionary \u003cname\u003e            Enable a dictionary by name.\n  --disable-dictionary \u003cname\u003e    Disable a dictionary by name.\n  --reporter \u003cmodule|path\u003e       Specify one or more reporters to use.\n  --report \u003clevel\u003e               Set how unknown words are reported (choices:\n                                 \"all\", \"simple\", \"typos\", \"flagged\")\n  --issue-template [template]    Use a custom issue template. See --help\n                                 --issue-template for details.\n  -h, --help                     display help for command\n\nMore Examples:\n\n    cspell \"**/*.js\" --reporter @cspell/cspell-json-reporter\n        This will spell check all \".js\" files recursively and use\n        \"@cspell/cspell-json-reporter\".\n\n    cspell . --reporter default\n        This will force the default reporter to be used overriding\n        any reporters defined in the configuration.\n\n    cspell . --reporter ./\u003cpath\u003e/reporter.cjs\n        Use a custom reporter. See API for details.\n\n    cspell \"*.md\" --exclude CHANGELOG.md --files README.md CHANGELOG.md\n        Spell check only check \"README.md\" but NOT \"CHANGELOG.md\".\n\n    cspell \"/*.md\" --no-must-find-files --files $FILES\n        Only spell check the \"/*.md\" files in $FILES,\n        where $FILES is a shell variable that contains the list of files.\n\n    cspell --help --verbose\n        Show all options including hidden options.\n\nReferences:\n    https://cspell.org\n    https://github.com/streetsidesoftware/cspell\n```\n\n\u003c!--- @@inject-end: static/help-lint.txt ---\u003e\n\n### Trace\n\n`cspell trace --help`:\n\n\u003c!--- @@inject: static/help-trace.txt ---\u003e\n\n```\nUsage: cspell trace [options] [words...]\n\nTrace words -- Search for words in the configuration and dictionaries.\n\nOptions:\n  -c, --config \u003ccspell.json\u003e  Configuration file to use.  By default cspell\n                              looks for cspell.json in the current directory.\n  --locale \u003clocale\u003e           Set language locales. i.e. \"en,fr\" for English and\n                              French, or \"en-GB\" for British English.\n  --language-id \u003clanguage\u003e    Use programming language. i.e. \"php\" or \"scala\".\n  --allow-compound-words      Turn on allowCompoundWords\n  --no-allow-compound-words   Turn off allowCompoundWords\n  --ignore-case               Ignore case and accents when searching for words.\n  --no-ignore-case            Do not ignore case and accents when searching for\n                              words.\n  --dictionary \u003cname\u003e         Enable a dictionary by name. Can be used multiple\n                              times.\n  --no-dictionary \u003cname\u003e      Disable a dictionary by name. Can be used multiple\n                              times.\n  --dictionary-path \u003cformat\u003e  Configure how to display the dictionary path.\n                              (choices: \"hide\", \"short\", \"long\", \"full\",\n                              default: Display most of the path.)\n  --stdin                     Read words from stdin.\n  --all                       Show all dictionaries.\n  --only-found                Show only dictionaries that have the words.\n  --color                     Force color.\n  --no-color                  Turn off color.\n  --no-default-configuration  Do not load the default configuration and\n                              dictionaries.\n  -h, --help                  display help for command\n```\n\n\u003c!--- @@inject-end: static/help-trace.txt ---\u003e\n\n### Check\n\n`cspell check --help`:\n\n\u003c!--- @@inject: static/help-check.txt ---\u003e\n\n```\nUsage: cspell check [options] \u003cfiles...\u003e\n\nSpell check file(s) and display the result. The full file is displayed in color.\n\nOptions:\n  -c, --config \u003ccspell.json\u003e  Configuration file to use.  By default cspell\n                              looks for cspell.json in the current directory.\n  --validate-directives       Validate in-document CSpell directives.\n  --no-validate-directives    Do not validate in-document CSpell directives.\n  --no-color                  Turn off color.\n  --color                     Force color\n  --no-exit-code              Do not return an exit code if issues are found.\n  --no-default-configuration  Do not load the default configuration and\n                              dictionaries.\n  -h, --help                  display help for command\n```\n\n\u003c!--- @@inject-end: static/help-check.txt ---\u003e\n\n### Suggestions\n\n`cspell suggestions --help`:\n\n\u003c!--- @@inject: static/help-suggestions.txt ---\u003e\n\n```\nUsage: cspell suggestions|sug [options] [words...]\n\nSpelling Suggestions for words.\n\nOptions:\n  -c, --config \u003ccspell.json\u003e            Configuration file to use.  By default\n                                        cspell looks for cspell.json in the\n                                        current directory.\n  --locale \u003clocale\u003e                     Set language locales. i.e. \"en,fr\" for\n                                        English and French, or \"en-GB\" for\n                                        British English.\n  --language-id \u003clanguage\u003e              Use programming language. i.e. \"php\" or\n                                        \"scala\".\n  -s, --no-strict                       Ignore case and accents when searching\n                                        for words.\n  --ignore-case                         Alias of --no-strict.\n  --num-changes \u003cnumber\u003e                Number of changes allowed to a word\n                                        (default: 4)\n  --num-suggestions \u003cnumber\u003e            Number of suggestions (default: 8)\n  --no-include-ties                     Force the number of suggested to be\n                                        limited, by not including suggestions\n                                        that have the same edit cost.\n  --stdin                               Use stdin for input.\n  --repl                                REPL interface for looking up\n                                        suggestions.\n  -v, --verbose                         Show detailed output.\n  -d, --dictionary \u003cdictionary name\u003e    Use the dictionary specified. Only\n                                        dictionaries specified will be used.\n  --dictionaries \u003cdictionary names...\u003e  Use the dictionaries specified. Only\n                                        dictionaries specified will be used.\n  --no-color                            Turn off color.\n  --color                               Force color\n  -h, --help                            display help for command\n```\n\n\u003c!--- @@inject-end: static/help-suggestions.txt ---\u003e\n\n### Link\n\n`cspell link --help`:\n\n\u003c!--- @@inject: static/help-link.txt ---\u003e\n\n```\nUsage: cspell link [options] [command]\n\nLink dictionaries and other settings to the cspell global config.\n\nOptions:\n  -h, --help               display help for command\n\nCommands:\n  list|ls                  List currently linked configurations.\n  add|a \u003cdictionaries...\u003e  Add dictionaries any other settings to the cspell\n                           global config.\n  remove|r \u003cpaths...\u003e      Remove matching paths / packages from the global\n                           config.\n  help [command]           display help for command\n```\n\n\u003c!--- @@inject-end: static/help-link.txt ---\u003e\n\n## Versioning\n\nThe major version of `cspell-cli` tries to match the major version of `cspell`.\n\n`minor` and `patch` versioning goes up independently from `cspell`. Where possible, the `minor` version should match `cspell`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreetsidesoftware%2Fcspell-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstreetsidesoftware%2Fcspell-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstreetsidesoftware%2Fcspell-cli/lists"}