feat: add native mcfly import support#2847
feat: add native mcfly import support#2847zampierilucas wants to merge 1 commit intoatuinsh:mainfrom
Conversation
3314a3b to
f3ea0cc
Compare
|
Hi @ellie, |
|
Apologies - I've been sick and had a lot on recently so have prioritized reviewing + releasing work either from prior contributors, or for PRs that are easier to review. We've had a bunch of issues from importer related PRs in the past, so these tend to need extra scrutiny. Anyway. This generally looks good, but I'd prefer that we dropped the requirement on mcfly. If we could directly read the database that would be perfect! I would also accept reading the output of mcfly dump, without automatically running it. Some users might have workflows where they have the data, but do not have the binary in their path. |
f3ea0cc to
1837fd5
Compare
Adds direct SQLite database import support for mcfly shell history. Reads from mcfly's history.db without requiring mcfly binary in PATH. Implementation: - Direct SQLite database access via sqlx - Cross-platform database path detection - Imports complete command history from commands table - Session ID mapping with UUID generation - Hostname support with username information - Custom database file path support via --file option - Full test coverage with real database validation Database locations: - ~/.mcfly/history.db (legacy) - ~/.local/share/mcfly/history.db (XDG default) - $XDG_DATA_HOME/mcfly/history.db - ~/Library/Application Support/McFly/history.db (macOS) - %LOCALAPPDATA%\McFly\data\history.db (Windows) Usage: atuin import mcfly [--file <path>] 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Lucas Zampieri <lzampier@redhat.com>
1837fd5 to
24a84b0
Compare
|
Hi @ellie, hope you are doing better. I've followed your suggestion a re-did the import from the db, instead of requiring the mcfly binary to dump as json, and It's pretty nice as now it preserves most of the mcfly metadata, and also allow to just specify |
Description
This PR adds native import support for mcfly shell history, allowing users to migrate their mcfly history to Atuin with a single command:
atuin import mcflyImplementation
The implementation directly accesses mcfly's SQLite database without requiring the mcfly binary to
be in PATH.
commandstable including timestamps, exitcodes, working directories, and session information
zsh-histdbimport)Testing
Overall, this is a much better implementation than the previous dump and import approach, as it preserves the mcfly metadata as well.