Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ultirequiem/yamlfmt
⚡ Blazing fast YAML formatter
https://github.com/ultirequiem/yamlfmt
cli formatter go go-formatter golang golang-application yaml
Last synced: 2 months ago
JSON representation
⚡ Blazing fast YAML formatter
- Host: GitHub
- URL: https://github.com/ultirequiem/yamlfmt
- Owner: UltiRequiem
- License: mit
- Created: 2021-09-07T01:03:35.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-09-28T02:08:03.000Z (3 months ago)
- Last Synced: 2024-10-04T12:46:55.637Z (3 months ago)
- Topics: cli, formatter, go, go-formatter, golang, golang-application, yaml
- Language: Go
- Homepage: https://pkg.go.dev/github.com/UltiRequiem/yamlfmt
- Size: 29.3 KB
- Stars: 28
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# YAMLFMT
[![Go Report Card](https://goreportcard.com/badge/github.com/UltiRequiem/yamlfmt)](https://goreportcard.com/report/github.com/UltiRequiem/yamlfmt)
[![Go Reference](https://pkg.go.dev/badge/github.com/UltiRequiem/yamlfmt/pkg.svg)](https://pkg.go.dev/github.com/UltiRequiem/yamlfmt/pkg)A simple and extensible [yaml](https://yaml.org) formatter.
## Installation
```bash
go install github.com/UltiRequiem/yamlfmt@latest
```You can also use the binaries from
[releases](https://github.com/UltiRequiem/yamlfmt/releases).## Usage
- To format one or more files and write to stdout:
```bash
yamlfmt a.yaml b.yaml c.yaml
```- To format one or more files in the replace mode:
```bash
yamlfmt -w a.yaml b.yaml c.yaml
```If you want to log the files that have been formatted, you can use the `-l`
flag also.- To format stdin and write to stdout:
```bash
cat a.yaml | yamlfmt
```- To format stdin and write to a file:
```bash
cat a.yaml | yamlfmt > b.yaml
```- To format every file in your current directory and subdirectories:
- Using `find`:
```bash
yamlfmt -w $(find -name "*.yaml")
```- Using `fd`:
```bash
yamlfmt -w $(fd -H -e yaml)
```## Editor Integration
### Neovim / Vim
```viml
au FileType yaml let &l:formatprg= "yamlfmt /dev/stdin"
```It can Probably integrate with others editors easily but I only use Neovim. If
you know how to integrate it with some other editor, please open a pull requests
or issue with the information.## Authors
[Eliaz Bobadilla](https://ultirequiem.com) - Creator and Maintainer 💪
See also the full list of
[contributors](https://github.com/UltiRequiem/yamlfmt/contributors) who
participated in this project ✨## Support
Open an Issue, I will check it a soon as possible 👀
If you want to hurry me up a bit
[send me a tweet](https://twitter.com/UltiRequiem) 😆Consider [supporting me on Patreon](https://patreon.com/UltiRequiem) if you like
my work 🙏Don't forget to star the repo ⭐
## Licence
Licensed under the MIT License 📄