https://github.com/sergeysova/tomlcli.rs
Query over your toml
https://github.com/sergeysova/tomlcli.rs
Last synced: over 1 year ago
JSON representation
Query over your toml
- Host: GitHub
- URL: https://github.com/sergeysova/tomlcli.rs
- Owner: sergeysova
- License: mit
- Created: 2018-01-21T17:55:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-06T12:28:18.000Z (about 8 years ago)
- Last Synced: 2025-03-29T11:06:17.123Z (over 1 year ago)
- Language: Rust
- Homepage: https://docs.rs/tomlcli
- Size: 12.7 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tomlcli
[](https://crates.io/crates/tomlcli)
[](https://github.com/sergeysova/tomlcli/blob/master/LICENSE)
Pretty print and query TOML files
[](https://asciinema.org/a/158411)
## How to use
```bash
cargo install tomlcli
```
Next use `toml` or `tomlcli` binary.
```bash
# Pretty print contents of file
toml Cargo.toml
# Pretty print table
toml Cargo.toml package
# Print value in table
toml Cargo.toml package.name
# Print value in array
toml Cargo.toml package.keywords.0
# Print table in array
toml Cargo.lock package.0
# Print value in table in array
toml Cargo.lock package.0.name
```
## Todo
1. Pretty print table in field:
```toml
[[bin]]
name = "foo"
path = "./bar.rs"
```
2. Query fields with dot:
```toml
[example]
"foo.bar" = "example"
```
## License
Copyright (c) Sergey Sova. All rights reserved.
Licensed under the MIT license. See [LICENSE](https://github.com/sergeysova/tomlcli.rs/blob/master/LICENSE) file in the project root for details.