Skip to content

winnerx0/komi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Komi

Komi is a lightweight, file-based key-value database written in Go. It provides a simple command-line interface and persists your data in JSON format, making it easy to use and inspect.


Features

  • ✅ Simple Key-Value Storage
  • 💾 Data persisted to disk as komi.json file
  • 🔄 Data survives restarts (persistent storage)
  • 🛠️ Basic command-line interface (CLI) with built-in commands
  • 🧾 Human-readable JSON format for easy debugging

CLI Commands

SET <key> <value>

Stores a key-value pair.

> SET name Komi

GET <key>

Retrieves the value for the given key.

> GET name
Komi

LIST

Lists all keys currently stored.

> LIST
[name]

DEL <key>

Deletes the specified key.

> DEL name

EXIT

Safely exits the program, ensuring all data is written to disk.

> EXIT

How It Works

  • On startup, Komi loads the komi.json file if it exists.
  • All commands are executed in-memory and immediately reflected in the file.
  • On exit or during each write operation, Komi persists the current state to komi.json.

Getting Started

1. Clone the repository

git clone https://github.com/winnerx0/komi.git
cd komi

2. Build and run

go build -o komi
./komi

Example Session

> SET user yungsxint
> GET user
yungsxint
> LIST
[user]
> DEL user
> EXIT

Roadmap (Future Improvements)

  • Support for nested data structures
  • Import/export commands
  • In-memory only mode
  • Encryption support

License

MIT License.


Feel free to fork, improve, and contribute! 🚀

About

A simple key value database written in go

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages