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.11

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.2.0.tar.gz (54.6 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.2.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pathetic_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 54.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pathetic_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a42e839c2a800d452bee3081f8eb57eaf32f0b18b118d55a0abcddc6c00a7030
MD5 dc3ead348cbf8fd074d122e6f6812c80
BLAKE2b-256 4448179a4a5998ffadd8281f652fbb411ffd79953d650bc4b46af43b1d5a65db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pathetic_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pathetic_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9d43d44d4b966ee7f56600fc7c457f78801bd7a1669273f6c90768f6dd5e294
MD5 35a0e4428318b2d8c0cf156098b2f152
BLAKE2b-256 be3fe2b878ddfd0eff6e51b7de0c33ebdf668acdfcbd8bb92f855b02d564e3e1

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