Skip to content

Latest commit

 

History

History
77 lines (54 loc) · 1.2 KB

File metadata and controls

77 lines (54 loc) · 1.2 KB

🗃️ CLI Key-Value Store (Rust)

A lightweight command-line key-value store built in Rust for storing, retrieving, and managing simple person records.


Features

✅ Add (set) a new person
✅ Retrieve (get) a person by ID
✅ List all persons (list)
✅ Delete a person (delete)
✅ Data persisted to a local db.json file

(Planned features)

  • update: modify an existing record
  • search: find by name or age
  • export / import: backup and restore data
  • stats: quick summary (count, average age, etc.)

Installation

Clone the repository and build it locally:

git clone https://github.com/<your-username>/cli-keyvalue-store.git
cd cli-keyvalue-store
cargo build

Usage

Run directly with Cargo:

cargo run -- <COMMAND> [ARGS]

Commands

➕ Add a new person

cargo run -- set <first_name> <last_name> <age>

Example:

cargo run -- set Alice Johnson 30

🔍 Get a person by ID

cargo run -- get <id>

Example:

cargo run -- get 1

🗑️ Delete a person

cargo run -- delete <id>

📋 List all persons

cargo run -- list