Metadata-Version: 2.4
Name: cypherdb
Version: 0.2.2
Summary: CypherDB is a lightweight, zero-dependency, embedded graph database written entirely in Go. Think of it as SQLite for Graph Databases
Home-page: https://github.com/DotNetAge/gograph
Author: Ray
Author-email: Ray <ray@rayainfo.cn>
License: MIT
Project-URL: Homepage, https://github.com/DotNetAge/gograph
Project-URL: Repository, https://github.com/DotNetAge/gograph
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Database
Classifier: Topic :: Database :: Database Engines/Servers
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

<div align="center">
  <h1>GoGraph</h1>
  <p>The Minimalist Embedded Graph Database in Pure Go and Python bindings</p>

  [![Go Reference](https://pkg.go.dev/badge/github.com/DotNetAge/gograph.svg)](https://pkg.go.dev/github.com/DotNetAge/gograph)
  [![Go Version](https://img.shields.io/github/go-mod/go-version/DotNetAge/gograph)](https://golang.org/)
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  [![Go Report Card](https://goreportcard.com/badge/github.com/DotNetAge/gograph)](https://goreportcard.com/report/github.com/DotNetAge/gograph)
  [![codecov](https://codecov.io/gh/DotNetAge/gograph/graph/badge.svg?token=placeholder)](https://codecov.io/gh/DotNetAge/gograph)
  [![Docs](https://img.shields.io/badge/docs-gograph.rayainfo.cn-2094f3.svg)](https://gograph.rayainfo.cn)

</div>

---

## 📖 Project Overview

**GoGraph** is a lightweight, zero-dependency, embedded graph database written entirely in Go. Think of it as **"SQLite for Graph Databases"**. 

It allows Go and Python developers to execute Cypher queries (the standard graph query language) and manage local graph data—nodes, relationships, and properties—without the overhead of external heavy database services like Neo4j.

## ⚡ Quick Start

### 1. Install CLI (Recommended)

The fastest way to explore GoGraph is via the CLI.

**macOS / Linux (Homebrew):**

```bash
brew install dotnetage/tap/gograph
```

**Run TUI (Interactive Shell):**

```bash
# Simply run without arguments to open default.db in interactive mode
gograph
```

### 2. Use as a python package


**Basic Example:**

```python
import gograph

# 创建数据库
db = gograph.Database("my_graph.db")

# 使用事务
with db.transaction() as tx:
    node_id = tx.create_node("Person", {"name": "Alice"})
    print(f"Created node: {node_id}")
    # 自动提交

# 手动事务
tx = db.transaction()
try:
    tx.create_node("Person", {"name": "Bob"})
    tx.commit()
except:
    tx.rollback()
```

## ✨ Key Features

- 🚀 **Pure Go**: No CGO, seamless cross-platform support.
- 📦 **Embedded**: Zero-config, single-directory storage (Pebble DB).
- 🔍 **Cypher Support**: Native `MATCH`, `CREATE`, `SET`, `DELETE`.
- 🛡️ **ACID**: MVCC, thread-safety, and WAL recovery.
- 🛠️ **TUI Included**: Interactive shell with auto-completion and ASCII tables.

## 💻 CLI Usage

The `gograph` binary provides a powerful TUI and command-line utilities.

| Command                  | Description                                      |
| ------------------------ | ------------------------------------------------ |
| `gograph`                | Launch Interactive TUI (default to `default.db`) |
| `gograph query <cypher>` | Run a read-only query                            |
| `gograph exec <cypher>`  | Run a data modification command                  |

**Example:**

```bash
gograph query "MATCH (n) RETURN n"
```

---

## 🧩 System Compatibility
- **OS**: macOS, Linux, Windows. 
- **Arch**: `amd64`, `arm64`.

## 📚 Documentation
Check out the full [Documentation](https://gograph.rayainfo.cn) or the [Docs Folder](./docs/README.md).
