Skip to content

Commit 75f3fa0

Browse files
readme: simplify introduction, highlight common aliases
1 parent 0443d46 commit 75f3fa0

File tree

2 files changed

+43
-26
lines changed

2 files changed

+43
-26
lines changed

CHANGELOG.org

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
- readme: list aliases with `clojure -X:deps aliases`
77
- aliases: `:src/java21` to include local java sources for java 21
88

9+
** Updated
10+
- readme: simplify introduction, highlight common aliases
911

1012
* 2025-03-01
1113
** Updated

README.md

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,54 @@
99
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝
1010
```
1111

12-
[Practicalli Clojure CLI Config](https://github.com/practicalli/clojure-cli-config/) provides a user scope `deps.edn` file containing alias definitions for a wide range of community libraries and tools to that extend the features of Clojure CLI.
12+
[Practicalli Clojure CLI Config](https://github.com/practicalli/clojure-cli-config/) provides a wide range of community tools that extend the features of the Clojure CLI, for use across all Clojure deps.edn projects.
1313

1414
`clojure -X:deps aliases` will list all the alias names at the project and user level.
1515

1616
Aliases are qualified keywords using descriptive names to clearly convey purpose and provide a level of consistency to minimise cognitive load.
1717

18-
Common arguments are included in alias definitions via `main-opts` and `:exec-args` to provide a default behaviour and simplify the use aliases.
18+
## Common development tasks
1919

20-
Alias used with the `-A`, `-M`, `-T` or `-X` execution options
20+
* Built-in: tasks provided by Clojure CLI
21+
* Practicalli: aliases provided by Practicalli Clojure CLI Config
2122

22-
Aliases are defined to be used with all execution options `-A`, `-M`, `-P`, `-T` or `-X` where possible, otherwise use the following execution options:
23+
| Task | Command | Configuration |
24+
|----------------------------------------------------|----------------------------------------------------------|---------------|
25+
| Create minimal playground project | `clojure -T:project/create` | Practicalli |
26+
| Clojure REPL - rebel readline & nrepl server | `clojure -M:repl/rebel` | Practicalli |
27+
| ClojureScript REPL with nREPL server | `clojure -M:repl/cljs` | Practicalli |
28+
| Run tests / watch for changes | `clojure -X:test/run` / `clojure -X:test/watch` | Practicalli |
29+
| Run the project (clojure.main) | `clojure -M -m domain.main-namespace` | Built-in |
30+
| Check library dependencies for newer versions | `clojure -T:search/outdated` | Practicalli |
31+
| Download dependencies | `clojure -P` (followed by optional aliases) | Built-in |
32+
| Generate image of project dependency graph | `clojure -T:project/graph-deps` | Practicalli |
33+
| Deploy library locally (~/.m2/repository) | `clojure -X:deps mvn-install :jar '"project.jar"'` | Built-in |
34+
| Find library names (Clojars & Maven Central) | `clojure -M:search/libraries qualified-library-names` | Practicalli |
35+
| Find available versions of a library | `clojure -X:deps find-versions :lib domain/library-name` | Built-in |
36+
| Resolve git coord tags to shas and update deps.edn | `clojure -X:deps git-resolve-tags git-coord-tag` | Built-in |
2337

2438
* `-M` for `:main-opts` configuration
2539
* `-X` for `:exec-opts` configuration
26-
* `-T` for `:exec-opts`, ignoring project dependencies and only root of project as class path
40+
* `-T` for `:exec-opts`, ignoring project dependencies
2741

2842
> [Clojure CLI - Which execution options to use](https://practical.li/clojure/clojure-cli/execution-options/)
2943
30-
The project also contains
44+
[Practicalli books](https://practical.li/#books) uses the Clojure CLI Config extensively to support a [REPL Reloaded workflow](https://practical.li/clojure/clojure-cli/repl-reloaded/) for Clojure projects.
45+
46+
[Practicalli Clojure book discusses Clojure CLI and its use](https://practical.li/clojure/clojure-cli/repl/), along with video walk-through of the key features.
47+
48+
![Practicalli Clojure CLI logo](https://github.com/practicalli/graphic-design/blob/live/logos/practicalli-clojure-cli-logo.png?raw=true)
49+
50+
51+
## Project contents
3152

53+
* `deps.edn` user configuration containing alias definitions
3254
* GitHub workflow that runs MegaLinter and Code Quality checks (clj-kondo and cljstyle via the setup-clojure action)
33-
* cljstyle configuration that follows the Clojure Style Guide
55+
* cljstyle configuration that follows the Clojure Style Guide, using the [.cljstyle configuration file](https://github.com/practicalli/clojure-cli-config/blob/main/.cljstyle)
3456
* Rebel Readline example configuration (supports the Rich Terminal UI used by Practicalli)
3557
* cspell configuration for linting markdown and other text
3658
* `deps-deprecated.edn` containing alias examples of tools not currently used by Practialli which may still be of interest to the wider community
3759

38-
[Practicalli books](https://practical.li/#books) uses the Clojure CLI Config extensively to support a [REPL Reloaded workflow](https://practical.li/clojure/clojure-cli/repl-reloaded/) for Clojure projects.
39-
40-
[Practicalli Clojure book discusses Clojure CLI and its use](https://practical.li/clojure/clojure-cli/repl/), along with video walk-through of the key features.
41-
42-
[Practicalli Clojure CLI logo](https://github.com/practicalli/graphic-design/blob/live/logos/practicalli-clojure-cli-logo.png?raw=true)
43-
4460

4561
[![License CC By SA 4.0](https://img.shields.io/badge/license-CC%20BY--SA%204.0%20-blueviolet)](http://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1)
4662
[![GitHub Sponsors for practicalli-john](https://img.shields.io/github/sponsors/practicalli-johnny)](https://github.com/sponsors/practicalli-johnny)
@@ -53,11 +69,6 @@ The project also contains
5369
</div>
5470

5571

56-
## Format Clojure
57-
58-
[cljstyle](https://github.com/greglook/cljstyle) is a format tool for Clojure files that supports the Clojure Style Guide, using the [.cljstyle configuration file](https://github.com/practicalli/clojure-cli-config/blob/main/.cljstyle)
59-
60-
6172
## Contents
6273

6374
* [Install Practicalli Clojure CLI Config](#install-practicalli-clojure-cli-config)
@@ -81,7 +92,7 @@ The project also contains
8192
* [Library Hosting Services](#library-hosting-services) - maven mirrors, local repositories
8293

8394

84-
## Install Practicalli Clojure CLI Config
95+
## Install
8596

8697
[Clojure CLI](https://clojure.org/guides/install_clojure) version **1.11.1.xxxx** or later is recommended. Check the version of Clojure CLI currently installed via:
8798

@@ -133,7 +144,7 @@ clojure -T:search/outdated > outdated.org
133144

134145
## Using Practicalli Clojure CLI Config
135146

136-
Any directory containing a `deps.edn` file is considered a Clojure project. A `deps.edn` file can contain an empty hash-map, `{}` or hash-map with configuration, usually `:paths` and `:dependencies` and perhaps some `:aliases`.
147+
A directory containing a `deps.edn` file is considered a Clojure project. A `deps.edn` file can contain an empty hash-map, `{}` or hash-map with configuration, usually `:paths` and `:dependencies` and perhaps some `:aliases`.
137148

138149
The project `deps.edn` file is merged with the user wide configuration, e.g `$HOME/.clojure/deps.edn`, with the project `deps.edn` keys taking precedence if there is duplication, otherwise they are merged.
139150

@@ -144,12 +155,16 @@ Configuration passed via the command line when running `clojure` or the `clj` wr
144155
See the rest of this readme for examples of how to use each alias this configuration contains.
145156

146157

147-
## Common development tasks
158+
Common arguments are included in alias definitions via `main-opts` and `:exec-args` to provide a default behaviour and simplify the use aliases.
148159

149-
How to run common tasks for Clojure development.
160+
Aliases are defined to be used with all execution options `-A`, `-M`, `-P`, `-T` or `-X` where possible.
161+
162+
* `-M` for `:main-opts` configuration
163+
* `-X` for `:exec-opts` configuration
164+
* `-T` for `:exec-opts`, ignoring project dependencies
165+
166+
> [Clojure CLI - Which execution options to use](https://practical.li/clojure/clojure-cli/execution-options/)
150167
151-
* Built-in: tasks provided by Clojure CLI
152-
* Practicalli: aliases provided by Practicalli Clojure CLI Config
153168

154169
| Task | Command | Configuration |
155170
|----------------------------------------------------|----------------------------------------------------------|---------------|
@@ -388,9 +403,9 @@ clojure -M:search/libraries --format:merge http-kit
388403

389404
Include Java source on the classpath to [look up Java Class and method definitions, eg. `cider-find-var` in Emacs](https://practical.li/spacemacs/navigating-code/java-definitions/)
390405

391-
Requires: Java sources installed locally (e.g. `"/usr/lib/jvm/openjdk-17/lib/src.zip"`)
406+
Requires: Java sources installed locally (e.g. `"/usr/lib/jvm/openjdk-21/lib/src.zip"`)
392407

393-
* `:src/java17`
408+
* `:src/java21`
394409
* `:src/clojure`
395410

396411
Use the aliases with either `-A`, `-M` or `-X` execution options on the Clojure command line.

0 commit comments

Comments
 (0)