Open-source project
jojojames/dired-sidebar avatar
jojojames/dired-sidebar

dired-sidebar: a file tree in Emacs that borrows Dired's whole keybinding set

Sidebar for Emacs leveraging Dired

596 stars25 forksEmacs LispGPL-3.0

At a glance

What is it?
dired-sidebar is a small Emacs Lisp package that puts a navigable file tree in a window frame, built by reusing Dired, dired-subtree, projectile, ace-window and magit rather than reimplementing them. It suits an Emacs user who wants a persistent tree without losing the editing muscle memory, and it depends on a small pile of other packages to do it.
Who is it for?
dired-sidebar fits an Emacs user who already lives in Dired and wants that same interaction in a sidebar, since the package deliberately inherits Dired's behaviour and keybindings rather than inventing a new file browser, and who is willing to install dired-subtree and a couple of other packages to make it work.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 78 days ago.
What is it written in?
Mainly Emacs Lisp, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The package is glue, and it says so

dired-sidebar is a sidebar for Emacs that builds on Dired, and the architectural decision is stated plainly in the feature list. As a result of using dired as a base, many features and functionality already exist in a polished state with standard keybindings an Emacs user will already be familiar with. Because of this, dired-sidebar's codebase can stay small and lean, serving as the glue to several different packages. That is the honest description of what most sidebar implementations for Emacs are doing, and it is a defensible design rather than a weakness. The value proposition is that you get Dired's muscle memory in a panel instead of a full buffer, and you do not have to learn a second file browser. The top level of the tree reflects that: one Lisp file, dired-sidebar.el, a readme.org, a Cask file, a Makefile, a test directory and a screenshots directory. The package is licensed under GPL-3.0 and published to MELPA, to stable MELPA and to GNU ELPA.

Installing from MELPA with use-package

The recommended installation path is MELPA, and the recommended way to declare it is use-package, which the author says explicitly. The configuration sets up dired-subtree as well, because the sidebar leans on it for the nested folder behaviour, and it turns off the subtree line prefix and background colours so the tree reads as a sidebar rather than a Dired listing.

emacs-lisp
(use-package dired-subtree
  :commands (dired-subtree-toggle dired-subtree-cycle)
  :config
  (setq dired-subtree-line-prefix " ")
  (setq dired-subtree-use-backgrounds nil))
(use-package dired-sidebar
  :ensure t
  :commands (dired-sidebar-toggle-sidebar))

The command dired-sidebar-toggle-sidebar is the entry point, and the author's own settings bind it to C-x C-n. There is also a bootstrap route that clones the repository and dired-hacks from GitHub, puts both on the load path and then requires dired-sidebar. That path exists for people who are not using a package archive, or who want to read the source before depending on it, which is a reasonable instinct for a package that is fundamentally a coordinator between other packages.

The author's own configuration shows what the knobs do

The settings section of the readme is more informative than a list of options, because it shows the package in a realistic configuration. Besides binding the toggle to a key, it hooks dired-sidebar-mode-hook to enable auto-revert-mode unless the directory is a remote file, which is how the tree keeps itself current. It pushes toggle-window-split and rotate-windows onto the list of hidden commands, so those actions are available from the sidebar rather than being invisible. Then come the display settings: the subtree line prefix is changed to a two character mark, the theme is set to vscode, terminal integration is enabled and a custom font is used. The readme points you to the defcustoms in dired-sidebar.el for the full set of options, which is the right place to look since the settings list here is only the author's taste. The theme setting also hints at the icon story, since the screenshots pair the package with icon packages and colour themes.

Icons when you want them, plus signs when you do not

The icon support is a set of optional integrations rather than a built-in dependency. The screenshots show the sidebar with VsCode Icons and the Spacemacs Light theme, with All the Icons and Solarized Light, and with arrows and Seoul-256, and one screenshot deliberately shows the text user interface with Doom Peacock. The last one is the important case, because in a terminal the icons are replaced with plus and minus signs to indicate folder nesting. The readme notes that all-the-icons can be used for icons and that nerd-icons is also supported, with a short configuration that defers loading nerd-icons, installs nerd-icons-dired and points the sidebar theme at nerd-icons. That deferral matters, since icon packages are among the heavier things you can load into an Emacs session, and the sidebar lets you avoid them entirely.

Projectile, magit, ace-window and ibuffer all plug into the same tree

The integrations are the substance of the package, and there are several. Projectile is integrated, and the sidebar opens with the projectile root as its root, updating automatically when projectile changes root, so switching project moves the tree with you. Magit is integrated, and toggling the sidebar inside magit sets the root at magit's directory, and if point was on a file in magit the sidebar points at that file when it opens. Ace-window is integrated to select the window a file is opened in. When dired-sidebar is opened with a buffer, it opens the sidebar and points at the buffer's file. And the sidebar can be toggled together with ibuffer-sidebar, using a small function that calls both toggle commands, which is offered as a convenient pairing rather than a required one. The side effect of all this is that the sidebar is a view onto whatever context you are in, rather than a separate file browser you have to keep in sync by hand.

The tree refreshes itself, and you can tune when

Automatic updating is a first-class feature rather than an accident of implementation. The readme says dired-sidebar will automatically update to reflect file changes as well as after a few special commands, and points at two defcustoms for that behaviour, dired-sidebar-refresh-on-special-commands and dired-sidebar-special-refresh-commands. There is a separate file following feature, where the sidebar can be periodically set to refresh so it reflects the currently selected file, and when the sidebar is first opened, folders are automatically expanded to point at the current file. That last detail is the one that removes the most friction in practice, because a tree that opens collapsed at the top level is a tree you have to navigate before you can use it. Mouse support is there too, with left click to close or expand folders and open files. Multiple frames are supported, with each frame keeping its own sidebar state, so a two frame setup does not end up with two sidebars fighting over the same root.

Running the tests is a Cask, a Makefile and four commands

The project ships a real test setup rather than only a readme, and it is worth knowing because the tree contains a test directory and a Cask file for dependency management. The readme gives the sequence to run.

bash
  cask
  make compile
  make lint
  make test

The Makefile in the repository shows what each step does. The compile target runs cask exec with a batch Emacs, sets byte-compile-error-on-warn so warnings become errors, and byte compiles the elisp files, which is a stricter setting than many Emacs packages use. The test target runs cask exec ert-runner, so the tests are written with the standard Emacs Lisp test framework. The Makefile also defines EMACS as a variable defaulting to emacs, which lets you point the build at a different Emacs binary. The package declares an elisp lint step in the readme sequence as well, and the repository has a CI workflow badge, so the checks run somewhere other than on the author's machine.

Editorial conclusion

dired-sidebar fits an Emacs user who already lives in Dired and wants that same interaction in a sidebar, since the package deliberately inherits Dired's behaviour and keybindings rather than inventing a new file browser, and who is willing to install dired-subtree and a couple of other packages to make it work. It does not fit a setup that wants a single self contained file, because the tree needs dired-hacks for the subtree behaviour and the icons are optional extras on top of that. Before you install it, read the defcustoms in dired-sidebar.el, decide whether you want the icons and the theme settings or the plain text output for terminals, and check the package works with the Emacs version you run, since the repository has no GitHub releases and the last push was on 2026-08-06.

Frequently asked questions

What is dired-sidebar and how does it relate to Dired?

It is an Emacs Lisp package that shows a file tree in a sidebar window, and it is built on Dired. Because Dired already provides the file browsing behaviour and its keybindings in a polished state, dired-sidebar stays small and acts as glue between several packages.

How do I install dired-sidebar in Emacs?

The recommended route is MELPA with use-package, and the configuration also sets up dired-subtree, which the sidebar uses for the nested folder behaviour. There is also a bootstrap path that clones the repository and dired-hacks from GitHub, adds both to the load path and requires dired-sidebar.

Does dired-sidebar work in a terminal?

Yes. In a terminal the icons are replaced with plus and minus signs to indicate folder nesting, and one of the screenshots shows the package with the text user interface. The icon packages, such as all-the-icons and nerd-icons, are optional integrations rather than requirements.

Which other Emacs packages does dired-sidebar integrate with?

With projectile, whose root becomes the sidebar root and updates when projectile changes root, with magit, whose directory becomes the root and whose current file is pointed at, with ace-window for choosing the window a file opens in, and with ibuffer-sidebar, which can be toggled together with dired-sidebar by a small helper function.

How do I run the dired-sidebar tests?

The readme lists the sequence as cask, make compile, make lint and make test. The Makefile compiles the elisp files with a batch Emacs using byte-compile-error-on-warn, and the test target runs cask exec ert-runner.

Official sources

  1. Issues
  2. jojojames/dired-sidebar on GitHub
  3. License: GPL-3.0
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/jojojames-dired-sidebar.svg)](https://hysenlabs.com/projects/jojojames-dired-sidebar)

Was this useful?