choose
$ choose Community Low Riskchoose slices stdin or file lines by field index, range (1:3), or character offset (-c), supporting regex delimiters (-f), negative indexing (-1), and non-greedy matching (-n). It runs strictly read-only in pipelines with zero prompts.
brew install choose-rust In-process Unix pipeline field slicing with choose is sub-millisecond and needs no MCP server.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Deterministic non-interactive stdin/stdout filter with clean exit codes, though it outputs plain text rather than --json.
- Non-interactive pipeline filter with
-ifile input or stdin - No
--jsonoutput mode
Strictly read-only text slicing with zero disk writes, network calls, or credentials.
- Purely read-only stdin/file stream filter
Packaged via brew install choose-rust, cargo install choose, and GitHub release binaries across macOS, Linux, and Windows.
- Available on Homebrew, crates.io, and GitHub Releases
Replaces verbose cut and awk one-liners with intuitive negative indices (-1) and regex -f separators.
- Supports slices (
1:3), negative indices, and character mode (-c)
Established community Rust utility (theryangeary/choose) with low release churn.
- Stable GPL-3.0 repository on GitHub
Clear README examples and --help output documenting indexing and separator flags.
- Comprehensive flag reference in repository README
Security, Auth & Guardrails
None required; operates purely on stdin streams or readable local files.
100% free, offline, and open-source (GPL-3.0).
# choose Agent Rules - Remember `choose` uses 0-based indexing by default unless `--one-indexed` is passed. - Pass `-f` with single-quoted regexes when splitting on non-whitespace delimiters.
Agent-Ready Command Recipes
Safe Read-Only Queries
choose -f '[,;]' 0 -1 -i data.txt
Splits lines in data.txt by , or ; and prints the first (0) and last (-1) fields read-only.
ps aux | choose 0 1 10:
Selects user, PID, and the remaining command columns (10:) without brittle awk syntax.
Strengths for Agents
- + Strictly read-only with intuitive negative indices (
-1) and Python-like slices (1:3). - + Handles multi-space whitespace and regex delimiters (
-f) cleanly withoutcutquirks.
Caveats & Pitfalls
- ! No
--jsonoutput; emits plain text fields separated by-oor single spaces. - ! 0-based indexing differs from 1-based
cut/awkunless--one-indexedis specified.