Druk is invoked asDocumentation 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 [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
Arguments
Opens the current working directory. The file tree, project search, and git all use this directory as the project root.
Opens the given directory. The file tree, search, and git all use this directory as the project root.
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.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.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.Upgrades druk. Druk detects how the running copy was installed and runs the correct upgrade command — see
druk update behavior below.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
| Flag | Description |
|---|---|
-h, --help | Print usage information and exit. |
-v, --version | Print 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.
curl install script
When the binary lives in
~/.druk/bin (where the install script puts it), druk re-runs the script: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: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:
Environment variables
| Variable | Description |
|---|---|
DRUK_DOWNLOAD_BASE | Override 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. |