mg is a high-speed, command-line tool written in Rust that helps you improve your writing. It parses text files to detect and highlight common stylistic issues, such as weasel words, passive voice, duplicate words, and spelling errors.

- Weasel Word Detection: Flags words that are ambiguous and weaken your statements (e.g., "many", "extremely", "very").
- Passive Voice Detection: Identifies sentences written in the passive voice, helping you write in a more direct and active style.
- Duplicate Word Check: Catches accidental word repetitions (e.g., "the the").
- Spelling Check: Points out common spelling mistakes.
- Colored Output: Uses terminal colors to clearly distinguish suggestions and errors.
To use mg, you need to have Rust and Cargo installed on your system. If you don't have them, you can install them from rustup.rs.
-
Clone the repository:
git clone https://github.com/Eeman1113/mg.git cd mg -
Build the project: For the best performance, build the project in release mode.
cargo build --release
-
Install the binary (Optional): To make the
writing-checkerbinary available anywhere in your system, you can install it using Cargo:cargo install --path .
The tool is run from your terminal. The binary name is writing-checker.
If you installed it using cargo install, you can run it directly:
writing-checker <path/to/your/file.txt>If you built it with cargo build, you can run it through Cargo:
cargo run --release -- <path/to/your/file.txt>
cargo run --release -- test.txtLet's say you have a file named mydoc.txt with the following content:
This is a very interesting document. A solution was discovered by the the team. Many people agree that this is quite significant.
Run the checker on this file:
writing-checker mydoc.txtThe output will look something like this, with colors highlighting the issues:
---------------------
PASSIVE VOICE
---------------------
A solution was discovered by the the team.
---------------------
WEASEL WORDS
---------------------
This is a very interesting document.
Many people agree that this is quite significant.
---------------------
DUPLICATE WORDS
---------------------
A solution was discovered by the the team.
Contributions are welcome! If you have suggestions for new features, improvements, or bug fixes, feel free to open an issue or submit a pull request.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for more details.