feat: wire up --version and fail gracefully without a TTY - #20
Merged
Conversation
--version was never enabled, so it was absent from --help and errored out. Bare `irona` with no TTY died with a raw "No such device or address (os error 6)" from enable_raw_mode; now it explains the problem and points at --clean and --mcp, which both still work headless. README documents all three modes, the full flag set, the MCP tool schemas, and fixes the Claude Code Stop hook example to the real settings.json shape. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small CLI gaps plus the doc update for headless/MCP.
--version#[command(version)]was never set, so--versionerrored and was absent from--help. Nowirona --versionprintsirona 0.5.0.No-TTY failure
Bare
ironain a pipe or CI job calledenable_raw_mode()and died withNo such device or address (os error 6). Now it checks stdin/stdout up front and exits1with:The check sits after the
--mcpand--cleanbranches, so both headless modes still run fine without a TTY (verified by piping each).README
PATH, default.readOnlyHint/destructiveHintannotations, and thatscan_artifactsincludes gitignore-only matches (opposite of--clean's default)claude mcp add irona -- irona --mcpStophook example, which used a flat{"command": ...}that the real settings.json schema does not acceptTesting
83 tests pass (4 new: version flag, TTY precondition matrix, hint content). fmt and clippy clean.