https://github.com/purplebooth/readable-name-generator
Generates readable names for things like throwaway infrastructure (Mirror)
https://github.com/purplebooth/readable-name-generator
docker shell-script utils
Last synced: 3 months ago
JSON representation
Generates readable names for things like throwaway infrastructure (Mirror)
- Host: GitHub
- URL: https://github.com/purplebooth/readable-name-generator
- Owner: PurpleBooth
- License: cc0-1.0
- Created: 2019-11-08T21:09:33.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-04-12T19:30:05.000Z (about 1 year ago)
- Last Synced: 2025-04-15T10:11:18.285Z (about 1 year ago)
- Topics: docker, shell-script, utils
- Language: Rust
- Homepage: https://codeberg.org/PurpleBooth/readable-name-generator/
- Size: 860 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Readable Name Generator
Generate a readable name for throwaway infrastructure
## Usage
### Basic Usage
``` shell,script(name="random_name")
readable-name-generator
```
``` shell,skip()
capable_munson
```
### Reproducing names
``` shell,script(name="running")
readable-name-generator --initial-seed 1
```
``` shell,verify(script_name="running")
flexible_briseglace
```
### Changing the separator
``` shell,script(name="seperator")
readable-name-generator --initial-seed 1 --separator "###"
```
``` shell,verify(script_name="seperator")
flexible###briseglace
```
### Randomized Suffix
You can further reduce the chance of a collision by suffixing a random number
``` shell,script(name="seperator")
readable-name-generator --initial-seed 1 --suffix
```
``` shell,verify(script_name="seperator")
vivacious_demibold8
```
### Full usage
``` shell,script(name="help")
readable-name-generator --help
```
``` shell,verify(script_name="help")
Generate a readable name for throwaway infrastructure
Usage: readable-name-generator [OPTIONS]
Options:
-s, --separator
The separator to use [env: READABLE_NAME_GENERATOR_SEPARATOR=] [default: _]
-n, --suffix
Suffix a random number to prevent collisions [env: READABLE_NAME_GENERATOR_SUFFIX=]
-i, --initial-seed
Use a known seed to generate the readable name for repeatability [env:
READABLE_NAME_GENERATOR_INITIAL_SEED=]
-c, --completion-shell
Generate completion for your shell [env: COMPLETION_SHELL=] [possible values: bash,
elvish, fish, powershell, zsh]
-h, --help
Print help
-V, --version
Print version
```
### Docker
We also have a docker image
``` shell,skip()
docker run --rm -it ghcr.io/purplebooth/readable-name-generator:latest -i 1
```
``` shell,skip()
flexible_briseglace
```
## Installing
Download the [latest
release](https://codeberg.org/PurpleBooth/readable-name-generator/releases)
and run it. I install it with homebrew. Or you could use docker.
### Binaries
Binaries for Windows, Linux and MacOS are available on the [releases
page](https://codeberg.org/PurpleBooth/readable-name-generator/releases/latest)
### Packages
Packages are available for various platforms, including Debian, Arch Linux, RPM-based distributions, Alpine, and Docker.
You can access them on the [packages page](https://codeberg.org/PurpleBooth/readable-name-generator/packages).
Additionally, a Homebrew repository is provided:
``` shell,skip()
brew install PurpleBooth/repo/readable-name-generator
```
## Development
### Testing
To run the tests, run
``` shell,skip()
just test
```
To run the end-to-end tests, run
``` shell,skip()
just specdown
```
### Automatic Code Formatting
To automatically tidy up the code in whatever way possible run
``` shell,skip()
just fmt
```
### Building docker
We have a docker container
``` shell,skip()
docker build -t "codeberg.org/purplebooth/readable-name-generator:latest"
docker run --rm -it codeberg.org/purplebooth/readable-name-generator:latest -i 1
```
``` shell,skip()
flexible_briseglace
```
## License
[CC0 1.0 Universal](LICENSE.md).