Crate noosphere_cli

source ·
Expand description

This crate implements the core functionality of the Noosphere CLI, otherwise known as “orb”. The Noosphere CLI has three goals:

  • Be a reference for those seeking to embed Noosphere in a client application
  • Serve as a pedagogical tool for those seeking to explore the Noosphere protocol
  • Provide swiss army knife-like utility for anyone using Noosphere protocol in their day-to-day lives

Taken in its entirety, this crate implements various high-level routines that are likely to be implemented by other apps that embed Noosphere, including (but not limited to):

  • Saving, syncing, rendering and updating the content of spheres as it changes over time
  • Following and unfollowing other spheres, and accessing their content
  • Managing access to a sphere by other clients and devices

Modules

  • Declarative definition for the end-user-facing CLI
  • Concrete implementations of the commands of the Noosphere CLI
  • Helpers for working with the file system content within a workspace
  • Helpers for dealing with translation between slugs and files
  • Implementation related to the file system layout of a sphere workspace
  • This module contains constructs that used when rendering a sphere within a workspace on a file system.
  • Operations that are common to most CLI commands

Functions

  • Invoke the CLI implementation imperatively. This is the entrypoint used by orb when handling a command line invocation. The Cli is produced by parsing the command line arguments, and the Workspace is initialized from the current working directory. The effect of invoking the CLI this way will depend on the Cli and Workspace provided (results may vary significantly depending on those inputs).