atomic-cli 0.15.0

CLI tool to create, store, query, validate and convert Atomic Data
atomic-cli-0.15.0 is not a library.

atomic (CLI)

crates.io Discord chat MIT licensed

Status: pre-alpha

A command-line application to create, read and interact with Atomic Data.

atomic 0.12.1
Joep Meindertsma <joep@ontola.io>
Create, share, fetch and model linked atomic data!

USAGE:
    atomic-cli [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    delta       Update the store using an single Delta
    get         Traverses a Path and prints the resulting Resource or Value.
    help        Prints this message or the help of the given subcommand(s)
    list        List all bookmarks
    new         Create a Resource
    populate    Adds the default Atoms to the store
    tpf         Finds Atoms using Triple Pattern Fragments
    validate    Validates the store

Installation

Install Cargo to build from source.

Install using crates.io:

cargo install atomic-cli

Or build from this repo:

git clone git@github.com:joepio/atomic.git
cd atomic/cli
# Install atomic to path
cargo install --path ./

Usage

# Learn how to use it
atomic --help
# Try some commands
atomic get class
atomic get "class description"
atomic new class

Progress

  • Stores & reads stuff from and to .ad3 user files on disk
  • A new command for instantiating Atomic Classes
  • A list command for showing local bookmarks (mappings)
  • A get command for finding resources and parts of data using Atomic Paths with...
    • AD3 Serialization
    • Basic JSON Serialization
    • RDF (Turtle / N-Triples / RDF/XML) Serialization
  • Fetch data from the interwebs with get commands
  • Works with atomic-server (fetches from there, stores there, uses domain etc.) #6
  • A delta command for manipulating existing resources
  • Tests for the cli
  • A map command for creating a bookmark and storing a copy

Config

Atomic creates a ~/.config/atomic folder, which contains a mapping.amp and a store.ad3.

Mapping

The Mapping refers to your user specific set of shortname-URL combinations. This Mapping lives as a simple text file in ./user_mappping.amp.

person=https://atomicdata.dev/classes/Person

What this should be able to do

This serves as a UX story that guides the development of this CLI.

# Add a mapping, and store the Atomic Class locally
# NOT YET SUPPORTED
$ atomic map person https://example.com/person

# Create a profile for yourself
$ atomic new person
# By default, atomic creates IFPS resources for your created data, which are publicly stored
# NOT YET SUPPORTED
Created at: ipfs:Qwhp2fh3o8hfo8w7fhwo77w38ohw3o78fhw3ho78w3o837ho8fwh8o7fh37ho
# Add a mapping for your newly created resource, so you can use that shortname instead of the long IPFS url.
bookmark (optional): shortname

# Instead of link to an Atomic Server where you can upload your stuff
# If you don't, your data exists locally and gets published to IPFS
# NOT YET SUPPORTED
$ atomic setup
# install ontologies and add their shortnames to bookmarks
$ atomic install https://atomicdata.dev/ontologies/meetings
# when no URL is given, use the Ontola repo's ontologies
$ atomic install meetings