IDEasy
is shipped with a central command ide
.
The setup will automatically register this command so it is available in any shell on your system.
This page describes the Command Line Interface (CLI) of this command.
Without any argument the ide
command will determine your IDE_HOME
and setup your environment variables automatically.
In case you are not inside of a IDEasy
folder the command will echo a message and do nothing.
[~]$ ide
You are not inside an IDEasy installation: /
[~]$ cd projects/my-project/workspaces/test/my-git-repo
[my-git-repo]$ ide
IDEasy environment variables have been set for /projects/my-project in workspace main
[my-git-repo]$ echo $IDE_HOME
~/projects/my-project
[my-git-repo]$ echo $JAVA_HOME
~/projects/my-project/software/java
The ide
command supports a large set of commandlets (sub-commands).
Such commandlet is typically provided as first argument to the ide command and may take additional arguments:
ide «commandlet» [«arg»]*
For more details simply call ide help
.
For many commandlets the ide
command acts as a wrapper.
Similar to mvnw
or gradlew
you can use it as a proxy command.
Therefore ide mvn clean install
will be the same as mvn clean install
.
The benefit when using ide
as wrapper is that it will even work when the command (mvn
, node
, npm
, etc.) is not on your PATH
variable or even not yet installed.
Further, it will ensure that the actual command is called with the proper configuration of your project (e.g. in case of mvn
with the settings.xml
for your project).
We see the main benefit in this for writing portable scripts that you may commit to your git repository and that will then run everywhere and will lazily install the required tools on the fly.
In your daily usage there is no need to always type ide
as prefix to every command.
Simply assure that you have called ide
to setup your environment before calling the actual tool.