Fuseki is a populair SPARQL / Triplestore implementation in Java that is simple and robust to use. See Jena Apache Jena Fuseki documentation for more info. The Fuseki CLI is a build as a TypeScript based wrapper to use and support the services that are provided from the Open Source version.
This pre-release only supports a local Jena Fuseki Service as a peer depedency for this package. See for info how to install and use: @dgwnu/fuseki-service.
Other server installations could work but are not tested (or in scope). Hint: Any localhost installation should work like HomeBrew but there might be some authorization issues to resolve in "shiro.ini"
npm install https://github.com/dgwnu/fuseki-cli.git --save
At this moment there is only some prelimannary support to configure and use Fuseki-services Api.
npx fuseki < ping | server >
Command | Function |
---|---|
ping | Fuseki Server is Up or Down status check |
server | Fuseki Server Configuration |
npx fuseki datasets <parameters>
Parameters | Function |
---|---|
(<datasetName>) | Gets configuration of all datasets (or one specified by <datasetName>) |
-a (or -add) <assemblerFilePath> | Add dataset with <assemblerFilePath> configuration |
-r (or -remove) <datasetName> | Remove dataset specified by <datasetName> |
npx fuseki < put | post > <datasetName> <uploadFilePath>
Parameters must always be specified:
- <datasetName> the dataset to update
- <uploadFilePath> the location of data file to upload
Command | Function |
---|---|
put | Replace all with new data |
post | Update (non-blank) nodes with new data (and add non-exsiting) |
Other commands with other Service functionality will be added soon (in 2021 ;-)). |
This package provides a TypeScript based library to reuse and /or extend the CLI-functionality.
Import library in your TypeScript-application and use it to make extended functionality:
import { ping } from '@dgwnu/fuseki-cli';
// Use Fuseki Server Ping Service
ping.subscribe({
next: (up) => console.log(up),
error: (down) => console.log(down)
});
The Fuseki CLI source provides all examples you need.