{"id":13413476,"url":"https://github.com/abhimanyu003/sttr","last_synced_at":"2025-05-15T21:04:40.457Z","repository":{"id":45271156,"uuid":"407875512","full_name":"abhimanyu003/sttr","owner":"abhimanyu003","description":"cross-platform, cli app to perform various operations on string","archived":false,"fork":false,"pushed_at":"2025-05-07T15:54:40.000Z","size":7456,"stargazers_count":1045,"open_issues_count":11,"forks_count":33,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-07T16:51:34.320Z","etag":null,"topics":["cli","cli-app","cli-tool","cli-utilities","decoding","developer-tools","devutils","encoding","encrypt","encryption-decryption","go","json","productivity","string","termux","termux-tool","transform","tui","tui-app","zeropad"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhimanyu003.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-09-18T14:00:40.000Z","updated_at":"2025-05-07T15:54:44.000Z","dependencies_parsed_at":"2024-04-19T18:28:43.191Z","dependency_job_id":"de233d94-8d7a-4dcf-ad94-e8132ed61d1b","html_url":"https://github.com/abhimanyu003/sttr","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhimanyu003%2Fsttr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhimanyu003%2Fsttr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhimanyu003%2Fsttr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhimanyu003%2Fsttr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhimanyu003","download_url":"https://codeload.github.com/abhimanyu003/sttr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254422754,"owners_count":22068678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cli-app","cli-tool","cli-utilities","decoding","developer-tools","devutils","encoding","encrypt","encryption-decryption","go","json","productivity","string","termux","termux-tool","transform","tui","tui-app","zeropad"],"created_at":"2024-07-30T20:01:41.241Z","updated_at":"2025-05-15T21:04:40.449Z","avatar_url":"https://github.com/abhimanyu003.png","language":"Go","funding_links":[],"categories":["Miscellaneous","Go","杂项","Microsoft Office","Strings","Applications"],"sub_categories":["Strings","字符串","Development Tools"],"readme":"![sttr](./media/banner.png)\n\n# sttr\n\n[Website](https://abhimanyu003.github.io/sttr/)\n| [Install](https://github.com/abhimanyu003/sttr#battery-installation)\n| [Getting Started](https://github.com/abhimanyu003/sttr#books-guide)\n| [CLI Reference](https://abhimanyu003.github.io/sttr/cli/sttr/)\n| [Source Code](https://github.com/abhimanyu003/sttr)\n\n`sttr` is command line software that allows you to quickly run various transformation operations on the string.\n\n```shell\n// With input prompt\nsttr\n\n// Direct input\nsttr md5 \"Hello World\"\n\n// File input\nsttr md5 file.text\nsttr base64-encode image.jpg\n\n// Reading from different processor like cat, curl, printf etc..\necho \"Hello World\" | sttr md5\ncat file.txt | sttr md5\n\n// Writing output to a file\nsttr yaml-json file.yaml \u003e file-output.json\n```\n\n# :movie_camera: Demo\n\n![sttr demo](./media/demo.gif)\n\n# :battery: Installation\n\n#### Quick install\n\nYou can run the below `curl` to install it somewhere in your PATH for easy use. Ideally it will be installed at `./bin`\nfolder\n\n```shell\ncurl -sfL https://raw.githubusercontent.com/abhimanyu003/sttr/main/install.sh | sh\n```\n\n#### Homebrew\n\nIf you are on macOS and using Homebrew, you can install `sttr` with the following:\n\n```shell\nbrew install abhimanyu003/sttr/sttr\n```\n\n#### Snap\n\n```shell\nsudo snap install sttr\n```\n\n#### Arch Linux\n\n```shell\nyay -S sttr-bin\n```\n\n#### Docker\n\n```shell\ndocker run -it --rm -e TERM=xterm-256color ghcr.io/abhimanyu003/sttr:latest \n```\n\u003e You can use docker image in your project from `ghcr.io/abhimanyu003/sttr:latest`\n\n\n#### Winget\n\n```shell\nwinget install -e --id abhimanyu003.sttr\n```\n\n#### Scoop\n\n```shell\nscoop bucket add sttr https://github.com/abhimanyu003/scoop-bucket.git\nscoop install sttr\n```\n\n#### X-CMD\n\nIf you are a user of [x-cmd](https://x-cmd.com), you can run:\n\n```shell\nx install sttr\n```\n\n#### Webi\n\n**macOS / Linux**\n\n```shell\ncurl -sS https://webi.sh/sttr | sh\n```\n\n**Windows**\n\n```shell\ncurl.exe https://webi.ms/sttr | powershell\n```\n\nSee [here](https://webinstall.dev/sttr/)\n\n#### Go\n\n```shell\ngo install github.com/abhimanyu003/sttr@latest\n```\n\n#### Binary\n\n**MacOS**\n[Binary](https://github.com/abhimanyu003/sttr/releases/latest/download/sttr_Darwin_all.tar.gz) ( Multi-Architecture )\n\n**Linux (Binaries)**\n[amd64](https://github.com/abhimanyu003/sttr/releases/latest/download/sttr_Linux_x86_64.tar.gz) | [arm64](https://github.com/abhimanyu003/sttr/releases/latest/download/sttr_Linux_arm64.tar.gz) | [i386](https://github.com/abhimanyu003/sttr/releases/latest/download/sttr_Linux_i386.tar.gz)\n\n**Windows (Exe)**\n[amd64](https://github.com/abhimanyu003/sttr/releases/latest/download/sttr_Windows_x86_64.zip) | [arm64](https://github.com/abhimanyu003/sttr/releases/latest/download/sttr_Windows_arm64.zip) | [i386](https://github.com/abhimanyu003/sttr/releases/latest/download/sttr_Windows_i386.zip)\n\n**FreeBSD (Binaries)**\n[amd64](https://github.com/abhimanyu003/sttr/releases/latest/download/sttr_Freebsd_x86_64.tar.gz) | [arm64](https://github.com/abhimanyu003/sttr/releases/latest/download/sttr_Freebsd_arm64.tar.gz) | [i386](https://github.com/abhimanyu003/sttr/releases/latest/download/sttr_Freebsd_i386.tar.gz)\n\n#### Manually\n\nDownload the pre-compiled binaries from the [Release!](https://github.com/abhimanyu003/sttr/releases) page and copy them\nto the desired location.\n\n# :books: Guide\n\n* After installation simply run `sttr` command.\n\n```shell\n// For interactive menu\nsttr\n// Provide your input\n// Press two enter to open operation menu\n// Press `/` to filter various operations.\n// Can also press UP-Down arrows select various operations.\n```\n\n* Working with help.\n\n```shell\nsttr -h\n\n// Example\nsttr zeropad -h\nsttr md5 -h\n```\n\n* Working with files input.\n\n```shell\nsttr {command-name} {filename}\n\nsttr base64-encode image.jpg\nsttr md5 file.txt\nsttr md-html Readme.md\n```\n\n* Writing output to file.\n\n```shell\nsttr yaml-json file.yaml \u003e file-output.json\n```\n\n* Taking input from other command.\n\n```shell\ncurl https://jsonplaceholder.typicode.com/users | sttr json-yaml\n```\n\n* Chaining the different processor.\n\n```shell\nsttr md5 hello | sttr base64-encode\n\necho \"Hello World\" | sttr base64-encode | sttr md5\n```\n\n# :boom: Supported Operations\n\n#### Encode/Decode\n\n- [x] **ascii85-encode** - Encode your text to Ascii85\n- [x] **ascii85-decode** - Decode your Ascii85 text\n- [x] **base32-decode** - Decode your Base32 text\n- [x] **base32-encode** - Encode your text to Base32\n- [x] **base64-decode** - Decode your Base64 text\n- [x] **base64-encode** - Encode your text to Base64\n- [x] **base85-encode** - Encode your text to Base85\n- [x] **base85-decode** - Decode your Base85 text\n- [x] **base64url-decode** - Decode your Base64 URL\n- [x] **base64url-encode** - Encode your text to URL\n- [x] **html-decode** - Unescape your HTML\n- [x] **html-encode** - Escape your HTML\n- [x] **rot13-encode** - Encode your text to ROT13\n- [x] **url-decode** - Decode URL entities\n- [x] **url-encode** - Encode URL entities\n- [x] **morse-decode** - Decode your Morse code\n- [x] **morse-encode** - Encode your text to Morse code\n\n#### Hash\n\n- [x] **bcrypt** - Get the bcrypt hash of your text\n- [x] **md5** - Get the MD5 checksum of your text\n- [x] **sha1** - Get the SHA1 checksum of your text\n- [x] **sha256** - Get the SHA256 checksum of your text\n- [x] **sha512** - Get the SHA512 checksum of your text\n\n#### String\n\n- [x] **camel** - Transform your text to camelCase\n- [x] **kebab** - Transform your text to kebab-case\n- [x] **lower** - Transform your text to lower case\n- [x] **pascal** - Transform your text to PascalCase\n- [x] **reverse** - Reverse Text ( txeT esreveR )\n- [x] **slug** - Transform your text to slug-case\n- [x] **snake** - Transform your text to snake_case\n- [x] **title** - Transform your text to Title Case\n- [x] **upper** - Transform your text to UPPER CASE\n\n#### Lines\n\n- [x] **count-lines** - Count the number of lines in your text\n- [x] **reverse-lines** - Reverse lines\n- [x] **shuffle-lines** - Shuffle lines randomly\n- [x] **sort-lines** - Sort lines alphabetically\n- [x] **unique-lines** - Get unique lines from list\n\n#### Spaces\n\n- [x] **remove-spaces** - Remove all spaces + new lines\n- [x] **remove-newlines** - Remove all new lines\n\n#### Count\n\n- [x] **count-chars** - Find the length of your text (including spaces)\n- [x] **count-lines** - Count the number of lines in your text\n- [x] **count-words** - Count the number of words in your text\n\n#### RGB/Hex\n\n- [x] **hex-rgb** - Convert a #hex-color code to RGB\n- [x] **hex-encode** - Encode your text Hex\n- [x] **hex-decode** - Convert Hexadecimal to String\n\n#### JSON\n\n- [x] **json** - Format your text as JSON\n- [x] **json-escape** - JSON Escape\n- [x] **json-unescape** - JSON Unescape\n- [x] **json-yaml** - Convert JSON to YAML text\n- [x] **json-msgpack** - Convert JSON to MSGPACK\n- [x] **msgpack-json** - Convert MSGPACK to JSON\n\n#### YAML\n\n- [x] **yaml-json** - Convert YAML to JSON text\n\n#### Markdown\n\n- [x] **markdown-html** - Convert Markdown to HTML\n\n#### Extract\n\n- [x] **extract-emails** - Extract emails from given text\n- [x] **extract-ip** - Extract IPv4 and IPv6 from your text\n- [x] **extract-urls** - Extract URLs your text ( we don't do ping check )\n\n#### Other\n\n- [x] **escape-quotes** - escape single and double quotes from your text\n- [x] **completion** - generate the autocompletion script for the specified shell\n- [x] **interactive** - Use sttr in interactive mode\n- [x] **version** - Print the version of sttr\n- [x] **zeropad** - Pad a number with zeros\n- [x] **and adding more...**\n\n# Featured On\n\nThese are the few locations where `sttr` was highlighted, many thanks to all of you. \nPlease feel free to add any blogs/videos you may have made that discuss `sttr` to the list.\n\n* [YouTube: The Giants of Open Source - DevOps Paradox](https://youtu.be/4nFRKbY_HVE?t=2529?ref=abhimanyu003/sttr)\n* [Terminal Trove - Tool of the Week](https://terminaltrove.com/sttr/?ref=abhimanyu003/sttr)\n* [nixCraft](https://www.cyberciti.biz/open-source/sttr-awesome-linux-unix-command-tool-for-transformation-string/?ref=abhimanyu003/sttr)\n\n# Contribution\n\nThis project welcomes your PR and issues. For example, refactoring, adding features, correcting English, etc.\n\nA quick development guide can be found\non. [Developer-Guides](https://github.com/abhimanyu003/sttr/wiki/Developer-Guides) wiki page.\n\nIf you need any help, you can contact me on [Twitter](https://twitter.com/abhimanyu003).\n\nThanks to all the people who already contributed!\n\n\u003ca href=\"https://github.com/abhimanyu003/sttr/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contributors-img.web.app/image?repo=abhimanyu003/sttr\" /\u003e\n\u003c/a\u003e\n\n# License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhimanyu003%2Fsttr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhimanyu003%2Fsttr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhimanyu003%2Fsttr/lists"}