Skip to content

A command-line tool for converting, querying, and validating RDF data with SPARQL and SHACL using the Corese engine.

Notifications You must be signed in to change notification settings

corese-stack/corese-command

Repository files navigation

Corese-Command-logo
Command-line tool for the Semantic Web of Linked Data

License: CECILL-C Discussions

✨ Features

  • Convert RDF data formats (Turtle, RDF/XML, N-Triples, etc.)
  • Execute SPARQL queries on local files or remote endpoints
  • Validate RDF graphs using SHACL
  • Canonicalize RDF data

🚀 Getting Started

Install Corese-Command using your preferred platform:

Linux

Get it on Flathub
curl -fsSL https://raw.githubusercontent.com/corese-stack/corese-command/main/packaging/scripts/install-linux.sh -o /tmp/corese.sh && bash /tmp/corese.sh

macOS

curl -fsSL https://raw.githubusercontent.com/corese-stack/corese-command/main/packaging/scripts/install-macos.sh -o /tmp/corese.sh && bash /tmp/corese.sh

Windows (PowerShell)

iwr -useb https://raw.githubusercontent.com/corese-stack/corese-command/main/packaging/scripts/install-windows.ps1 | iex

You’ll then be able to use Corese-Command via the corese command in your terminal.

Manual Installation (cross-platform)

You can also use Corese-Command as a standalone .jar file or add it to a Java project via Maven.

Requires Java 11 or higher.

Run manually with:

java -jar corese-command-standalone.jar

✅ Example Usage

# Run a simple SPARQL query on an RDF file
corese query -q 'SELECT * WHERE {?s ?p ?o}' -i data.ttl
# Convert RDF from Turtle to RDF/XML
corese convert -i data.ttl -of rdfxml
# Validate RDF data with SHACL shapes
corese validate -i data.ttl -s shapes.ttl
# Canonicalize RDF using RDFC 1.0 with SHA-256
corese canonicalize -i data.ttl -of rdfc-1.0-sha256
# Query a remote SPARQL endpoint
corese query-remote -q 'SELECT * WHERE {?s ?p ?o}' -e "https://dbpedia.org/sparql"

📖 Documentation

🤝 Contributing

We welcome contributions! Here’s how to get involved:

🔗 Useful Links