Skip to content

Commit

Permalink
Replace 'agent fmt' with 'grafana-agent fmt' (#4244) (#4249)
Browse files Browse the repository at this point in the history
(cherry picked from commit 215ecaf)

Co-authored-by: Mischa Thompson <[email protected]>
  • Loading branch information
grafanabot and spartan0x117 authored Jun 23, 2023
1 parent 9606a16 commit 374ba33
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/sources/flow/reference/cli/fmt.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ title: grafana-agent fmt
weight: 100
---

# `agent fmt` command
# `grafana-agent fmt` command

The `agent fmt` command formats a given Grafana Agent Flow configuration file.
The `grafana-agent fmt` command formats a given Grafana Agent Flow configuration file.

## Usage

Usage: `agent fmt [FLAG ...] FILE_NAME`
Usage: `grafana-agent fmt [FLAG ...] FILE_NAME`

If the `FILE_NAME` argument is not provided or if the `FILE_NAME` argument is
equal to `-`, `agent fmt` formats the contents of standard input. Otherwise,
`agent fmt` reads and formats the file from disk specified by the argument.
equal to `-`, `grafana-agent fmt` formats the contents of standard input. Otherwise,
`grafana-agent fmt` reads and formats the file from disk specified by the argument.

The `--write` flag can be specified to replace the contents of the original
file on disk with the formatted results. `--write` can only be provided when
`agent fmt` is not reading from standard input.
`grafana-agent fmt` is not reading from standard input.

The command fails if the file being formatted has syntactically incorrect River
configuration, but does not validate whether Flow components are configured
Expand Down

0 comments on commit 374ba33

Please sign in to comment.