Create, manage and deploy p2panda schemas

Overview

fishy

Create, manage and deploy p2panda schemas


Command-line-tool to easily create update and share your p2panda schemas.

fishy parses your current version of your schemas and matches it with previous ones to calculate the difference and apply changes automatically.

Your schema changes are committed to a schema.lock file which you can share with other developers. With fishy they will be able to deploy the same schema on their nodes.

Usage

Create, manage and deploy p2panda schemas

Usage: fishy <COMMAND>

Commands:
  init    Initialises all files for a new fishy project in a given folder
  build   Automatically creates and signs p2panda data from a key pair and the defined schemas
  deploy  Deploy created schemas on a node
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Examples

# Initialise a new schema, this creates a `schema.toml` file you can edit
fishy init

# Same as above, but in a different folder and with the name already defined
fishy init -n icecream ~/dev/schemas

# Commit any changes to the schema, this updates your `schema.lock` file
fishy build

# Only inspect the current status of your schemas, do not commit anything
fishy build --inspect

# Deploy commits to external node
fishy deploy --endpoint http://localhost:2020/graphql

Install

Pre-compiled binaries

Check out our Releases section.

Compile it yourself

For the following steps you need a Rust development environment on your machine.

# Download source code
git clone https://github.com/p2panda/fishy.git
cd fishy

# Compile binary
cargo build --release

# Copy binary into your path (for example)
cp ./target/release/fishy ~/.local/bin

Tutorial

  1. Initialise a new schema by running fishy init. A dialogue will ask you for the name of your first schema. Enter a name, for example cafe and press enter. You will now find a schema.toml and secret.txt file in your folder.
  2. Edit schema.toml with any text editor. Follow the format to specify multiple schemas, their fields, types and relations to each other. For example:
    [cafe]
    description = "A list of cafes"
    
    [cafe.fields]
    name = { type = "str" }
    address = { type = "str" }
    opening_year = { type = "int" }
    
    [icecream]
    description = "Icecream sorts you can get in cafes"
    
    [icecream.fields]
    name = { type = "str" }
    sweetness = { type = "str" }
    cafes = { type = "relation_list", schema = { name = "cafe" } }
  3. You can commit these changes now to schema.lock by running fishy build. The tool will automatically show you the changes which will be committed and ask for your confirmation. Hit y to confirm. This step will generate, encode and sign the commits with your private key stored in secret.txt.
  4. This version of the schema lives now in schema.lock. You can go back to the schema.toml file and do any changes to the schema, run fishy build again to apply them. The tool will again only show you exactly what you've changed and generate the commits for only exactly these changes. Try it out!
  5. Finally deploy the schema on one or many nodes by running fishy deploy. Make sure you have a node running somewhere.
  6. Share the schema.lock file with others, with it they will be able to deploy the schemas on their nodes!

License

GNU Affero General Public License v3.0 AGPL-3.0-or-later

Supported by



This project has received funding from the European Union’s Horizon 2020 research and innovation programme within the framework of the NGI-POINTER Project funded under grant agreement No 871528

You might also like...
A cross-platofrm desktop app to manage your ports made with Dioxus and Rust.
A cross-platofrm desktop app to manage your ports made with Dioxus and Rust.

Port Manager A cross-platofrm desktop app to manage your ports made with Dioxus and Rust. This app has been tested only on macOS. Test on other platfo

Manage lightweight VMs created from OCI images
Manage lightweight VMs created from OCI images

krunvm krunvm is a CLI-based utility for managing lightweight VMs created from OCI images, using libkrun and buildah. Features Minimal footprint Fast

The application that can be used for personal usage to manage jira from terminal.

Jira Terminal This application can be used for personal usage to manage jira from terminal. Installation This application can be used in multiple plat

Command-line program to manage PS battle logs. WIP.

psbattletools psbattletools is a command-line tool written in Rust for manipulating Pokémon Showdown battle logs. Installation psbattletools currently

Rbenv - Manage your app's Ruby environment

Seamlessly manage your app’s Ruby environment with rbenv. Use rbenv to pick a Ruby version for your application and guarantee that your development en

Nvm - Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Node Version Manager Table of Contents Intro About Installing and Updating Install & Update Script Additional Notes Troubleshooting on Linux Troublesh

A command line tool, manage your hundreds of repository, written with Rust

A command line tool, manage your hundreds of repository, written with Rust

☘️ A simple command line tool to manage your Minecraft Bedrock worlds
☘️ A simple command line tool to manage your Minecraft Bedrock worlds

☘️ Haze A simple command line tool to manage your Minecraft Bedrock worlds Haze allows you to keep your project's worlds out of the com.mojang directo

Set of tools that make it easier for the operator to manage a TAPLE network.
Set of tools that make it easier for the operator to manage a TAPLE network.

⚠️ TAPLE is in early development and should not be used in production ⚠️ TAPLE Tools TAPLE (pronounced T+ 🍎 ['tapəl]) stands for Tracking (Autonomous

Comments
Owner
p2panda is a user-friendly peer-to-peer protocol for secure, energy-efficient local-first web applications
null
An interactive shell environment for exploring the p2panda protocol

An interactive shell environment for exploring the p2panda protocol. Uses a mock node and clients to simulate network logic.

null 4 Dec 12, 2021
a universal meta-transliterator that can decipher arbitrary encoding schemas, built in pure Rust

transliterati a universal meta-transliterator that can decipher arbitrary encoding schemas, built in pure Rust what does it do? You give it this: Барл

Catherine Koshka 7 Dec 21, 2022
Cedar-agent is the easiest way to deploy and run Cedar

Cedar Agent What is Cedar-Agent? Cedar-Agent is an HTTP server designed to efficiently manage a policy store and a data store. It provides a seamless

Permit.io 30 May 26, 2023
Mini Rust CLI to deploy sites to Netlify using their API

This is a Rust CLI that uses the Netlify API to deploy sites.

Benjamin Lannon 10 May 12, 2022
Deploy dioxus-web to Vercel.

Dioxus demo This demo shows how to use Dioxus to build a static web application and deploy it to Vercel. Local development To run the demo locally, yo

Zihua Wu 8 Dec 28, 2022
Rust based Kubernetes Operator to deploy K8s objects minimally.

kube-nimble nimble /ˈnɪmbl/ - quick and light in movement or action; agile. This project began from a place of curiosity about Kubernetes CRDs and the

Meet Vasani 3 Feb 26, 2024
A CLI companion tool for paste.misterio.me, allowing you to easily upload and manage your pastes

This is a CLI companion tool for paste.misterio.me, allowing you to easily upload and manage your pastes, as well as download any pastes you want.

Gabriel Fontes 1 Jan 26, 2022
procs makes it easy to find and manage system processes

procs procs makes it easy to find and manage system processes. Right now, the main usage is finding processes by the ports it is listening on, but mor

Kurt Wolf 3 Aug 29, 2022
A simple gtk4/libadwaita software center to easily install and manage nix packages

Nix Software Center A graphical app store for Nix built with libadwaita, GTK4, and Relm4. Heavily inspired by GNOME Software. Features Install package

Victor Fuentes 169 Dec 30, 2022
Manage your dotfiles and packages with ease. Define your $HOME as Code 💻 🚀 ✨

EnvHub is a simple tool to manage dotfiles and packages accross multiple machines. Written in Rust, internally it uses nix/homebrew/pkgx/devbox to man

Tsiry Sandratraina 8 Oct 27, 2023