Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Latest commit

 

History

History
50 lines (32 loc) · 1.87 KB

fmt.mdx

File metadata and controls

50 lines (32 loc) · 1.87 KB
layout page_title sidebar_title description
commands
Commands: Fmt
fmt
Rewrite waypoint.hcl configuration to a canonical format

This content is part of the legacy version of Waypoint that is no longer actively maintained. For additional information on the new vision of Waypoint, check out this blog post and the HCP Waypoint documentation.

Waypoint Fmt

Command: waypoint fmt

Rewrite waypoint.hcl configuration to a canonical format

@include "commands/fmt_desc.mdx"

Usage

Usage: waypoint fmt [options] [FILE]

Rewrite a waypoint.hcl file to a canonical format.

This only works for HCL-formatted Waypoint configuration files. JSON-formatted files do not work and will result in an error.

If FILE is not specified, then the current directory will be searched for a "waypoint.hcl" file. If FILE is "-" then the content will be read from stdin.

This command does not validate the waypoint.hcl configuration. This will work for older and newer configuration formats.

Global Options

  • -plain - Plain output: no colors, no animation. The default is false.
  • -app=<string> (-a) - App to target. Certain commands require a single app target for Waypoint configurations with multiple apps. If you have a single app, then this can be ignored.
  • -project=<string> (-p) - Project to target.
  • -workspace=<string> (-w) - Workspace to operate in.

Command Options

  • -write - Overwrite the input file. If this is false, the formatted output will be written to STDOUT. This has no effect when formatting from STDIN or when using the -check flag. The default is true.
  • -check - Check if the input is formatted. Exit status will be 0 if all input is properly formatted and exit status 3 otherwise. The default is false.

@include "commands/fmt_more.mdx"