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.1.1.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.1-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pathetic_cli-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a66325b7aa0ceb9684992e4f505f70af3d8c946748f35f25cbfcea24a9da5e5d
MD5 4d79f65a37eec9f9dcb1e9c922ff5bf3
BLAKE2b-256 a7b65d2a7d06cc1596f1d89aeefb56756e11c8d0285f634ac9f39d0e733dc1f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pathetic_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 856296a63467ce799d9e638b65cf1d4e52854af01833a6dce4911c2569b8c0e1
MD5 66c39e48b314923ae8c62bb87afffbcc
BLAKE2b-256 540edfad1c0ce2140dd77bad55110c2f4257637646aefea37b291313bf28db5f

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