| Crates.io | emoji-remover |
| lib.rs | emoji-remover |
| version | 0.1.0 |
| created_at | 2025-10-11 15:00:13.971823+00 |
| updated_at | 2025-10-11 15:00:13.971823+00 |
| description | A fast command-line tool to remove emojis from source code files |
| homepage | https://github.com/jamiepine/emoji-remover |
| repository | https://github.com/jamiepine/emoji-remover |
| max_upload_size | |
| id | 1878279 |
| size | 459,398 |
A command-line/pre-commit tool to remove emojis from code files.
Because your code deserves better than AI-generated emoji spam. Built with Rust for blazing-fast emoji annihilation.
.gitignore files by defaultcargo install emoji-remover
Download the latest release from the releases page.
# Remove emojis from a single file
emoji-remover path/to/file.rs
# Remove emojis from an entire directory
emoji-remover path/to/project/
# Dry run - see what would be removed without making changes
emoji-remover --dry-run path/to/project/
# Process specific file extensions only
emoji-remover --extensions "rs,js,ts" path/to/project/
# Ignore .gitignore files
emoji-remover --no-ignore path/to/project/
# Quiet mode - only show files with changes
emoji-remover --quiet path/to/project/
Create .git/hooks/pre-commit in your repository:
#!/bin/bash
echo "Running emoji remover..."
# Get list of staged files
FILES=$(git diff --cached --name-only --diff-filter=ACM)
if [ -n "$FILES" ]; then
# Run emoji-remover on staged files only
echo "$FILES" | xargs emoji-remover --quiet
# Re-add the modified files
echo "$FILES" | xargs git add
fi
exit 0
Then make it executable:
chmod +x .git/hooks/pre-commit
The repository includes an installation script:
# Clone and build
git clone https://github.com/jamiepine/emoji-remover.git
cd emoji-remover
cargo build --release
# Install as pre-commit hook in your project
cd /path/to/your/project
/path/to/emoji-remover/install-pre-commit.sh
-d, --dry-run Perform a dry run without modifying files
-e, --extensions File extensions to process (comma-separated)
-q, --quiet Quiet mode - only show files with changes
--no-ignore Don't respect .gitignore files
-h, --help Print help
By default, emoji-remover processes files with these extensions:
rs, js, ts, jsx, tsx, py, java, c, cpp, h, hpp, go, rb, php, cs, swift, kt, scala, md, txt
The emoji data used by this tool is sourced from Emoji-List-Unicode, which provides a comprehensive list of emojis from the Unicode official website.
The tool includes:
all-emoji.jsonfull-emoji-modifiers.jsonThe emoji data is processed at compile time using a Rust build script (build.rs). This approach:
.gitignore handling via the ignore crateMIT License - see LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.