climate
Version, currently 0.1.04 versions
- 0.2.2latestMar 8, 2023
- 0.2.1not indexedApr 23, 2025
- 0.2.0not indexedApr 23, 2025
- 0.1.0not indexedApr 23, 2025
github.com/Sija/climate.cr
Tiny tool to make your CLI output ๐ coloured
17 stars
0 dependents
License: MIT
Nothing has been indexed for 0.1.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
climate:
github: Sija/climate.cr
version: ~> 0.1.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
# climate.cr [](https://github.com/Sija/climate.cr/actions/workflows/ci.yml) [](https://github.com/Sija/climate.cr/releases) [](https://github.com/Sija/climate.cr/blob/master/LICENSE)
Small helper utility to make your CLI program output ๐ coloured by means
of configurable markup styles. Think of it as your CLI-mate :)
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
climate:
github: Sija/climate.cr
```
2. Run `shards install`
## Usage
```crystal
require "climate"
message = "Usage: {#{PROGRAM_NAME}} <required-arg> [optional-arg]"
# you can call `Climate.parse` method directly
puts Climate.parse(message)
# or use a `String#climatize` extension
puts message.climatize
```
### Defaults
Default styles are:
- `<>` colored in _green_ (keeping delimiters)
- `[]` colored in _yellow_ (keeping delimiters)
- `{}` colored in _blue_ (hiding delimiters)
- `!ยก` colored in _red_ (hiding delimiters)
### Configuration
You can change the global settings with a `#configure` block:
```crystal
Climate.configure do |settings|
# use defaults
settings.use_defaults!
# and/or configure your own styles
settings.styles << Climate::Style.new(
delimiters: {'?', 'ยฟ'},
keep_delimiters: false,
colors: {
fore: :magenta,
back: :default,
},
decoration: :bold
)
end
```
For the `colors` and `decoration` reference values see
documentation for the [`Colorize`](https://crystal-lang.org/api/Colorize.html)
module (which `Climate` uses under the hood).
## Contributing
1. Fork it (<https://github.com/Sija/climate.cr/fork>)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## Contributors
- [Sijawusz Pur Rahnama](https://github.com/Sija) - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Apr 23, 2025
- Commit
0db49c5332d8- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/Sija/climate.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 4