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.

Druk is invoked as druk [path] from the terminal. Pass a directory to open a project, a file to jump straight into editing, or a file:line pair to land on a specific line. The update subcommand upgrades whichever copy is running, however it was installed.

Synopsis

druk [path]
druk update
druk --help
druk --version

Arguments

(no argument)
string
Opens the current working directory. The file tree, project search, and git all use this directory as the project root.
<directory>
string
Opens the given directory. The file tree, search, and git all use this directory as the project root.
druk ./my-app
<file>
string
Opens a single file. The sidebar is hidden by default — press Ctrl+B to bring the file tree back. The file’s parent directory becomes the project root for search and git.
druk src/main.ts
<file>:<line>
string
Opens the file and jumps to the given 1-based line number. Druk first checks whether a file literally named file.ts:42 exists; if it does, that file is opened instead.
druk src/main.ts:42
<file>:<line>:<col>
string
The column suffix is accepted and parsed (so file.ts:42:7 is read as line 42, column 7) but the column is currently ignored. The file opens at the specified line.
druk src/main.ts:42:7
update
string
Upgrades druk. Druk detects how the running copy was installed and runs the correct upgrade command — see druk update behavior below.
druk update
If the path you pass does not exist on disk, druk exits with an error rather than opening an empty file tree. Double-check the path if druk doesn’t start.

Flags

FlagDescription
-h, --helpPrint usage information and exit.
-v, --versionPrint the installed version string and exit.

druk update behavior

druk update identifies the running installation from the path of the executable and runs the appropriate upgrade command, printing it to the terminal before executing it.
1

Homebrew install

When the binary lives under a Homebrew Cellar path, druk runs:
brew upgrade letstri/tap/druk
2

curl install script

When the binary lives in ~/.druk/bin (where the install script puts it), druk re-runs the script:
curl -fsSL https://druk.letstri.dev/install | bash
3

npm / pnpm / yarn / bun / deno global package

When the binary lives under a package-manager path, druk calls the correct manager. For example, an npm install runs:
npm install -g druk@latest
A pnpm, yarn, bun, or deno install uses the equivalent command for that manager. Druk detects pnpm, bun, yarn, deno, and npm from the executable path (in that priority order) rather than assuming npm, so running npm install -g druk on a Homebrew install (which would put a second copy somewhere PATH might not find) is never the result.

Running without installing

npx and bunx both work without a global install:
npx druk [path]
bunx druk [path]
This is useful when trying Druk in a CI environment or on a machine you don’t own.

Environment variables

VariableDescription
DRUK_DOWNLOAD_BASEOverride the base URL used to download the druk binary. Applies to the npm and bun launcher packages only. Set this to a mirror if your network cannot reach GitHub.

Examples

druk                    # open the current directory
druk ./my-app           # open a specific directory
druk src/main.ts        # open a single file
druk src/main.ts:42     # open a file at line 42
druk src/main.ts:42:7   # open at line 42 (column ignored)
druk update             # upgrade druk
npx druk ./my-app       # no global install required
bunx druk ./my-app      # no global install required

Build docs developers (and LLMs) love