From e18bdb829eaa9ef4051750fa194072f753f00f4a Mon Sep 17 00:00:00 2001 From: mikera Date: Tue, 6 Aug 2024 18:55:35 +0100 Subject: [PATCH] Updates to CLI README --- convex-cli/README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/convex-cli/README.md b/convex-cli/README.md index 4215a416b..a94d6b977 100644 --- a/convex-cli/README.md +++ b/convex-cli/README.md @@ -12,6 +12,42 @@ The `convex-cli` module provides a CLI interface to Convex, including the abilit convex --help ``` +## Installation + +### Pre-requisites + +You need a reasonably modern version of Java, specifically 21+. You can get this here: +- [Java JDK from Oracle](https://www.oracle.com/uk/java/technologies/downloads/) + +### .jar file + +You need the `convex-cii.jar` file. Released versions can be downloaded here: +- https://mvnrepository.com/artifact/world.convex/convex-cli + +The `convex-cli.jar` file can also be generated by running `mvn install` in the root directory of the convex project, in which case the built `.jar` file can be found at `convex-cli/target/convex-cli.jar` + +At this point, assuming Java 21+ is correctly installed, you should simple be able to simply execute `java -jar convex-cli.jar` (appending any appropriate CLI arguments). + +### Convenience Wrappers + +It is helpful to have a script or batch file which executes the Java command command for you so you can simply type `convex ....` + +For Windows PowerShell, the following should work: + +``` +# Windows powershell - convex.ps1 +java -jar path/to/convex-cli.jar $args +``` + +For Linux and other Unix-like systems: + +``` +#!/bin/bash +java -jar path/to/convex-cli.jar $@ +``` + +Ensure the wrapper is somewhere in your `$PATH`, and you should be good to go! + ## License Copyright 2021-2024 The Convex Foundation and Contributors