kitten-dnd(1)
π 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 ismime-type:path/to/file. for exampleimage/jpeg:mypic.jpg. can be specified multiple times to drag multiple MIME types. use-or/dev/stdinto 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 ismime-type:path/to/file. for exampleimage/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 acceptingtext/plainandtext/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.independentalways copies file data, so modifying a dropped file cannot modify its source. Move drops always use hard links when possible. Default:autoChoices:auto,independentπΈ--confirm-drop-overwrite [=no]β ask for confirmation when droppingtext/uri-listdata 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:disallowedChoices: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 aredrag-finish,drop-finishandesc-key. the first two events refer to a successful completion of a drag or a drop respectively.esc-keymeans press the Esc key. Default:esc-keyπ
π AUTHOR π
Kovid Goyal
π COPYRIGHT π
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
- arch rolling: kitty 0.49.2-1 Β· GPL-3.0-only
- nixpkgs unstable: kitty-bin 0.49.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms