Thanks to visit codestin.com
Credit goes to lib.rs

#chat #decentralized #freenet #p2p

bin+lib riverctl

Command-line interface for River decentralized chat on Freenet

28 releases

new 0.1.27 Jan 15, 2026
0.1.26 Jan 5, 2026
0.1.24 Dec 29, 2025
0.1.16 Nov 2, 2025
0.1.5 Jul 31, 2025

#5 in #freenet

LGPL-3.0

405KB
7K SLoC

River CLI

Command-line interface for River decentralized chat on Freenet. This tool allows you to interact with River chat rooms without using the web interface, making it ideal for automation, testing, and server deployments.

Features

  • Create and manage chat rooms
  • Generate and accept invitations
  • Debug contract operations
  • Support for both human-readable and JSON output
  • Send and receive messages (coming soon)
  • Member management (coming soon)

Installation

cargo install riverctl

Usage

See QUICK_START.md for basic usage examples and getting started guide.

Testing

Freenet Integration Smoke Test (experimental)

The integration test at tests/message_flow.rs uses the freenet-test-network crate to launch a local Freenet gateway plus two peers, then drives the River CLI to create a room, exchange invitations, and send messages between two users.

Run it manually (it is ignored by default) from river/main/cli:

cargo test --test message_flow -- --ignored --nocapture

Prerequisites:

  • ~/code/freenet/freenet-core/main must exist (the test builds the Freenet binary from there)
  • freenet-test-network dev-dependency will be fetched from crates.io automatically (no sibling checkout required)

Expect the test to fail today with the current contract serialization bug; it exists to reproduce and debug the issue.

Heads up: When you change the room contract or shared River types, rebuild the WASM and refresh the bundled copy with cargo make sync-cli-wasm. The CLI build now double-checks and will panic if the bundled file drifts from the most recently built artifact.

Requirements

  • A running Freenet node (accessible at ws://127.0.0.1:7509)
  • Rust 1.70 or higher (for building from source)

Architecture

The CLI uses core components from the River ecosystem:

  • river-core - Core protocol and data structures
  • freenet-stdlib - WebSocket client for Freenet communication
  • Pre-built room contract WASM included in the package

Commands

  • riverctl room - Room management (create, list, info)
  • riverctl invite - Invitation handling (create, accept)
  • riverctl debug - Debugging tools for contract operations
  • riverctl message - Messaging (coming soon)
  • riverctl member - Member management (coming soon)

Run riverctl --help for full command documentation.

Dependencies

~29–52MB
~751K SLoC