summaryrefslogtreecommitdiff
path: root/internal/cli/cli.go
AgeCommit message (Collapse)Author
2026-02-22Implement internal/cli package (task 352/cli)Paul Buetow
Full command dispatch, interactive shell loop, and all geheim commands mirroring the Ruby CLI class (geheim.rb lines 551-713). Key design points: - CLI struct holds all runtime deps; lastResult field enables Ruby-style fallback search term when a search command is given without an argument - dispatch → dispatchSimple (no-term commands) + dispatchSearch (term-based) kept under ~50 lines each per style guidelines - ActionOpen shreds the exported file immediately after opening, matching Ruby's shred_file(delay: 0) call - import implements Ruby's three-way dest_dir logic: nil→full src_path, contains-dot→literal dest, plain-dir→dir/basename(src) - completionFn notes $PIN limitation for description completion - openExported extends Ruby's OS detection with xdg-open, iTerm, Termux heuristics; comment documents the divergence from Ruby's evince default Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22Add Go project scaffold (task 352)Paul Buetow
- go.mod with module codeberg.org/snonux/geheim (go 1.22, mage dep) - Magefile.go with Build, Test, Install, Uninstall targets - cmd/geheim/main.go delegating to internal/cli - Stub packages: cli, version, config, crypto, git, store, clipboard, shell - go.sum generated; binary confirmed to build via mage build Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>