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 YAML and TOML 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 |
| doctor | Diagnose config, template, and structure issues |
| platform | Generate hosting platform config files |
| import | Import content from various platforms |
| export | Export content to other platforms |
| ci | Generate CI/CD workflow files |
| agents-md | Generate or update AGENTS.md file |
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)"
Or save to a file:
hwaro completion bash > /etc/bash_completion.d/hwaro
Zsh
Add to your ~/.zshrc:
eval "$(hwaro completion zsh)"
Or save to your fpath:
hwaro completion zsh > ~/.zsh/completions/_hwaro
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:
- Commands:
hwaro <TAB>→init,build,serve,new,deploy,tool,completion - Subcommands:
hwaro tool <TAB>→convert,list,stats,validate,export, etc. - Flags:
hwaro build <TAB>→--output,--drafts,--minify, etc. - Positional arguments:
hwaro completion <TAB>→bash,zsh,fish - Positional choices:
hwaro tool convert <TAB>→to-yaml,to-toml
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
- CLI — Full CLI command reference
- Configuration — Site configuration
- Build Hooks — Custom build commands