Files
hx/README.md
T
hermes 89c9833e43
ci / check (push) Canceled after 0s
M2: interactive TUI, config, model switching, compaction
- hx-tui: ratatui app with streaming transcript, markdown-ish rendering, tool call status,
  colored edit diffs, collapsible bash/read output (ctrl-o), scrollback, spinner + footer (provider, model, ctx, tokens)
- editor: multi-line, history, word/line kill, bracketed paste, @file fuzzy tab completion; mentioned files attached
- message queue while agent runs; esc/ctrl-c abort; /model /provider /compact /clear /help /quit; resumed history shown
- hx-core: compaction (summarize older prompts, keep recent verbatim, session rebase keeps full file history),
  auto-compact at threshold; abort only ends current run
- config: ~/.hx/config.toml + project .hx/config.toml (provider, per-provider models, compact_at, max_tokens, system_prompt)
- API-equivalent cost estimate in exit summary
- tests/tui_smoke.py drives the real TUI in a pty against the fake API

Closes #15, closes #16, closes #17, closes #18, closes #19
2026-09-30 10:37:56 +00:00

34 lines
1.4 KiB
Markdown

# hx
Minimal Rust coding agent. Uses your existing subscriptions, no API keys.
```sh
cargo build --release
hx login claude # Claude Pro/Max
hx login codex # ChatGPT Plus/Pro
hx # interactive TUI
hx -p "hello" # one-shot, Claude
hx --provider codex -p "hello" # one-shot, Codex
hx -c # continue last session in this directory
```
TUI: `enter` send, `alt-enter`/`ctrl-j` newline, `esc` abort, `ctrl-o` expand tool output, `tab` completes `@file`
(mentioned files are attached), `pgup`/`pgdn` scroll. Commands: `/model <name>`, `/provider claude|codex`,
`/compact`, `/clear`, `/quit`. Messages typed while the agent works are queued.
Config: `~/.hx/config.toml`, overridden per project by `.hx/config.toml`:
```toml
provider = "claude" # or "codex"
claude_model = "claude-sonnet-4-5"
codex_model = "gpt-5-codex"
compact_at = 150000 # auto-compact threshold (estimated tokens)
max_tokens = 16384
# system_prompt = "..." # replaces built-in prompt; AGENTS.md still appended
```
Existing Claude Code (`~/.claude/.credentials.json`) and Codex CLI (`~/.codex/auth.json`) logins are picked up automatically.
Credentials are stored in `~/.hx/auth.json` (mode 0600) and refreshed automatically.
On a headless box, open the printed URL elsewhere and paste the final redirect URL back into the terminal.