notiv

command module
v0.0.0-...-2b2568a Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

README ΒΆ

notiv CLI

notiv is a Git-like, encrypted key-value store powered by GravitonDB. It combines cryptographic Merkle-tree snapshots with a simple CLI for managing versioned, hierarchical key-value data in an append-only model.
Perfect for local-first workflows, reproducible pipelines, and auditable state transitions.

notiv is alpha-stage software and is intended for experimentation and research; please be advised, notiv is not for production-use.


⚑ Features

  • βœ… Append-only key-value trees with cryptographic integrity
  • βœ… Git-style snapshots and version tracking
  • βœ… Atomic and batched commit support
  • βœ… Optional encryption with password-based keys
  • βœ… Disk-backed or in-memory storage
  • βœ… Lightweight, composable CLI
  • βœ… Commit tagging for metadata and organization
  • βœ… Tree-scoped access to keys and values

πŸ“¦ Installation

go install github.com/notiv-ideas/notiv@latest

Requires Go 1.24+


πŸ”§ Configuration

On first run, notiv auto-generates a config file:

~/.config/notiv/config.json
Example default configuration
{
  "defaultDataDir": ".notiv/share/data",
  "defaultDecryptPolicy": "false",
  "defaultDiskStore": "true",
  "defaultEncryptPolicy": "true",
  "defaultEncryptedCHECKSUM": "<AUTOGENERATED>",
  "defaultProjectDir": ".",
  "defaultShareDir": ".notiv/share",
  "defaultnotivDir": ".notiv"
}

Update configuration values using:

notiv config edit defaultShareName myproject
notiv config edit defaultDiskStore false

πŸš€ Usage

notiv [global flags] <command> [subcommand] [arguments...]
πŸ”‘ Global Flags
Flag Description
--help Show usage instructions
--ram Use in-memory (ephemeral) storage
--share=PATH Use a specific share directory
--tags="tag1 tag2" Apply tags to the commit
--snapshot-version=N Operate on a specific snapshot version
--tree-version=N Operate on a specific tree version
--encrypt Enable encryption for written values
--decrypt Enable decryption when reading values
--password="PASS" Supply encryption/decryption password

πŸ“˜ Commands

help

Display general or command-specific help.


config
  • list β€” Show current configuration
  • edit <KEY> <VALUE> β€” Modify configuration values

share
  • new <NAME | /full/path> β€” Create a new share directory

put <KEY> <VALUE> <TREE>

Insert or update a key-value pair in the given tree. Data is written in an append-only manner and cannot be retroactively modified.


get <KEY> <TREE>

Retrieve a value from the specified tree. Supports decryption if --decrypt is set or enabled in config.


list
  • trees β€” List all available trees (coming soon)
  • keys <TREE> β€” List keys in one or more trees
  • pairs <TREE> β€” List key-value pairs from one or more trees

version
  • snapshot β€” Show the current snapshot version
  • current <TREE> β€” Show the current version of each tree
  • parent <TREE> β€” Show the parent version of each tree

πŸ§ͺ Examples

# Show current configuration
notiv config list

# Create a new share
notiv share new myproject

# Add data to a tree
notiv put alice [email protected] users

# Retrieve a key's value
notiv get alice users

# List all known trees (coming soon)
notiv list trees

# Commit changes using batch mode
notiv commit batch users posts

# Use a different share and apply tags
notiv --share=/tmp/myshare --tags="release alpha" commit atomic users

πŸ“ File Structure

By default, notiv stores data in:

.notiv/

This behaves similarly to .git, storing append-only data in snapshot form. Storage can be customized using --ram for ephemeral memory, or --share for custom paths.

No background daemon is required. All data is versioned, append-only, and cryptographically verifiable using Merkle trees via graviton.


🧠 Design Philosophy

notiv is built around a few core principles:

  • Append-only β€” No deletions or mutations; only additions and new versions
  • Auditable β€” Every change is cryptographically tracked and recoverable
  • Minimalist β€” No background processes, servers, or dependencies
  • Composable β€” Designed to be used via CLI and automation
  • Secure by default β€” Optional encryption and Merkle-based integrity

πŸ› οΈ Development

Run from source:

go run . <command> [args...]

Build:

go build .
./notiv

Install:

go install github.com/notiv-ideas/notiv@latest
notiv

πŸ“ License

This project is licensed under the GNU GPLv3.

notiv uses GravitonDB, which is also GPLv3. Redistribution of this code or compiled binaries must comply with the same license.

See LICENSE for full terms.


🀝 Contributing

Pull requests, issues, and feature ideas are welcome. Try things. Break things. Improve them. That’s the spirit of notiv.


πŸ“« Contact

For discussion, collaboration, or to report bugs: Open an issue on GitHub

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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