The easiest way to install is to use JBang.
-
If not already installed, then install JBang .
-
Run
jbang app install adr@adoble
-
Set up the environment variables depending on your OS.
-
Run
adr
, e.g.:adr version
-
Download the JAR from the Releases section.
-
Set up the environment variables depending on your OS.
-
Run:
java -jar {path to downloaded jar file}/adr-j.jar
It is recommended to setup a script so that the above can be run as
adr
.
-
Download the source code.
-
Make sure you have Java version 21 or higher installed.
-
Make sure you have Gradle installed (https://gradle.org/).
-
Run
gradlew releaseJar
. This should create a filebuild\releases\adr-j.jar
. -
Set up the environment variables depending on you OS.
-
Either
- Add {project directory}\launch-scripts
to the
PATH` environment variable. - Or install using JBang (see above) using:
jbang app install {project directory}\build\releases\adr-j.jar
- Add {project directory}\launch-scripts
You should now be able to type adr
from the command line and see a response.
-
Download the source code.
-
Make sure you have gradle installed (https://gradle.org/).
-
Run
.\gradlew releaseJar
. This should create a filebuild/releases/adr-j.jar
. -
Set up the environment variables depending on you OS.
-
Either
- Move
{project directory}/launch-scripts/adr
to the~/bin
directory. - Or install using JBang (see above) using:
jbang app install {project directory}/build/releases/adr-j.jar
- Move
You should now be able to type adr
from the command line and see a response.
Of course, there are many other ways to install adr-j on unix depending on your personal preferences; important is that the environment variables are set.
Set the environment variable ADR_EDITOR
or ADR_VISUAL
to the location of the editor you what to use for editing the ADRs (e.g. VSCode). If none of those variables are set, ADR will use EDITOR
and VISUAL
variables. If the path to the editor has spaces in it, do not use quotes in the enviroment variable, e.g. instead of ...\Programs\"Microsoft VS Code"\bin\code.cmd
use instead ...\Programs\Microsoft VS Code\bin\code.cmd
.
Set the environment variable EDITOR
or VISUAL
to the location of the editor you what to use for editing the ADRs (e.g. VSCode), e.g. in the ~/.bashrc
file:
```
# For example
export EDITOR=/usr/bin/vi
```