Skip to main content

Highlight CLI

@readwithai - X - blog - machine-aided reading - 📖⚡️🖋️

Highlight strings within streams of text.

Motivation

It can be useful to highlight text in output to make it easier to find. There are tools that can do this like grep and supercat but these aren't trivial to use. I wanted a tool that is trivial to use and install on machines.

Alternatives and prior work

It is surprising that there aren't tool that do this. Some tools come close:

  • xpo provides similar functionality but I could not install it
  • hhighligher does this - but it is written in shell and I did not find it easyer to install.
  • grep supports highlighting. The settings for coloring is complete but difficult to understand and additional regular expressions need to be added to match all lines.

Installation

You can install hlcli using pipx:

pipx install hlcli

Usage

Highlight the sring one

echo "hello one three\ntwo\nthree\nfour\nfive\nsix" | hlcli 'one'

Match various expressions with different colors:

echo "hello one three\ntwo\nthree\nfour\nfive\nsix" | hlcli one --green two --yellow three four --red six

Here we highlight one in red (the default color), two in green, three and four in yellow and six in red

About me

I am @readwithai. I create tools for reading, research and agency sometimes using the markdown editor Obsidian.

I also create a stream of tools that are related to carrying out my work.

I write about lots of things - including tools like this - on X. My blog is more about reading and research and agency.

@readwithai logo

Metadata

Release files for highlight-cli 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for highlight-cli 1.2.0
File Size Uploaded Provenance Actions
highlight-cli-1.2.0.tar.gz 2.9 kB Without provenance Details for highlight-cli-1.2.0.tar.gz

Release files / highlight-cli-1.2.0.tar.gz

Download URL highlight-cli-1.2.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
21bfd7b3690c8a9d5294d4de50ba5e48c408004adbb20a19f72c629cc92169fb
BLAKE2b-256 checksum
How to use checksums
74cd4a373d96d022c429913ef75a4d54501d1a2724a955c52fdf73fab82a24da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Security for highlight-cli 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page