Fast and convenient CLI utility for working with the Jelly knowledge graph streaming protocol.
If you are using Linux (x86_64, ARM64), macOS (ARM64), or Windows (x86_64), the recommended way run jelly-cli is to use a pre-built binary. Go to the releases page and download the binary built for your platform.
You can then run it like so:
$ chmod +x jelly-cli
$ ./jelly-cli --helpTo convert an RDF file (e.g., Turtle) to Jelly, simply run:
$ ./jelly-cli rdf to-jelly input.ttl > output.jellyTo convert from Jelly to RDF run:
$ ./jelly-cli rdf from-jelly input.jelly > output.nqBy default, jelly-cli will translate files to NQuads.
But you can also specify the output format with --out-format, for example:
$ ./jelly-cli rdf from-jelly input.jelly --out-format=ttl > output.ttlYou can specify most well-known formats supported by Apache Jena, but also a custom Jelly-Text format. Jelly-Text is a human-readable translation of Jelly binary. It's not meant for machine consumption. It is useful for debugging and inspecting Jelly files.
To inspect a Jelly file and get basic information describing its contents, such as stream options or number of triples in the file, run
$ ./jelly-cli rdf inspect input.jellyYou can also compute the statistics separately for each stream frame with the --per-frame option:
$ ./jelly-cli rdf inspect input.jelly --per-frameIn both cases, you will get the output as a valid YAML.
To validate a Jelly file, run
$ ./jelly-cli rdf validate input.jellyYou can also check whether the Jelly file has been encoded using specific stream options or is equivalent to another RDF file, with the use of additional options to this command.
Use the --help option to learn more about all the available settings:
$ ./jelly-cli rdf to-jelly --help
$ ./jelly-cli rdf from-jelly --help
$ ./jelly-cli rdf inspect --help
$ ./jelly-cli rdf validate --helpAnd use the --debug option to get more information about any exceptions you encounter.
If for some reason the binaries wouldn't work for you, you can use the JAR build. The build runs on any platform, as long as you have Java (min. version 17). Go to the releases page and download the jelly-cli.jar file. Then, run it like so:
java -jar jelly-cli.jar --helpWe recommend using the binary distribution, because it has way faster startup times and doesn't require you to install Java.
Run sbt fixAll before committing. Your code should be formatted and free of warnings.
The CI checks will not pass if this is not the case.
- Ensure you have GraalVM installed and the
native-imageutility is available in yourPATH. - Clone the repository.
- Run
sbt GraalVMNativeImage/packageBin - The binary will be available at
./target/graalvm-native-image/jelly-cli.
- Run
sbt assembly - The resulting JAR will be in
./target/scala-3.*.*/jelly-cli-assembly-*.jar - Run it like:
java -jar <path-to-jar>