Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/letstri/druk/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through opening a project, navigating the file tree, editing and saving files, and finding features through the command palette — everything you need to be productive in Druk from your very first session.

Opening a project

Druk accepts a directory, a single file, or a file with an optional line number as its argument. If you omit the argument entirely, it opens the current directory.
druk                  # open the current directory
druk ./my-app         # open a specific directory
druk src/main.ts      # open a single file (sidebar hidden by default)
druk src/main.ts:42   # open a file and jump directly to line 42
When you open a single file, Druk hides the sidebar to give the editor full width. Press Ctrl+B to bring the file tree back — the folder containing the file is still the project root for search and git. You can also run Druk without installing it at all:
npx druk              # fetch and run via npm (no global install)
bunx druk             # fetch and run via bun (no global install)

The interface

The Druk window is divided into four areas:
  • File tree (left sidebar) — shows the project directory. Keyboard and mouse both work for navigation.
  • Tab strip (top) — one tab per open file. Preview tabs are shown in italics; pinned tabs are normal weight.
  • Editor (main area) — the active file. Syntax highlighting, git gutter marks, and LSP diagnostics all appear here.
  • Status bar (bottom) — shows the current git branch and ahead/behind counts (e.g. ⎇ main ↑2 ↓1 ~3), unsaved state, and the cursor position.

Essential navigation

Moving between the tree and editor

ActionKey
Tree → editorTab
Editor → treeEsc
Show / hide sidebarCtrl+B
ActionKey
Move up / down /
Open / close a folder /
Open a fileEnter
New filea
New folderA
Renamer
Deleted

Working with tabs

Opening a file from the tree creates a preview tab (shown in italics). The next file you open replaces it. To pin a tab permanently, double-click it or start editing the file.
ActionKey
SaveCtrl+S
Close tabCtrl+W
Switch between open tabsCtrl+T
Previous / next tabCtrl+Opt+← / Ctrl+Opt+→
Reopen closed tabCtrl+Opt+T
QuitCtrl+Q
Ctrl+C copies selected text when there is a selection, and quits when there is nothing selected — so it never discards unsaved work unexpectedly. Closing a tab with unsaved edits always prompts first.

Discovering features

Druk has three ways to find and invoke any feature without memorising shortcuts:
1

Command palette (F1)

Press F1 (or Ctrl+Opt+P) to open the command palette. Every feature in Druk is listed here. Start typing to filter the list instantly. This is the best starting point when you are unsure of a shortcut — the palette shows the key binding for every command beside its name.
F1
2

Fuzzy file opener (Ctrl+P)

Press Ctrl+P (or Ctrl+O) to open any file in the project by typing a few characters of its name or path — the same workflow as VS Code.
Ctrl+P
3

Key peek (Ctrl+K)

Press Ctrl+K to display a strip above the status bar listing every key binding available in the pane you are currently focused in. The strip disappears on your next keypress, so it never interrupts your flow.
Ctrl+K

Mouse support

Druk has full mouse support throughout the interface. No configuration is required — it works in any terminal that sends mouse events:
  • Click any tab, tree row, or position in the editor to move focus or reposition the cursor.
  • Double-click a preview tab to pin it.
  • Drag the sidebar edge left or right to resize it interactively.
  • Scroll any pane (file tree, editor, search results, git panel) with the mouse wheel.
Once you are comfortable with the basics, see the keyboard shortcuts reference for the complete list of every key binding in Druk.

Build docs developers (and LLMs) love