https://github.com/broothie/kase
Convert from one case to another
https://github.com/broothie/kase
case casing cli conventions
Last synced: 11 months ago
JSON representation
Convert from one case to another
- Host: GitHub
- URL: https://github.com/broothie/kase
- Owner: broothie
- License: mit
- Created: 2022-10-20T04:59:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-23T02:30:51.000Z (over 3 years ago)
- Last Synced: 2025-03-26T18:43:41.811Z (12 months ago)
- Topics: case, casing, cli, conventions
- Language: Rust
- Homepage: https://crates.io/crates/kase
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `kase`
Convert from one case to another. Input case is determined on a best-guess basis, but can be overridden with the --from flag.
## Installation
```shell script
cargo install kase
```
## Usage
### Example
```console
$ kase snake MyVariable
my_variable
$ kase screaming-snake my_variable
MY_VARIABLE
$ kase kebab MY_VARIABLE
my-variable
$ kase path my-variable
my/variable
$ kase dot my/variable
my.variable
$ kase camel my.variable
myVariable
$ kase pascal myVariable
MyVariable
$ # If the best-guess for an input isn't right for your use case, you can use the `--from` flag:
$ kase dot my_dir/my_path
my.dir/my.path
$ kase --from path dot my_dir/my_path
my_dir.my_path
```
### Options
```console
$ kase -h
Convert from one case to another. Input case is determined on a best-guess basis, but can be overridden with the --from flag.
Usage: kase [OPTIONS] [INPUT]
Arguments:
Case to convert to [possible values: snake, screaming-snake, kebab, path, dot, camel, pascal, lower]
[INPUT] String to convert; if empty, reads from stdin
Options:
-f, --from Case to convert from, if best-guess isn't working [possible values: snake, screaming-snake, kebab, path, dot, camel, pascal, lower]
--debug Debug mode
-h, --help Print help information
-V, --version Print version information
```