Steve Yegge
012bed1068
Fix GH#367: bd import defaulting to stdin is confusing
Changes:
1. Add TTY detection to bd import - prevents silent hang when run
interactively without arguments. Shows helpful usage message instead.
2. Fix misleading error messages - change "Run 'bd import'" to
"Run 'bd sync --import-only'" or explicit file path throughout.
Technical details:
- Added golang.org/x/term dependency for IsTerminal()
- When stdin is a TTY and no -i flag: show usage and exit
- When stdin is piped: works as before (supports script pipelines)
- Preserved all legitimate stdin uses:
* python gh2jsonl.py --repo owner/repo | bd import
* python md2jsonl.py feature.md | bd import
* git show HEAD:.beads/beads.jsonl | bd import -i /dev/stdin
Updated error messages in:
- cmd/bd/staleness.go - main "out of sync" error
- cmd/bd/sync.go - merge completion suggestions
- internal/rpc/server_export_import_auto.go - daemon warnings
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 11:15:34 -08:00
..
2025-11-21 14:57:18 -05:00
2025-11-07 21:21:24 -08:00
2025-11-21 19:21:05 -05:00
2025-11-21 14:40:22 -05:00
2025-10-24 19:49:16 -07:00
2025-10-21 22:44:45 -07:00
2025-11-21 14:48:41 -05:00
2025-11-21 14:48:41 -05:00
2025-11-02 09:56:42 -08:00
2025-11-02 09:56:42 -08:00
2025-10-20 21:08:49 -07:00
2025-11-21 22:17:26 -05:00
2025-11-21 14:48:41 -05:00
2025-11-07 14:21:14 -08:00
2025-11-07 09:49:12 -08:00
2025-11-23 11:15:34 -08:00
2025-11-21 22:17:26 -05:00
2025-11-07 14:21:14 -08:00
2025-11-20 08:13:06 -08:00
2025-11-07 09:49:12 -08:00
2025-11-21 19:21:05 -05:00
2025-11-06 19:51:16 -08:00
2025-10-20 21:08:49 -07:00
2025-10-20 21:08:49 -07:00
2025-11-21 14:48:41 -05:00
2025-11-20 21:57:23 -05:00
2025-10-20 21:08:49 -07:00
2025-10-20 21:08:49 -07:00
2025-11-21 14:57:18 -05:00