From 7c0266e94378f6121719939c6d53915eb72eed3e Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Sep 2025 15:04:37 +0300 Subject: feat(hexai-action): add --infile/--outfile flags; docs and tests\n\n- Add flags to read from file and write to file\n- Refactor IO open into helper for testability\n- Add CLI integration-style test for IO\n- Update README and docs/usage.md with examples\n- Update docs/testing.md with instructions --- docs/usage.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'docs/usage.md') diff --git a/docs/usage.md b/docs/usage.md index c74ee7d..a5c5dca 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -102,3 +102,25 @@ hexai 'install ripgrep on macOS' # Verbose explanation hexai 'install ripgrep on macOS and explain' ``` + +## Hexai Action (TUI) + +`hexai-action` runs code actions over a selection or diagnostics+selection piped from stdin, or read from a file. + +- Choose an action with arrow keys, `j/k`, `g/G`, Enter, or hotkeys `[s] [r] [c] [t]`. +- Output is written to stdout by default, or to a file via `--outfile`. + +Input formats are the same as described in the README (inline instruction markers for rewrite; optional `Diagnostics:` header block). + +Examples + +```sh +# From stdin +cat input.go | hexai-action + +# From file to file +hexai-action --infile input.go --outfile output.go + +# Using shell redirection +hexai-action < input.go > output.go +``` -- cgit v1.2.3