scrybe-cli 0.1.0__py3-none-win_amd64.whl
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.
scrybe_cli/__init__.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"""scrybe-cli — Scrybe headless CLI binary.
|
|
2
|
+
|
|
3
|
+
This package installs the `scrybe` command on your PATH, providing
|
|
4
|
+
render, lint, mermaid embed/extract, and the GUI integration RPC client.
|
|
5
|
+
|
|
6
|
+
For programmatic Python library access (Document, render_markdown,
|
|
7
|
+
ContentId, etc.), install scrybe-py:
|
|
8
|
+
|
|
9
|
+
pip install scrybe-py
|
|
10
|
+
>>> import scrybe
|
|
11
|
+
>>> scrybe.render_markdown("# Hi", theme=None)
|
|
12
|
+
|
|
13
|
+
This module re-exports scrybe-py's library surface when it's installed,
|
|
14
|
+
for convenience — `import scrybe_cli; scrybe_cli.render_markdown(...)`
|
|
15
|
+
works the same as `import scrybe; scrybe.render_markdown(...)` if
|
|
16
|
+
scrybe-py is on the path.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
try:
|
|
20
|
+
from importlib.metadata import PackageNotFoundError, version as _pkg_version
|
|
21
|
+
|
|
22
|
+
try:
|
|
23
|
+
__version__ = _pkg_version("scrybe-cli")
|
|
24
|
+
except PackageNotFoundError:
|
|
25
|
+
__version__ = "0.0.0+unknown"
|
|
26
|
+
except ImportError:
|
|
27
|
+
__version__ = "0.0.0+unknown"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# Soft dependency on scrybe-py: re-export when present so users can drive
|
|
31
|
+
# the Rust library directly without juggling two imports.
|
|
32
|
+
try:
|
|
33
|
+
from scrybe import ContentId, Document, render_markdown # type: ignore[import-not-found]
|
|
34
|
+
|
|
35
|
+
_SCRYBE_LIB_AVAILABLE = True
|
|
36
|
+
except ImportError:
|
|
37
|
+
_SCRYBE_LIB_AVAILABLE = False
|
|
38
|
+
|
|
39
|
+
_MISSING_MSG = (
|
|
40
|
+
"scrybe-cli's library surface re-exports `scrybe-py` when it's "
|
|
41
|
+
"installed. To get programmatic access:\n"
|
|
42
|
+
" pip install scrybe-py\n"
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
class _Missing:
|
|
46
|
+
def __init__(self, name: str) -> None:
|
|
47
|
+
self._name = name
|
|
48
|
+
|
|
49
|
+
def __getattr__(self, _attr: str) -> None:
|
|
50
|
+
raise ImportError(f"{self._name}: {_MISSING_MSG}")
|
|
51
|
+
|
|
52
|
+
def __call__(self, *args: object, **kwargs: object) -> None:
|
|
53
|
+
raise ImportError(f"{self._name}: {_MISSING_MSG}")
|
|
54
|
+
|
|
55
|
+
ContentId = _Missing("ContentId") # type: ignore[assignment,misc]
|
|
56
|
+
Document = _Missing("Document") # type: ignore[assignment,misc]
|
|
57
|
+
render_markdown = _Missing("render_markdown") # type: ignore[assignment]
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
__all__ = [
|
|
61
|
+
"ContentId",
|
|
62
|
+
"Document",
|
|
63
|
+
"render_markdown",
|
|
64
|
+
"_SCRYBE_LIB_AVAILABLE",
|
|
65
|
+
"__version__",
|
|
66
|
+
]
|
scrybe_cli/py.typed
ADDED
|
File without changes
|
|
Binary file
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: scrybe-cli
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Scrybe CLI — headless Markdown render/lint/mermaid tool (binary wheel)
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Requires-Python: >=3.9
|
|
7
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
8
|
+
Project-URL: Homepage, https://github.com/hartsock/scrybe
|
|
9
|
+
|
|
10
|
+
<!--
|
|
11
|
+
SPDX-License-Identifier: Apache-2.0
|
|
12
|
+
Copyright 2026 Shawn Hartsock and contributors
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
# scrybe-cli
|
|
16
|
+
|
|
17
|
+
Headless CLI binary for Scrybe: render, lint, mermaid encode/decode, and GUI
|
|
18
|
+
launcher. Distributed as a `maturin` binary wheel (`scrybe-cli`). Python on
|
|
19
|
+
the outside, Rust on the inside.
|
|
20
|
+
|
|
21
|
+
## What it does
|
|
22
|
+
|
|
23
|
+
Provides a `scrybe` command-line tool with four primary subcommands plus a
|
|
24
|
+
bare invocation shortcut. The binary is self-contained — no Python runtime
|
|
25
|
+
required at execution time when installed from the wheel.
|
|
26
|
+
|
|
27
|
+
## Role in the architecture
|
|
28
|
+
|
|
29
|
+
`scrybe-cli` is the human-facing entry point for headless use and scripting.
|
|
30
|
+
It delegates to `scrybe-core`, `scrybe-render`, and `scrybe-mermaid`. It is
|
|
31
|
+
also the launcher for the Tauri GUI app: `scrybe file.md` locates the
|
|
32
|
+
`Scrybe.app` bundle (macOS) or `scrybe-app` binary and opens the file in it.
|
|
33
|
+
|
|
34
|
+
## Subcommands
|
|
35
|
+
|
|
36
|
+
| Command | Description |
|
|
37
|
+
|---------|-------------|
|
|
38
|
+
| `scrybe render [FILE]` | Render Markdown to HTML (stdin → stdout by default); `--theme`, `--full-html`, `--output` |
|
|
39
|
+
| `scrybe lint FILE` | Word count, headings, code blocks, broken links; `--json` for machine output; exits 1 if broken links found |
|
|
40
|
+
| `scrybe mermaid embed PNG SOURCE` | Embed Mermaid source into PNG iTXt chunk |
|
|
41
|
+
| `scrybe mermaid extract PNG` | Print embedded Mermaid source |
|
|
42
|
+
| `scrybe mermaid verify PNG` | Verify SHA-256 integrity of embedded source; exits 1 if tampered |
|
|
43
|
+
| `scrybe open [PATH]` | Launch the Scrybe GUI, optionally at a file or directory |
|
|
44
|
+
| `scrybe version` | Print version and active feature flags |
|
|
45
|
+
| `scrybe [PATH]` | Bare invocation with a path injects `open` automatically |
|
|
46
|
+
|
|
47
|
+
On macOS, `scrybe open` prefers the `.app` bundle via `open -n -a` to satisfy
|
|
48
|
+
WebKit's bundle entitlement requirements.
|
|
49
|
+
|
|
50
|
+
## Key library helpers (for integration)
|
|
51
|
+
|
|
52
|
+
| Symbol | Description |
|
|
53
|
+
|--------|-------------|
|
|
54
|
+
| `lint_document(doc) -> LintReport` | Programmatic lint used by both CLI and MCP `lint` tool |
|
|
55
|
+
| `wrap_full_html(output, title)` | Wraps a `RenderOutput` in a complete `<!DOCTYPE html>` with CDN tags |
|
|
56
|
+
| `version_string()` / `active_features()` | Used by `scrybe version` |
|
|
57
|
+
|
|
58
|
+
## Build and install
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
# Rust build (produces scrybe binary)
|
|
62
|
+
cargo build -p scrybe-cli --release
|
|
63
|
+
|
|
64
|
+
# Python wheel (maturin)
|
|
65
|
+
maturin build -m scrybe-cli/Cargo.toml --release
|
|
66
|
+
pip install target/wheels/scrybe_cli-*.whl
|
|
67
|
+
|
|
68
|
+
# Run tests
|
|
69
|
+
cargo test -p scrybe-cli
|
|
70
|
+
```
|
|
71
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
scrybe_cli/__init__.py,sha256=_sd4yd5Jb7G-TW96np3zL9BqZeE239cRXLhVeldBvWw,2165
|
|
2
|
+
scrybe_cli/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
scrybe_cli-0.1.0.data/scripts/scrybe.exe,sha256=yWcwUdUhZahkIRdA6fMzgntvzb5mpborAFaSODcpoX0,4208640
|
|
4
|
+
scrybe_cli-0.1.0.dist-info/METADATA,sha256=a5hE9XOOiTrykfjk2oSi8sJ6AM-hQ1CTZjtxFPoRPjw,2764
|
|
5
|
+
scrybe_cli-0.1.0.dist-info/WHEEL,sha256=0cg7uMdVM1SNK0ih4zFWnV0wsxqvcArlTmRGOaRhEnw,94
|
|
6
|
+
scrybe_cli-0.1.0.dist-info/sboms/scrybe-cli.cyclonedx.json,sha256=cVFpszx5F_R6CrJYxx7Thj7tVtVpEG9ySjIwL2QzT6g,215363
|
|
7
|
+
scrybe_cli-0.1.0.dist-info/RECORD,,
|