Skip to main content

A colorful CLI that visualizes system, environment, and PATH info with Rich.

Project description

pathetic

A colorful, fast CLI to inspect your current environment: locations, system info, PATH, Python paths, selected environment variables, filesystem usage, Git status, and a small directory tree. Built with Rich for delightful output and Click for a clean command-line UX.

Highlights

  • Visual, readable output with sensible defaults
  • Modular sections you can toggle on/off
  • Zero-config quick overview; add flags when you want more detail

Requirements

  • Python >= 3.14

Installation

Install locally (editable) while developing:

uv pip install -e .

Or install globally with uv tool:

uv tool install .

This exposes the ptc command.

Quickstart

Run the default, concise snapshot:

ptc

Show everything:

ptc --all

Machine-readable output:

ptc --json --all > snapshot.json

Increase list sizes for PATH and sys.path:

ptc --all --limit 25

Focused views:

ptc --env        # Selected environment variables
ptc --fs         # File system stats
ptc --tree       # Small directory tree (depth 2)
ptc --env-group python --env-key FOO --env-key BAR  # Custom env selection

CLI Options

ptc [OPTIONS]

Options:
  -h, --help              Show this message and exit
  --all                   Show all sections
  --no-paths              Hide PATH section
  --no-python-path        Hide sys.path section
  --env                   Show selected environment variables
  --fs                    Show file system stats
  --tree                  Show a small directory tree
  --limit INTEGER         Max rows for PATH and sys.path (default: 10)
  --json                  Output as JSON (machine-readable)
  --env-group [ci|common|python]
                          Predefined env var groups (repeatable)
  --env-key TEXT          Additional environment variable keys (repeatable)

What the tool shows

  • Location: Current working directory and home directory
  • System: Platform, Python version/implementation, architecture, executable
  • Environment detection: Active virtualenv/conda/uv info shown prominently
  • PATH: First N entries (configurable with --limit)
  • Python Path: First N entries of sys.path (shown with --all)
  • Environment: Selected high-signal variables (--env to show)
  • File System: Total, free, used, and usage percent (--fs)
  • Git: Branch, short commit, working state (auto-detected when in a repo)
  • Tree: Small directory tree of the current directory (--tree)

Design philosophy

  • Defaults show the most useful, actionable info quickly
  • Additional details are opt-in via flags
  • Clean typography and layout with Rich

Development

Install dev dependencies and run locally:

uv pip install -e .
ptc --all

Project entry point is defined in pyproject.toml:

[project.scripts]
ptc = "pathetic:main"

Source code: pathetic.py uses small, focused rendering functions for each section and a Click command to wire options:

  • section_cwd_home()
  • section_system()
  • section_paths()
  • section_python_path()
  • section_env()
  • section_fs()
  • section_git()

Troubleshooting

  • Command not found after install: ensure your Python user base or pipx bin directory is on PATH.
  • Missing colors or odd glyphs: use a modern terminal with UTF-8 and TrueColor support.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pathetic_cli-0.1.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pathetic_cli-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file pathetic_cli-0.1.0.tar.gz.

File metadata

  • Download URL: pathetic_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.6

File hashes

Hashes for pathetic_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5fad83f03e81dd141986b1a229ccac5fe74a1fe11af2dc1f1b6b1728a32de7c8
MD5 4d33e11c14b90718721e0de69950e608
BLAKE2b-256 f359a906a8c3f526a6a8b050e539567627bd5210ea9683d2e50ff118eca5de8a

See more details on using hashes here.

File details

Details for the file pathetic_cli-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pathetic_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a660d6f69dcfe0fa5de710b9a44da6b0406dc5335da79b66a731e4633ba7578d
MD5 862418ea29f89e5143a984f37daa8c28
BLAKE2b-256 c0932783e294b1758ea95cc2aed4b1703f6916d0844f057b7c2c07733dee2de1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page