This is a simple tool to find typos in a text file. It uses OpenAI to check for typos and suggests corrections.
- This tool is not perfect and may not catch all typos. Develop it for fun and learning purposes.
- It uses OpenAI API, please be aware of the cost of using it.
- suggest to install it globally
npm install -g notypos
- add your OpenAI API key to your environment variables
export NOTYPOS_MODEL="model-name" // default is "gpt-3.5-turbo"
export NOTYPOS_API_KEY="api-key"
export NOTYPOS_BASE_URL="base-url" // default is "https://api.openai.com/v1"
Personally, I suggest to add it permanently. Like adding it to the end of ~/.zshrc
file at macOS, and use source ~/.zshrc
to apply the changes.
or create a .env.notypos
file in the root of the project with above variables. Don't forget to add the .env.notypos
file to your .gitignore
file.
- then run it with the path to the file you want to check
notypos README.md