| Crates.io | slugomatic |
| lib.rs | slugomatic |
| version | 0.2.2 |
| created_at | 2025-07-04 15:14:39.57454+00 |
| updated_at | 2025-07-07 22:17:34.100149+00 |
| description | 🐌 A simple CLI tool to slugify and unslugify text, perfect for branch names and URLs |
| homepage | https://github.com/yoelrosenthal/slugomatic |
| repository | https://github.com/yoelrosenthal/slugomatic |
| max_upload_size | |
| id | 1738130 |
| size | 45,830 |
A simple and fast CLI tool to slugify and unslugify text, perfect for creating branch names, URLs, and file names.
--lowercase, --uppercase, or --titlecargo install slugomatic
git clone https://github.com/yoelrosenthal/slugomatic
cd slugomatic
cargo install --path .
# Convert text to slug
slug "Hello World"
# Output: Hello-World
# You may also echo text and pipe it (works if TEXT is omitted)
echo "My Feature Branch" | slug
# Output: My-Feature-Branch
# Most git branch names should be lowercase; see --lowercase below!
# For human-readable output you can use --title!
# Convert slug back to text
slug -u "hello-world"
# Output: hello world
slug --unslug "my-feature-branch"
# Output: my feature branch
echo "fix-user-authentication-bug" | slug -u
# Output: fix user authentication bug
# Disable automatic clipboard copy
slug --no-clipboard "Just show this"
# Default: preserves input capitalization
slug "Some Mixed Case Words"
# Output: Some-Mixed-Case-Words
# Force output to lowercase
slug "Some Text Here" --lowercase
# Output: some-text-here
slug -u "My-Feature-Branch" --lowercase
# Output: my feature branch
# Force output to uppercase
slug "Some Text Here" --uppercase
# Output: SOME-TEXT-HERE
slug -u "my-feature-branch" --uppercase
# Output: MY FEATURE BRANCH
# Title Case output:
slug "some mixed cAsE Words" --title
# Output: Some Mixed Case Words
# Perfect for Git branch names (commonly lowercase):
slug "Fix user authentication bug" --lowercase
# Output: fix-user-authentication-bug
# Title case for readability
slug -u "fix-user-authentication-bug" --title
# Output: Fix User Authentication Bug
# Works with special characters
slug "Add new feature (v2.0)!"
# Output: Add-new-feature-v20
### Slugify via stdin
# These both work the same:
slug "A new feature branch"
echo "A new feature branch" | slug
### Prevent copying to clipboard
slug "Text" --no-clipboard
echo "Another example" | slug --no-clipboard
-s, --slug: Explicitly slugify the input (default behavior)-u, --unslug: Unslugify the input (convert dashes to spaces)--no-clipboard: Do not copy the result to the clipboard (default is to copy)TEXT: The text to process; if omitted, reads from stdin--lowercase: Convert the result to all lowercase (mutually exclusive with --uppercase and --title)--uppercase: Convert the result to all uppercase (mutually exclusive with --lowercase and --title)--title: Convert the result to title case (each word starts uppercase, mutually exclusive with --lowercase and --uppercase)-h, --help: Show detailed help information, usage, and examples-V, --version: Show version informationTEXT, that is processed. If TEXT is omitted, input will be read from standard input (stdin).--no-clipboard to control this.--lowercase, --uppercase, or --title to convert. These options cannot be combined.slug --help for full usage details, including all options and examples.--lowercase, --uppercase, or --title is used.--lowercase, --uppercase, or --title to standardize output if desired.This project is licensed under either of
at your option.
Contributions are welcome! Please feel free to submit a Pull Request.