Quickstart
Get a WWKG node running and query it in under five minutes.
1. Install a node
A node is a local WWKG instance with its own identity and default workspace.
sudo wwkg install --node-onlyThis installs a host daemon on the default port (4242), generates a cryptographic identity, and creates a default workspace.
To install additional nodes, use the --nodes flag:
sudo wwkg install --node-only --nodes 22. Start the server
wwkg node serveBy default, the server listens on all network interfaces (0.0.0.0:4242).
This means other people and other nodes on the network can connect to it —
which is safe and recommended, since all workspace data is end-to-end encrypted.
If you prefer to restrict access to your own machine only, bind to localhost:
wwkg node serve --host 127.0.0.1The server accepts both HTTP requests and connections from other WWKG nodes on the same port.
For quick experiments, you can run in ephemeral mode:
wwkg node serve --ephemeralEphemeral mode keeps all data in memory instead of writing it to disk. Data is lost when the server stops. Because everything must fit in RAM, this mode is best suited for small datasets and short-lived experiments.
3. Load sample data
Create a file called people.ttl:
@prefix : <http://example.org/> .
:Alice :name "Alice" ;
:knows :Bob .
:Bob :name "Bob" ;
:knows :Alice .Load it into the server:
wwkg load people.ttlThe load command also accepts a directory. It recursively scans for RDF files
(Turtle, N-Triples, RDF/XML) in all subdirectories and loads them in one go:
wwkg load ./data/If you omit the path, it scans the current directory:
wwkg loadSee the Loading Data guide for more options.
4. Run a query
The easiest way to query is with the wwkg CLI, which uses the native
protocol for the best performance. WWKG supports three query languages —
SPARQL, Cypher, and GQL — all against the same data.
SPARQL
wwkg client query "SELECT ?name WHERE { ?person <http://example.org/name> ?name }"Cypher
wwkg client query "MATCH (p)-[:name]->(name) RETURN name"GQL
wwkg client query "MATCH (p)-[:name]->(name) RETURN name" --language gqlOutput (JSON by default):
{
"results": {
"bindings": [
{ "name": { "type": "literal", "value": "Alice" } },
{ "name": { "type": "literal", "value": "Bob" } }
]
}
}For tab-separated output:
wwkg client query "SELECT ?name WHERE { ?person <http://example.org/name> ?name }" --format tsvYou can also query via HTTP using any tool that speaks the SPARQL Protocol, such
as curl:
curl -X POST http://127.0.0.1:4242/sparql \
-H "x-wwkg-api-key: $EKG_SPARQL_AUTH_KEY" \
-H "Content-Type: application/sparql-query" \
-d "SELECT ?name WHERE { ?person <http://example.org/name> ?name }"If your node is configured for JWT-based auth instead of API token auth, send
Authorization: Bearer <jwt> instead of x-wwkg-api-key.
See the HTTP API reference for details.
5. Create a branch
Branches let you make changes without affecting the main timeline:
wwkg client branch create experimentQuery against the new branch:
wwkg client query "SELECT * WHERE { ?s ?p ?o }" --branch experimentLoad data into it:
wwkg load more-data.ttl --branch experimentList all branches:
wwkg client branch listNext steps
- Loading Data — formats, named graphs, directory loads
- Querying — SPARQL features, output formats, query plans
- Branching — merge workflows, delta queries
- Workspaces — encryption, membership, key management
- CLI Reference — full command reference