Skip to content

Latest commit

 

History

History
93 lines (81 loc) · 3.63 KB

cli.asciidoc

File metadata and controls

93 lines (81 loc) · 3.63 KB

Ide CLI

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.

Ide

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/ide
[my-git-repo]$ echo $JAVA_HOME
/projects/my-project/software/java

Commandlets

The ide command supports a pluggable set of commandlets. Such commandlet is provided as first argument to the ide command and may take additional arguments:

ide «commandlet» [«arg»]*

Technically, a commandlet is a bash script located in $IDE_HOME/.ide/scripts/command. So if you want to integrate another tool with IDEasy we are awaiting your pull-request. Every commandlet takes the following generic arguments:

Table 1. Generic arguments of every commandlet
Argument(s) Meaning

-b or --batch

run in non-interactive mode (do not ask any questions).

-q or --quiet

be quiet and avoid output.

Command-wrapper

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. 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 you can and surely should avoid to always type ide as prefix to every command. However, when you automate and want to avoid "command not found" errors, you can simply prefix the command with ide.