|
| 1 | +# graftx |
| 2 | + |
| 3 | +A TUI file manager that accelerates file copying between repositories. |
| 4 | + |
| 5 | +[日本語版 README](README_ja.md) |
| 6 | + |
| 7 | +With a dual-pane layout displaying Source and Destination side by side, you can quickly perform file operations using only the keyboard with Vim-like keybindings. |
| 8 | + |
| 9 | +```text |
| 10 | +┌─── Source ──────────┬─── Dest ────────────┐ |
| 11 | +│ main.go │ main.go │ |
| 12 | +│ internal/ │ internal/ │ |
| 13 | +│ * README.md │ go.mod │ |
| 14 | +│ go.mod │ │ |
| 15 | +└─────────────────────┴─────────────────────┘ |
| 16 | + [left] [q]Quit [Tab]Switch [h/j/k/l]Move |
| 17 | +``` |
| 18 | + |
| 19 | +## Requirements |
| 20 | + |
| 21 | +- Go 1.21 or later |
| 22 | +- [ghq](https://github.com/x-motemen/ghq) — Used to list repositories |
| 23 | + |
| 24 | +## Installation |
| 25 | + |
| 26 | +```bash |
| 27 | +go install github.com/myuron/graftx@latest |
| 28 | +``` |
| 29 | + |
| 30 | +## Getting Started |
| 31 | + |
| 32 | +```bash |
| 33 | +# Launch with the current directory as the right pane (Destination) |
| 34 | +graftx |
| 35 | +``` |
| 36 | + |
| 37 | +On launch, the right pane displays the contents of the current directory. Press `s` to select a source repository, which will be shown in the left pane. |
| 38 | + |
| 39 | +## Fonts |
| 40 | + |
| 41 | +File tree icons are supported via [Nerd Fonts](https://www.nerdfonts.com/). When using a terminal with Nerd Fonts installed, file-type-specific icons are displayed. |
| 42 | + |
| 43 | +> The application works without Nerd Fonts, but icons may not render correctly. |
| 44 | +
|
| 45 | +## Keybindings |
| 46 | + |
| 47 | +### Navigation |
| 48 | + |
| 49 | +| Key | Action | |
| 50 | +|-----|--------| |
| 51 | +| `j` | Move cursor down | |
| 52 | +| `k` | Move cursor up | |
| 53 | +| `l` | Enter directory | |
| 54 | +| `h` | Go to parent directory | |
| 55 | +| `gg` | Jump to top | |
| 56 | +| `G` | Jump to bottom | |
| 57 | +| `Tab` | Switch focus between left and right panes | |
| 58 | + |
| 59 | +### File Selection |
| 60 | + |
| 61 | +| Key | Action | |
| 62 | +|-----|--------| |
| 63 | +| `Space` | Toggle selection on cursor line (cursor moves down after selection) | |
| 64 | +| `Ctrl+a` | Select all entries | |
| 65 | +| `Ctrl+r` | Invert selection | |
| 66 | +| `Esc` / `Ctrl+c` | Clear selection / Clear filter | |
| 67 | + |
| 68 | +### Copy (Yank & Paste) |
| 69 | + |
| 70 | +| Key | Action | |
| 71 | +|-----|--------| |
| 72 | +| `y` | Yank selected entries (or cursor line if none selected). Press `y` again in the same pane to cancel yank | |
| 73 | +| `p` | Paste yanked entries to the focused pane (skip existing files) | |
| 74 | +| `P` | Paste yanked entries with overwrite | |
| 75 | + |
| 76 | +### File Operations |
| 77 | + |
| 78 | +| Key | Action | |
| 79 | +|-----|--------| |
| 80 | +| `a` | Create new file/directory (append `/` for directory) | |
| 81 | +| `r` | Rename | |
| 82 | +| `d` | Move to trash (confirmation: `y`/`n`) | |
| 83 | +| `D` | Delete permanently (confirmation: `y`/`n`) | |
| 84 | + |
| 85 | +### Search & Filter |
| 86 | + |
| 87 | +| Key | Action | |
| 88 | +|-----|--------| |
| 89 | +| `/` | Forward search mode (press Enter to confirm, matches are highlighted) | |
| 90 | +| `n` | Jump to next search result | |
| 91 | +| `N` | Jump to previous search result | |
| 92 | +| `f` | Filter mode (show only entries containing the input string) | |
| 93 | +| `Esc` / `Ctrl+c` | Clear filter | |
| 94 | + |
| 95 | +### Repository Selection |
| 96 | + |
| 97 | +| Key | Action | |
| 98 | +|-----|--------| |
| 99 | +| `s` | Open repository selection popup (lists repositories managed by ghq) | |
| 100 | + |
| 101 | +Keys available in the popup: |
| 102 | + |
| 103 | +| Key | Action | |
| 104 | +|-----|--------| |
| 105 | +| Type characters | Filter (incremental search) | |
| 106 | +| `Ctrl+j` / `Ctrl+n` | Move cursor down | |
| 107 | +| `Ctrl+k` / `Ctrl+p` | Move cursor up | |
| 108 | +| `Enter` | Confirm selection | |
| 109 | +| `Esc` / `Ctrl+c` | Cancel | |
| 110 | + |
| 111 | +### Other |
| 112 | + |
| 113 | +| Key | Action | |
| 114 | +|-----|--------| |
| 115 | +| `.` | Toggle hidden files visibility | |
| 116 | +| `q` | Quit | |
| 117 | + |
| 118 | +## Basic Usage |
| 119 | + |
| 120 | +1. Run `graftx` (in the directory you want as the copy destination) |
| 121 | +2. Press `s` to select the source repository |
| 122 | +3. Navigate to the files you want to copy using `h`/`j`/`k`/`l` in the left pane |
| 123 | +4. Select with `Space` (multiple selections allowed), then `y` to yank |
| 124 | +5. Press `Tab` to switch to the right pane and navigate to the destination directory |
| 125 | +6. Press `p` to paste |
| 126 | + |
| 127 | +## License |
| 128 | + |
| 129 | +MIT |
0 commit comments