Skip to main content

Unofficial community helper — make Hermes Desktop GUI font bigger in one command.

Project description

🐍 hermes-font-scale

Unofficial community helper — patch Hermes Desktop GUI font size in one command, atomically and reversibly. NOT affiliated with NousResearch/hermes-agent.

Tests Python 3.9+ License Version


✨ Features

  • Atomic font patch — rewrites only the html { font-size: clamp(...) } line; crash-safe via temp-file + os.replace()
  • Reversiblereset restores from an auto-created .bak; set is idempotent and skips unnecessary writes
  • Zero runtime deps — stdlib only; works on Python 3.9–3.12 across Windows / macOS / Linux
  • Multi-OS path resolution — auto-detects Hermes install from HERMES_HOME, env var, or 10+ known install paths
  • Diagnostic doctor command — 4-check health report pinpoints the exact failure before you patch

🚀 Getting Started

Prerequisites

  • Python >= 3.9

Installation

Currently available from source only (PyPI publication pending):

pip install "git+https://github.com/hsukevin0407-crypto/hermes-font-scale.git@v0.1.1"

Or clone and install locally:

git clone https://github.com/hsukevin0407-crypto/hermes-font-scale.git
cd hermes-font-scale
pip install -e .

Usage

# Check current state (run this first)
hermes-font-scale status

# Set base font size (10–32 px; responsive max is auto-computed)
hermes-font-scale set 18

# Preview without writing anything
hermes-font-scale set 18 --dry-run

# Run the 4-check diagnostic
hermes-font-scale doctor

# Restore the original CSS from the .bak file
hermes-font-scale reset

# Machine-readable output
hermes-font-scale status --json

After set, restart Hermes Desktop to see the change.


🏗️ Architecture

graph LR
    A[CLI: hermes-font-scale] --> B{Command}
    B -->|set N| C[Locate globals.css]
    B -->|reset| D[Restore from .bak]
    B -->|status| E[Read current value]
    B -->|doctor| F[4-check diagnostic]
    C --> G[Atomic rewrite via os.replace]
    G --> H[globals.css patched]

Hermes Desktop hard-codes font size in one CSS anchor:

/* node_modules/@nous-research/ui/dist/ui/globals.css */
html {
  font-size: clamp(14px, calc(14px + 2 * ((100vw - 1400px) / 400)), 18px);
}

hermes-font-scale set N rewrites the two numeric bounds to N and N+4, preserving responsive behavior. Everything else in the file is untouched.

Compatibility note: the official Hermes Desktop installer may bundle node_modules inside app.asar. Run hermes-font-scale doctor — if the "font-size clause present" check fails because the file is inside an ASAR archive, see the open issue for workarounds.


🤝 Contributing

Pull requests are welcome. For major changes, please open an issue first.

# Run tests
pip install pytest pytest-cov
pytest

# Lint
pip install ruff
ruff check src tests

CI runs on Python 3.9, 3.10, 3.11, 3.12 across Ubuntu / Windows / macOS.

📄 License

MIT


Disclaimer: Unofficial community project. Not affiliated with or endorsed by Nous Research. Use at your own risk.

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

hermes_font_scale-0.1.1.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

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

hermes_font_scale-0.1.1-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hermes_font_scale-0.1.1.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hermes_font_scale-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4ead859c399da63d41661db0247cc9f58cc08711bbdc43985226b447eb72ecc7
MD5 7ee51e4de9c1a62b794bf9d2a18616ad
BLAKE2b-256 fd4910d70764fb4f1fcf6279224bbc68495a869e515901398fc48342861483bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hermes_font_scale-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd8e3a1eb9988193db9a6e9daeade8b175b428f5f3fddc856362ec209f280ecd
MD5 0346f309d4c0cb93279eac0a268e8ca6
BLAKE2b-256 54f02cdc0609cf927279ded10119da6a5548828ab7903b43c39410b65ca8bd0c

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