Examples
EN

Tools & Completion

Utility tools for content management and shell completion

Hwaro includes utility tools for content management and shell completion scripts for a better CLI experience.

Tool Commands

The hwaro tool command provides utility subcommands for working with content files.

Subcommand Description
convert Convert frontmatter between TOML, YAML, and JSON formats
list List content files by status
check-links Check for dead links in content files
stats Show content statistics
validate Validate content frontmatter and markup
unused-assets Find unreferenced static files
urls Preview the URLs a build would publish
platform Generate hosting platform config files
import Import content from various platforms
export Export content to other platforms
agents-md Generate or update AGENTS.md file

Configuration, template, and structure checks run through the top-level hwaro doctor command.


Shell Completion

Hwaro can generate completion scripts for your shell, providing tab completion for commands, subcommands, and flags.

Supported Shells

Shell Command
Bash hwaro completion bash
Zsh hwaro completion zsh
Fish hwaro completion fish

Installation

Bash

Add to your ~/.bashrc:

eval "$(hwaro completion bash)"

This works with Bash's built-in completion; the optional bash-completion package is not required. At a subcommand prompt, type - to complete command flags (for example, hwaro tool --<TAB>).

Or save to a file:

hwaro completion bash > /etc/bash_completion.d/hwaro

Zsh

Add this to your ~/.zshrc after initializing completion with compinit:

eval "$(hwaro completion zsh)"

Alternatively, save the script as _hwaro:

mkdir -p ~/.zsh/completions
hwaro completion zsh > ~/.zsh/completions/_hwaro

Add the directory to fpath before initializing completion in ~/.zshrc:

fpath=(~/.zsh/completions $fpath)
autoload -Uz compinit && compinit

Fish

Add to your ~/.config/fish/config.fish:

hwaro completion fish | source

Or save to the completions directory:

hwaro completion fish > ~/.config/fish/completions/hwaro.fish

What Gets Completed

The completion scripts provide tab completion for:

Automatic Updates

Completion scripts are generated dynamically from command metadata. When you update Hwaro to a new version with new commands or flags, regenerating the completion script will automatically include them.

# Regenerate after updating hwaro
eval "$(hwaro completion bash)"

See Also

In this section