Skip to main content

A CLI spelling assistant powered by AI

Project description

📝 Spelling & Grammar Assistant CLI

Python PyPI Status

A powerful command-line spelling and grammar assistant powered by Google Gemini AI

Showcase GIF


🚀 Quick Start

Prerequisites

Installation

# Universal install (works anywhere)
pip install cword

# Or development install
git clone https://github.com/baraa404/Terminal-Spelling-Assistant
cd spelling-cli
pip install .

Get API Key

Get your free API key from Google AI Studio

Start Using

# Fix spelling mistakes
cword misspeled
# → misspelled

# Fix spelling and grammar in sentences
cword This sentance has some erors in it and grammer mistakes.
# → This sentence has some errors in it and grammar mistakes.

💡 How to Use

🔧 First Time Setup

The first time you run the command, you'll be asked for your Google Gemini API key:

$ cword hello
Gemini API key not found. Please enter your API key.
You can get an API key from: https://makersuite.google.com/app/apikey
Enter your Gemini API key: [paste your key here]
API key saved successfully!
hello

✨ Basic Usage

# Fix simple spelling mistakes
cword definately
# → definitely

cword recieve  
# → receive

cword seperate
# → separate

cword accomodate
# → accommodate

# Fix spelling and grammar in sentences (no quotes needed)
cword I have recieved the documnt and it looks grate.
# → I have received the document and it looks great.

cword The commitee will meet on wendsday to discus the propsal.
# → The committee will meet on Wednesday to discuss the proposal.

# Grammar corrections
cword I are going to the store
# → I am going to the store

cword She don't like that movie
# → She doesn't like that movie

🎯 Smart Suggestions

When there are multiple possible corrections:

cword reed
# → (read - red - reed)

cword theres
# → (there's - theirs - there is)

🔄 API Key Management

# Reset your saved API key
cword --reset-api
# API key reset successfully. You'll be prompted for a new one next time.

💡 Pro Tips

  • Fast corrections: Just type cword followed by any word or sentence
  • Spelling & Grammar: Fixes both spelling mistakes and grammar errors automatically
  • Multiple words: cword misspelled sentence works perfectly
  • No quotes needed: Works with spaces automatically
  • Secure: Your API key is stored locally in ~/.config/spelling-cli/config.json
  • Offline safety: No data is stored remotely, only sent to Google's API for processing

✨ Features

  • 🤖 AI-Powered: Uses Google Gemini for intelligent spelling and grammar correction
  • 📝 Dual Purpose: Fixes both spelling mistakes and grammar errors
  • 🔐 Secure: API key stored locally and securely
  • Fast: Instant corrections from the command line
  • 🎯 Smart: Provides multiple suggestions for ambiguous words
  • 🛠️ Easy Setup: One-time API key configuration
  • 🔄 Flexible: Reset API key anytime

📋 Examples

Input Output Description
cword accomodate accommodate Spelling correction
cword occassion occasion Double letter fix
cword therefor (therefore - therefor) Multiple options
cword reccomend recommend Common misspelling
cword This is a grate sentance. This is a great sentence. Spelling + grammar
cword I are going home I am going home Grammar correction

🛠️ Development

Building from Source

# Install build tools
pip install build

# Build the package
python -m build

# Install locally for development
pip install -e .

Running Without Installation

# Run as module
python -m cword --help

# Or directly from source (development)
python src/cword/cli.py --help

🤝 Contributing

We welcome contributions! Here's how you can help:

  • 🐛 Report bugs
  • 💡 Suggest new features
  • 📝 Improve documentation
  • 🔧 Submit pull requests

Made with ❤️ by Baraa

⭐ Star this repo if you found it helpful!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cword-0.1.0.tar.gz (6.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cword-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file cword-0.1.0.tar.gz.

File metadata

  • Download URL: cword-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for cword-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4eaa5b7116f66462f1b1a259c0c1a8941a8213d1f7944379eee6ce8b87361259
MD5 e23db3d364e6705f4b56fbfd1e92d7bf
BLAKE2b-256 fcb47693a53a736e3349492905206e67478f9099a6663a8d525a396a9aa65622

See more details on using hashes here.

File details

Details for the file cword-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cword-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for cword-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 521d1444ab70646e3be75023f31dae8afb83f71cc7456bea7a55224982b3e022
MD5 bb4d094d3e7e11d5af1be3c08213d383
BLAKE2b-256 ef2d1c4c21b462773d34881fdc46dc8918aca687f5ca0d3c855484446283580d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page