Skip to content

Commit beb79a9

Browse files
committed
feat: add psc info subcommand
1 parent 461fa08 commit beb79a9

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 1.36.4
4+
- Add `psc info` CLI subcommand — prints version, GitHub URL, Python version, and install path for quick introspection.
5+
36
## 1.36.3
47
- Add `__url__` module attribute pointing to the canonical GitHub repo (`https://github.com/pearshape-ai/pearscarf`) for external introspection tooling.
58

pearscarf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.36.3"
1+
__version__ = "1.36.4"
22
__url__ = "https://github.com/pearshape-ai/pearscarf"
33

44
__all__ = ["__version__", "__url__"]

pearscarf/interface/cli.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
import os
44
import sys
5+
from pathlib import Path
56
from typing import Any
67

78
import click
89

9-
from pearscarf import __version__
10+
from pearscarf import __url__, __version__
1011

1112
# Reset terminal to sane mode immediately on import.
1213
# This fixes stale raw mode left by a previous crashed session.
@@ -33,6 +34,20 @@ def cli() -> None:
3334
"""pearscarf: Operational infrastructure that grows itself."""
3435

3536

37+
@cli.command()
38+
def info() -> None:
39+
"""Show installed pearscarf metadata."""
40+
import pearscarf
41+
42+
install_path = Path(pearscarf.__file__).parent.parent.resolve()
43+
python_version = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
44+
45+
click.echo(f"version: {__version__}")
46+
click.echo(f"url: {__url__}")
47+
click.echo(f"python: {python_version}")
48+
click.echo(f"install_path: {install_path}")
49+
50+
3651
@cli.command()
3752
@click.option(
3853
"--poll",

0 commit comments

Comments
 (0)