kitten-dnd(1)

πŸ“¦
version 0.49.2 Β· 5 versions
, in arch rolling, nixpkgs unstable

πŸŽ€ kitten-dnd β€” kitty's drag and drop kitten πŸŽ€

okay bestie, welcome to kitten-dnd, the little kitten from the kitty fam that does drag and drop, even over SSH. yes, fr fr. let's get into it πŸ’…

✨ OVERVIEW ✨

dragging and dropping files from the shell πŸ¦‹

the dnd kitten lets you drag and drop files between the shell and arbitrary GUI programs, and it lowkey even works over SSH, so you can transfer files from one computer to another all seamless and easy β€” literally just by dragging from one kitty window to another. using it is as simple as:

kitten dnd file-to-drag.xyz

then start dragging with the mouse inside the window, and file-to-drag.xyz gets dragged, and you can drop it onto a GUI file manager or another window running this kitten. you can pass directories too, to drag entire trees πŸ‘‘

similarly, dropping works by running the kitten:

kitten dnd

then drag some files from a GUI file manager or another window running the dnd kitten and drop them onto this window. the files get copied or moved (depending on which area you drop them on, iykyk) into the current working directory.

the best part? this works even over SSH 😭 so if you just wanna quickly transfer some files from one computer to another, all you need to do is ssh into the remote computer:

kitten ssh remote-computer-name

then run the dnd kitten on the remote computer:

kitten dnd files-or-dirs-to-drag

that's it, you can now drag from or drop to the remote computer. see below for customising the behavior of the kitten via command line flags ✨

this kitten uses a new protocol developed by kitty to function, for details, see The Drag and Drop protocol.

🌸 SOURCE CODE FOR DND 🌸

the source code for this kitten is available on GitHub at https://github.com/kovidgoyal/kitty/tree/master/kittens/dnd 🫢

πŸ’– COMMAND LINE INTERFACE πŸ’–

kitten dnd [options] [files to drag]

perform drag and drop operations, even over SSH.

any arguments on the command line are assumed to be files and directories to drag. they get dragged as the text/uri-list MIME type, which can then be dropped into any file manager or similar program to copy the files 🌈

if the text/uri-list MIME type is dropped onto this window, the files and directories in it are copied into the current working directory. when dragging from this window, if a move operation is performed when dropping and the drop is to a remote machine, the files and directories to drag are deleted πŸ’€

if data is present on STDIN it is set as text/plain when dragging, unless STDIN is used explicitly via --drag or text/plain is specified via --drag. any text/plain data that is dropped onto this window is output to STDOUT, if STDOUT is connected to a file, otherwise it is discarded.

press the Esc or Ctrl+C keys to quit the kitten at any time, cancelling any in progress drag 🧚

⭐ OPTIONS ⭐

  • --drag <DRAG> β€” when starting a drag, use the specified file as the data source for the specified MIME type. syntax is mime-type:path/to/file. for example image/jpeg:mypic.jpg. can be specified multiple times to drag multiple MIME types. use - or /dev/stdin to read from STDIN. the same input can be used for multiple MIME types πŸ’…
  • --drop <DROP> β€” when receiving a drop, use the specified file as the data destination for the specified MIME type. syntax is mime-type:path/to/file. for example image/jpeg:mypic.jpg. can be specified multiple times to enable receiving multiple MIME types. if no path is specified, it will prevent that MIME type being dropped β€” super useful to disable accepting text/plain and text/uri-list πŸ‘‘
  • --drop-dest <DROP_DEST> β€” path to the directory in which dropped data is saved. defaults to the current working directory πŸŽ€
  • --copy-mode <COPY_MODE> β€” control how local files are handled for Copy drops. the default, auto, uses hard links when possible for performance and falls back to copying file data. independent always copies file data, so modifying a dropped file cannot modify its source. Move drops always use hard links when possible. Default: auto Choices: auto, independent 🌸
  • --confirm-drop-overwrite [=no] β€” ask for confirmation when dropping text/uri-list data if the drop will cause any existing files to be overwritten. note that confirmation is asked only for actual file conflicts, non conflicting files are automatically created πŸ™ˆ
  • --drop-anywhere <DROP_ANYWHERE> β€” allow dropping anywhere, not just on the Copy or Move drop regions. dropping anywhere will perform the specified action. Default: disallowed Choices: copy, disallowed, move πŸ”₯
  • --drag-thumbnail <DRAG_THUMBNAIL> β€” path to an image to use as the drag icon when starting a drag. must be in PNG/JPEG/GIF/WEBP formats. other formats will require the presence of ImageMagick on the system to load the image. if not specified, an image is derived based on the data being dragged πŸ¦‹
  • --drag-thumbnail-size <DRAG_THUMBNAIL_SIZE> β€” the thumbnail size for the image used as the drag icon. images larger than this size are downscaled. note that the terminal may reject the drag if the image is too large. Default: 512 ✨
  • --exit-on <EXIT_ON> β€” a comma separated list of events to exit on. possible events are drag-finish, drop-finish and esc-key. the first two events refer to a successful completion of a drag or a drop respectively. esc-key means press the Esc key. Default: esc-key πŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

Kovid Goyal

2026, Kovid Goyal


and that's the whole page bestie, no cap πŸ’– written by Kovid Goyal, Β© 2026, from the kitty fam β€” this is version 0.49.2, dated Oct 01, 2026. go forth and drag, you gorgeous main character 🫢✨

πŸ“¦ where this page comes from