grafeo-cli 0.5.33__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,90 @@
1
+ # ── OS ────────────────────────────────────────────────────────────────
2
+ .DS_Store
3
+ Thumbs.db
4
+ Desktop.ini
5
+
6
+ # ── IDE / Editor ──────────────────────────────────────────────────────
7
+ .idea/
8
+ .vscode/
9
+ *.swp
10
+ *.swo
11
+ *~
12
+
13
+ # ── Environment ───────────────────────────────────────────────────────
14
+ .env
15
+ *.tmp.*
16
+
17
+ # ── Rust / Cargo ──────────────────────────────────────────────────────
18
+ debug
19
+ target
20
+ **/*.rs.bk
21
+ *.pdb
22
+ **/mutants.out*/
23
+
24
+ # ── Python / Maturin ─────────────────────────────────────────────────
25
+ __pycache__/
26
+ *.py[cod]
27
+ *$py.class
28
+ *.so
29
+ *.pyd
30
+ *.egg-info/
31
+ *.egg
32
+ *.whl
33
+ dist/
34
+ build/
35
+ .eggs/
36
+ .venv/
37
+ venv/
38
+ .mypy_cache/
39
+ .pytest_cache/
40
+ .ruff_cache/
41
+
42
+ # ── Node.js / napi-rs ────────────────────────────────────────────────
43
+ node_modules/
44
+ *.node
45
+ package-lock.json
46
+ npm-debug.log*
47
+ yarn-debug.log*
48
+ yarn-error.log*
49
+ # ── Native library artifacts (copied for local testing) ──────────────
50
+ grafeo_c.dll
51
+ grafeo_c.dylib
52
+ libgrafeo_c.so
53
+
54
+ # ── WASM ──────────────────────────────────────────────────────────────
55
+ pkg/
56
+ pkg-lite/
57
+ pkg-lpg/
58
+ pkg-rdf/
59
+
60
+ # ── C# / .NET ───────────────────────────────────────────────────────
61
+ **/obj/
62
+ **/bin/
63
+
64
+ # ── Dart ─────────────────────────────────────────────────────────────
65
+ .dart_tool/
66
+ pubspec.lock
67
+
68
+ # ── Go ───────────────────────────────────────────────────────────────
69
+ go.sum
70
+
71
+ # ── Coverage & profiling ─────────────────────────────────────────────
72
+ .coverage
73
+ htmlcov/
74
+ coverage/
75
+ *.profraw
76
+ *.profdata
77
+ lcov.info
78
+ tarpaulin-report.html
79
+ perf.data
80
+ perf.data.old
81
+ flamegraph.svg
82
+ cargo-timing*.html
83
+
84
+ # ── Benchmarks ────────────────────────────────────────────────────────
85
+ .benchmarks
86
+
87
+ # ── Documentation (auto-generated) ───────────────────────────────────
88
+ docs/changelog.md
89
+ site/
90
+ .cache/
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.4
2
+ Name: grafeo-cli
3
+ Version: 0.5.33
4
+ Summary: Command-line interface for Grafeo graph database
5
+ Project-URL: Homepage, https://grafeo.dev
6
+ Project-URL: Documentation, https://grafeo.dev/user-guide/cli
7
+ Project-URL: Repository, https://github.com/GrafeoDB/grafeo
8
+ Project-URL: Issues, https://github.com/GrafeoDB/grafeo/issues
9
+ Author: S.T. Grond
10
+ License: Apache-2.0
11
+ Keywords: cli,database,gql,grafeo,graph
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Rust
18
+ Classifier: Topic :: Database
19
+ Classifier: Topic :: Database :: Database Engines/Servers
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+
23
+ # grafeo-cli
24
+
25
+ Command-line interface for [Grafeo](https://grafeo.dev) graph database.
26
+
27
+ This is a thin Python launcher package that runs the pre-built Grafeo CLI binary.
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ uv add grafeo-cli
33
+ # or: pip install grafeo-cli
34
+ ```
35
+
36
+ The package looks for the `grafeo` binary in this order:
37
+ 1. Bundled with the wheel (platform-specific wheels)
38
+ 2. In the virtualenv `bin/` or `Scripts/` directory
39
+ 3. On your system `PATH`
40
+
41
+ If no binary is found, install it separately:
42
+
43
+ ```bash
44
+ # Via cargo
45
+ cargo install grafeo-cli
46
+
47
+ # Or download from GitHub releases
48
+ # https://github.com/GrafeoDB/grafeo/releases
49
+ ```
50
+
51
+ ## Usage
52
+
53
+ ```bash
54
+ # Database management
55
+ grafeo info ./my-db
56
+ grafeo stats ./my-db
57
+ grafeo validate ./my-db
58
+
59
+ # Query execution
60
+ grafeo query ./my-db "MATCH (n:Person) RETURN n.name"
61
+
62
+ # Interactive shell
63
+ grafeo shell ./my-db
64
+
65
+ # Create a new database
66
+ grafeo init ./new-db
67
+
68
+ # Shell completions
69
+ grafeo completions bash > ~/.local/share/bash-completion/completions/grafeo
70
+ ```
71
+
72
+ ## Links
73
+
74
+ - [Documentation](https://grafeo.dev)
75
+ - [GitHub](https://github.com/GrafeoDB/grafeo)
76
+ - [Grafeo Python Library](https://pypi.org/project/grafeo/) (the database engine, not this CLI tool)
77
+
78
+ ## License
79
+
80
+ Apache-2.0
@@ -0,0 +1,58 @@
1
+ # grafeo-cli
2
+
3
+ Command-line interface for [Grafeo](https://grafeo.dev) graph database.
4
+
5
+ This is a thin Python launcher package that runs the pre-built Grafeo CLI binary.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ uv add grafeo-cli
11
+ # or: pip install grafeo-cli
12
+ ```
13
+
14
+ The package looks for the `grafeo` binary in this order:
15
+ 1. Bundled with the wheel (platform-specific wheels)
16
+ 2. In the virtualenv `bin/` or `Scripts/` directory
17
+ 3. On your system `PATH`
18
+
19
+ If no binary is found, install it separately:
20
+
21
+ ```bash
22
+ # Via cargo
23
+ cargo install grafeo-cli
24
+
25
+ # Or download from GitHub releases
26
+ # https://github.com/GrafeoDB/grafeo/releases
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ ```bash
32
+ # Database management
33
+ grafeo info ./my-db
34
+ grafeo stats ./my-db
35
+ grafeo validate ./my-db
36
+
37
+ # Query execution
38
+ grafeo query ./my-db "MATCH (n:Person) RETURN n.name"
39
+
40
+ # Interactive shell
41
+ grafeo shell ./my-db
42
+
43
+ # Create a new database
44
+ grafeo init ./new-db
45
+
46
+ # Shell completions
47
+ grafeo completions bash > ~/.local/share/bash-completion/completions/grafeo
48
+ ```
49
+
50
+ ## Links
51
+
52
+ - [Documentation](https://grafeo.dev)
53
+ - [GitHub](https://github.com/GrafeoDB/grafeo)
54
+ - [Grafeo Python Library](https://pypi.org/project/grafeo/) (the database engine, not this CLI tool)
55
+
56
+ ## License
57
+
58
+ Apache-2.0
@@ -0,0 +1,89 @@
1
+ """Grafeo CLI launcher.
2
+
3
+ Thin wrapper that finds and runs the grafeo binary bundled with this package.
4
+ Install with: pip install grafeo-cli
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import os
10
+ import platform
11
+ import subprocess
12
+ import sys
13
+ from pathlib import Path
14
+
15
+ __version__ = "0.5.33"
16
+
17
+ # GitHub release download URL template
18
+ _GITHUB_RELEASE = "https://github.com/GrafeoDB/grafeo/releases/download"
19
+
20
+
21
+ def _binary_name() -> str:
22
+ """Return the platform-specific binary name."""
23
+ return "grafeo.exe" if platform.system() == "Windows" else "grafeo"
24
+
25
+
26
+ def _find_binary() -> Path | None:
27
+ """Find the grafeo binary.
28
+
29
+ Search order:
30
+ 1. Bundled with this package (wheel data)
31
+ 2. Adjacent to this package (development installs)
32
+ 3. On PATH
33
+ """
34
+ binary = _binary_name()
35
+
36
+ # 1. Bundled in package directory
37
+ pkg_dir = Path(__file__).parent
38
+ bundled = pkg_dir / binary
39
+ if bundled.is_file():
40
+ return bundled
41
+
42
+ # 2. Adjacent to package (e.g., bin/ directory in virtualenv)
43
+ for bin_dir in [pkg_dir.parent / "bin", pkg_dir.parent / "Scripts"]:
44
+ candidate = bin_dir / binary
45
+ if candidate.is_file():
46
+ return candidate
47
+
48
+ # 3. On system PATH
49
+ from shutil import which
50
+
51
+ on_path = which("grafeo")
52
+ if on_path:
53
+ return Path(on_path)
54
+
55
+ return None
56
+
57
+
58
+ def main() -> None:
59
+ """Run the grafeo CLI binary, forwarding all arguments."""
60
+ binary = _find_binary()
61
+
62
+ if binary is None:
63
+ print(
64
+ "error: grafeo binary not found.\n"
65
+ "\n"
66
+ "The grafeo-cli package is a thin launcher for the Grafeo CLI binary.\n"
67
+ "Install the binary via one of:\n"
68
+ f" - Download from {_GITHUB_RELEASE}/v{__version__}/\n"
69
+ " - cargo install grafeo-cli\n"
70
+ " - Place the 'grafeo' binary on your PATH\n",
71
+ file=sys.stderr,
72
+ )
73
+ sys.exit(1)
74
+
75
+ # Make binary executable on Unix
76
+ if os.name != "nt":
77
+ binary.chmod(binary.stat().st_mode | 0o111)
78
+
79
+ try:
80
+ result = subprocess.run(
81
+ [str(binary), *sys.argv[1:]],
82
+ check=False,
83
+ )
84
+ sys.exit(result.returncode)
85
+ except KeyboardInterrupt:
86
+ sys.exit(130)
87
+ except FileNotFoundError:
88
+ print(f"error: failed to execute {binary}", file=sys.stderr)
89
+ sys.exit(1)
@@ -0,0 +1,5 @@
1
+ """Allow running the CLI via `python -m grafeo_cli`."""
2
+
3
+ from grafeo_cli import main
4
+
5
+ main()
@@ -0,0 +1,41 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "grafeo-cli"
7
+ version = "0.5.33"
8
+ description = "Command-line interface for Grafeo graph database"
9
+ readme = "README.md"
10
+ license = { text = "Apache-2.0"}
11
+ requires-python = ">=3.9"
12
+ authors = [
13
+ { name = "S.T. Grond" }
14
+ ]
15
+ keywords = ["graph", "database", "gql", "cli", "grafeo"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: Apache Software License",
21
+ "Operating System :: OS Independent",
22
+ "Programming Language :: Rust",
23
+ "Topic :: Database",
24
+ "Topic :: Database :: Database Engines/Servers",
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://grafeo.dev"
29
+ Documentation = "https://grafeo.dev/user-guide/cli"
30
+ Repository = "https://github.com/GrafeoDB/grafeo"
31
+ Issues = "https://github.com/GrafeoDB/grafeo/issues"
32
+
33
+ [project.scripts]
34
+ grafeo = "grafeo_cli:main"
35
+
36
+ [tool.hatch.build]
37
+ # Include pre-built binaries even though they're not tracked by git
38
+ artifacts = ["grafeo_cli/grafeo", "grafeo_cli/grafeo.exe"]
39
+
40
+ [tool.hatch.build.targets.wheel]
41
+ packages = ["grafeo_cli"]