clj-depend – Clojure namespace dependency analyser

clj-depend is a namespace dependency analyser for Clojure projects. It helps developers enforce architectural boundaries by checking whether namespaces depend on other namespaces in ways that violate predefined rules.

As applications grow, managing dependencies between components becomes increasingly important. Uncontrolled dependencies can make code difficult to maintain, complicate testing and introduce unwanted coupling between otherwise separate parts of an application.

clj-depend addresses these problems by allowing developers to define architectural layers and specify which dependencies are permitted between them. For example, an application might allow controller namespaces to access business logic and data models while preventing lower-level components from depending on controllers.

The software uses declarative configuration files to describe these relationships. It can also be accessed programmatically, making dependency validation suitable for automated development workflows and larger projects where architectural consistency is important.

This is free and open source software.

Key Features

  • Namespace dependency analysis – examines relationships between Clojure namespaces and identifies violations of configured restrictions.
  • Architectural layers – organise namespaces into logical layers and define permitted dependencies between them.
  • Flexible layer definitions – identify namespaces using regular expressions or explicit namespace sets.
  • Dependency rules – prohibit dependencies on selected namespaces using configurable restrictions.
  • Circular dependency detection – identifies cyclic relationships between namespaces that can complicate application structure.
  • Same-layer controls – determine whether namespaces belonging to the same architectural layer can depend on one another.
  • Configurable source paths – restrict analysis to selected project directories.
  • Custom violation messages – provide project-specific explanations when dependency rules are broken.
  • Violation snapshots – maintain a baseline of existing violations so subsequent checks can focus on new problems.
  • Programmatic API – access dependency analysis functionality directly from Clojure applications.
  • Build integration – supports execution through Clojure CLI and a dedicated Leiningen plugin.

Website: github.com/fabiodomingues/clj-depend
Support:
Developer: Fabio Domingues
License: Eclipse Public License v2.0

clj-depend is written in Clojure. Learn Clojure with our recommended free books and free tutorials.


Related Software

Clojure Linter Tools
kibitStatic code analyzer for Clojure, ClojureScript, cljx and other Clojure variants
JokerSmall Clojure interpreter, linter and formatter
eastwoodInspects namespaces and reports possible problems
clj-kondoStatic analyzer and linter for Clojure
SplintFocuses on style and code shape
YagniLeiningen plugin for finding dead code
lein-bikeshedLeiningen plugin

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted