related manual news github 3.7k★

;; The Clojure Interactive Development Environment that Rocks

In a nutshell - CIDER connects Emacs to your running Clojure program. You write a function, evaluate it, check out the result and keep going. No restarts, no copy-pasting into a REPL window, no waiting for a build. It's been doing this since 2012.

M-x package-install RET cider RET 

Latest release: 2.0.1, and the story behind 2.0.

What it's like

Evaluate anything C-c C-e

This is the heart of CIDER. Put the cursor after a form, press the key, and the result shows up right next to the code. A definition, a region, the whole buffer - it all goes to your running program, and nothing gets restarted. If the result is an image, you get the image. [manual]

Evaluating Clojure forms one by one, each result appearing inline next to its form
Five forms evaluated without leaving the source buffer.

Take values apart C-c M-i

Printed values only get you so far. The inspector lets you walk any value in the running program: drill into a nested map, page through a collection with a million entries, and back out again. [manual]

Inspecting the result of group-by and drilling into a nested map
From a group-by result down to one user's map, and back.

Step through it C-u C-M-x

Instrument a function and the next call to it stops in the debugger. Each intermediate value shows up inline as you step. If you've used Edebug, you already know how this works. [manual]

Stepping through a thread-last pipeline in the debugger, with each value shown inline
Stepping through a thread-last pipeline, one value at a time.

Expand macros in place C-c M-m e

Macros are much easier to understand when you can see what they expand to. Expand one a step at a time right in the source buffer, keep expanding the parts you're interested in, and collapse everything when you're done. [manual]

A thread-last macro expanded in place into the reduce and map calls it stands for
The ->> in total-price, expanded in place.

See who calls what C-c C-w c

Before you change a function it's nice to know what depends on it. Ask for its callers and you get a tree you can keep expanding, built from what's actually loaded in your program. [manual]

A tree view listing the two tests that call demo.core/greet
Everything that calls greet, as a tree.

Results that aren't text C-c C-e

Not every value is best read as text. Evaluate something that returns an image and you get the image, right next to the code that made it. [manual]

A function that draws a sunburst, with the image it returns shown inline
A BufferedImage, evaluated and rendered inline.

Run the tests C-c C-t n

Run the test at point, the namespace or the whole project. When something fails you get the expected and actual values and a diff between them, so you don't have to compare two big maps by hand. [manual]

Running a namespace's tests and getting a report with the failing assertion
A failing test, with a diff of the expected and actual values.

And the rest

Code completion, documentation lookup, navigation and so on are powered by the running program as well. Here are a few more things that didn't fit above:

News

Getting started

  1. Install it. CIDER is on NonGNU ELPA, which Emacs knows about out of the box, so M-x package-install RET cider RET is all it takes.
  2. Open any file in a Clojure project and press C-c C-x, then j j. CIDER figures out whether it's a Clojure CLI, Leiningen, shadow-cljs or Babashka project, starts a REPL and connects to it.
  3. Put the cursor after a form and press C-c C-e. That's the basic workflow, and pretty much everything else builds on top of it.

Connecting to a REPL that’s already running, in a container or on another machine? Up and Running covers it.

History

Phil Hagelberg hacked together the first nREPL client for Emacs on a flight to San Francisco in April 2012. Tim King picked it up, and by August nrepl.el had pushed SLIME aside as the way to write Clojure in Emacs. I took it over in 2013, renamed it to CIDER a few months later (mostly so people would stop confusing it with the nREPL server), and I’ve been its primary author and maintainer ever since.

Fourteen years later CIDER is on its second major version, and it’s still evolving at a steady pace. Hundreds of people have contributed to it over the years, and its development is funded by its users.

Questions

Do I need to be an Emacs expert?
No. You need to be able to open files and install a package; CIDER's transient menus (C-c C-x to start, C-c C-t for tests, C-c C-w for references and so on) show every command, so there's very little to memorize up front.
What about ClojureScript, Babashka and friends?
ClojureScript works with shadow-cljs, figwheel and the other common REPLs, and CIDER also talks to Babashka, nbb, Basilisp and ClojureCLR. See ClojureScript and Alternative Platforms for what's supported where.
Can I use it together with clojure-lsp?
Yes, plenty of people do. CIDER knows what's loaded in the running program and clojure-lsp knows your source statically, so they complement each other. The manual has a guide to making them share the work.
Does my project need anything special?
No. C-c C-x j j figures out whether it's a Clojure CLI, Leiningen, shadow-cljs or Babashka project and starts the right REPL for it, adding CIDER's middleware where the tool needs it. You can also connect to a REPL you started yourself.
Who's behind it?
Me, Bozhidar Batsov. I've been CIDER's primary author and maintainer since 2013, and I look after its siblings (cider-nrepl, Orchard, nREPL and friends) as well. I'm far from alone, though: hundreds of people have contributed over the years, and the project is funded by the people and companies who use it.

Help and support

Getting help

Supporting CIDER

CIDER is free, but maintaining it takes a lot of time and effort. If you find it useful, please consider supporting its development:

  • GitHub Sponsors recommended - monthly or one-time, right from your GitHub account
  • Open Collective recommended - fully transparent, and the easiest option for companies
  • Patreon - monthly memberships
  • PayPal - a one-off donation

Your support also helps CIDER's sibling projects: cider-nrepl, Orchard, nREPL, clj-refactor.

Keep hacking!

© 2012-2026 Bozhidar Batsov and CIDER contributors. Colophon. Source.