Skip to content

Commit

Permalink
Updates to CLI README
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Aug 6, 2024
1 parent b99d1fe commit e18bdb8
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions convex-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e18bdb8

Please sign in to comment.