Skip to main content

Installs a WaterJuice shell prompt into your bash or zsh run-command file

Project description

wj-prompt

A WaterJuice project.

A small CLI that installs a WaterJuice shell prompt into your bash or zsh run-command file. The prompt shows the host name and working directory in cyan, followed by a green $ for normal users (or a red # for root):

myhost:~/code/wj-prompt $

The prompt line is written inside a clearly marked block, so re-running updates it in place and uninstall removes it cleanly without disturbing the rest of your rc file.

Usage

# Install (or update) the prompt for your current shell
uvx wj-prompt

# Preview the change without writing anything
uvx wj-prompt --dry-run

# Target a specific shell or rc file
uvx wj-prompt --shell bash
uvx wj-prompt --rc-file ~/.bashrc

# Remove the prompt again
uvx wj-prompt uninstall

After installing, restart your shell or source the rc file to apply the change to the current session.

What gets installed

zsh (~/.zshrc):

PROMPT='%F{cyan}%m%f:%F{cyan}%~%f %(!.%F{red}#%f.%F{green}$%f) '

bash (~/.bashrc):

PS1='\[\e[36m\]\h\[\e[0m\]:\[\e[36m\]\w\[\e[0m\] \[\e[$((EUID?32:31))m\]\$\[\e[0m\] '

Each is wrapped in a managed block:

# >>> wj-prompt >>>
# Managed by wj-prompt. Re-run `wj-prompt` to update; `wj-prompt uninstall` to remove.
...
# <<< wj-prompt <<<

Installation

# Run directly without installing
uvx wj-prompt

# Or install the tool
uv tool install wj-prompt
pip install wj-prompt

Development

# Set up development environment
make dev

# Run linting and type checks
make check

# Format code
make format

# Build wheel
make build

License

Released into the public domain under the Unlicense.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

wj_prompt-1.0.0b1-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file wj_prompt-1.0.0b1-py3-none-any.whl.

File metadata

  • Download URL: wj_prompt-1.0.0b1-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for wj_prompt-1.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 6a81d9673d7eca0c7c84485f52811040b8120d2e9b79e4c3c059592fd3ebc21e
MD5 94c0eb346f32de415f78211cc7891729
BLAKE2b-256 86c77b668bec90a0cfa86d5ca2bb23e2ac53090eb35c3a42156671a88b271dc2

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