teemoji is a command-line tool inspired by the classic tee utility. Unlike tee, teemoji leverages a Core ML model to predict and prepend an appropriate emoji to each incoming line of text, adding a touch of fun and context to your command-line workflows.
- Emoji Prediction: Uses a Core ML model to intelligently select emojis based on the input text.
- Standard I/O Support: Reads from standard input and writes to both standard output and specified files.
- File Handling Options: Choose to append to existing files or overwrite them.
- Easy Integration: Seamlessly fits into your existing shell pipelines.
You can install teemoji via Homebrew:
brew install willswire/tap/teemojiteemoji works similarly to the standard tee command but with the added functionality of prepending emojis to each line.
Pipe the output of a command into teemoji to see emojis added to each line and simultaneously write to a file.
cat input.txt | teemoji output.txtUse the -a or --append flag to append the output to existing files instead of overwriting them.
cat input.txt | teemoji -a output.txt another.logGet help information about teemoji's options and usage.
teemoji --help-a,--append: Append to the given FILE(s), do not overwrite.-h,--help: Display help information.
Suppose you have a file named messages.txt and you want to log its contents with emojis:
cat messages.txt | teemoji --append log.txtThis command will read each line from messages.txt, prepend an emoji based on the content, display it on the terminal, and append it to log.txt.
If you're interested in contributing or building teemoji from source:
-
Clone the Repository:
git clone https://github.com/willswire/teemoji.git cd teemoji -
Build the Project:
Ensure you have Swift 6.0 and Xcode 15 installed.
just build
Distributed under the MIT License. See LICENSE for more information.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or feature requests.