olc

command
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2026 License: BSD-3-Clause Imports: 18 Imported by: 0

README

olc — the Olvid library CLI / demo harness

olc is a low-level command-line tool that drives this repo's Olvid library directly. It is a developer and testing harness — it exercises identity generation, authentication, device discovery, the WebSocket, message send/receive, oblivious-channel creation, and the SAS trust exchange, against the live Olvid servers or in a self-contained demo. For an end-user experience, use oigw instead.

There is a step-by-step tour in ../../OLC_WALKTHROUGH.md.

go build ./cmd/olc
./olc            # prints usage

Two families of commands

olc works either with a plaintext identity file (.olv, convenient for quick experiments) or with the encrypted store (db-*, the same at-rest-encrypted SQLite database oigw uses).

Identity-file commands
Command What it does
gen generate a new owned identity and write it to a file
whoami print an identity's public bytes + invitation link
auth authenticate to the server and fetch a session token
register register the device for push notifications
discover run device discovery for a given identity
ws open the notification WebSocket and print events (e.g. return receipts)
send send an application message to a recipient (or to self)
recv download and decrypt pending messages
adddevice write a new device file for the same identity (fresh device UID)
channeldemo create two ephemeral identities, establish an oblivious channel over the network, and exchange a forward-secret message
sasdemo run the full SAS trust-establishment exchange between two ephemeral identities
Encrypted-store commands (db-*)
Command What it does
db-init create and persist an identity in a new encrypted store (-paranoid for the strong KDF)
db-send send a message using a store-backed session
db-recv receive/decrypt using a store-backed session
db-history print the stored state (identity, channels, contacts, …)
db-passwd change the store passphrase
db-migrate migrate a legacy plaintext store into the encrypted schema

Passphrase

The db-* commands open the encrypted store, so they need a passphrase — from the -pass <p> flag, the OIGW_PASSPHRASE environment variable, or an interactive prompt. The unlock prompt echoes (this is a dev harness); db-init, which creates a store, uses a no-echo prompt asked twice and requires a match, so a typo can't lock the store. (oigw uses no-echo throughout for the same store.)

export OIGW_PASSPHRASE='a strong passphrase'
./olc db-init -paranoid
./olc db-send -to <identity-hex> "hello"
./olc db-recv

Notes

  • Identity .olv files and the SQLite store both contain private keys — protect them.
  • olc talks to server.olvid.io by default; the demo commands (channeldemo, sasdemo) create throwaway identities on the server.
  • This tool is intentionally close to the metal so protocol behavior can be observed and debugged; the polished, interoperating product is oigw.

Documentation

Overview

Command olc is a minimal command-line client for exercising the Olvid engine and server API. It is a thin harness — not a full client — used to verify that the protocols and API interactions work against real Olvid servers.

Usage:

olc gen [-f identity.olv] [-server https://server.olvid.io]
olc whoami [-f identity.olv]
olc auth [-f identity.olv]
olc register [-f identity.olv]
olc discover [-f identity.olv] [-id <hex identity>]
olc ws [-f identity.olv]

The identity file holds an owned identity (private keys!) and a device UID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL