Clack is a web application environment for Common Lisp inspired by Python's WSGI and Ruby's Rack. It's easy to use:

  (lambda (env)
      (:content-type "text/plain")
      ("Hello, Clack!"))))

Open your web browser and go to http://localhost:5000/.

And it's easy to setup: Just install Quicklisp and type this at the REPL:

(ql:quickload :clack)

Supported Servers

Clack is backend-agnostic: The internals of the server are completely abstracted so you can focus on writing your application, and let the server do all the hard work.

If a new, faster server comes out, it can be added as a Clack handler, ensuring Clack is not tied to any particular HTTP server implementation.

Additionally, you can try different servers to figure out what setup is right for your application's needs.

Web server written in Common Lisp.
FastCGI binding.
Asynchronous HTTP server.
Fast non-blocking HTTP server, built on a pure-CL high-performance HTTP stack.
Stripped-down hunchentoot.

Frameworks built on Clack


Caveman is larger in scope than Ningle, and closer to Django in how its applications are structured. It has a little bit of magic, but not enough that it creates problems for developers.

(defparameter *app* (make-instance '<app>))

@route GET "/"
(defun index ()
  (render #P"index.tmpl"))


Ningle is a minimalist web framework inspired by Python’s Flask and Ruby’s Sinatra.

(defvar *app* (make-instance 'ningle:<app>))

(setf (ningle:route *app* "/")
      "Welcome to ningle!")

(setf (ningle:route *app* "/login" :method :POST)
      #'(lambda (params)
          (if (authorize (cdr (assoc "username" params :test #'string=))
                         (cdr (assoc "password" params :test #'string=)))
            "Failed...Try again.")))

(clack:clackup *app*)


Lucerne is yet another lightweight web framework.

(defapp app)

@route app "/"
(defview index ()
  (respond "<h1>Welcome to Lucerne</h1>"))

@route app "/greet/:name"
(defview greet (name)
  (respond (format nil "Hello, ~A!" name)))

(start app)

Presentations about Clack

About Clack

at the International Lisp Conference (2012)

Clack & Caveman

at Start Common Lisp (2011)