Skip to content

uncenter/purr

Repository files navigation

purr

An unofficial CLI for Catppuccin developers; query data about Catppuccin ports and userstyles, star counts of the organization as a whole or individual repositories, the Whiskers port creation tool migration, or even initialize a new port/userstyle from the upstream template.

Installation

Cargo

cargo install catppuccin-purr
# or
cargo install --git https://github.com/uncenter/purr.git

Nix

nix run github:uncenter/purr

Usage

purr <COMMAND> [-h | --help] [-V | --version]

Commands

query

purr query [--for <PORT>] [-g | --get] [-c | --count] [--userstyles | --no-userstyles | --only-userstyles]

Query the ports.yml data source. With no arguments, all ports are displayed. The --count and userstyles-related flags work for all of the query subcommands.

Examples
  • List all ports.

    purr query
    
  • List all ports excluding userstyles.

    purr query --no-userstyles
    
  • List all userstyles.

    purr query --only-userstyles
    
  • Count the number of ports.

    purr query --count
    
  • List the names of all ports.

    purr query --get name
    
  • List the current maintainers of the nvim port.

    purr query --for nvim --get current-maintainers
    

maintained

purr query maintained [--by <NAME>] [-n | --not] [-c | --count]
Examples
  • List maintained ports.

    purr query maintained
    
  • Count the number of maintained ports.

    purr query maintained --count
    
  • List unmaintained ports.

    purr query maintained --not
    
  • Count the number of unmaintained ports.

    purr query maintained --not --count
    
  • List ports maintained by <username>.

    purr query maintained --by "<username>"
    
  • Count the number of ports maintained by <username>.

    purr query maintained --by "<username>" --count
    
  • List ports not maintained by <username>.

    purr query maintained --by "<username>" --not
    
  • Count the number of ports not maintained by <username>.

    purr query maintained --by "<username>" --not --count
    

has

purr query has [PROPERTIES] [-n | --not] [-c | --count]

Properties:

  • --name <NAME>
  • --category <CATEGORIES>
  • --upstreamed
  • --platform <PLATFORM>
  • --icon <ICON>
  • --color <COLOR>
  • --alias
  • --url <URL>
Examples
  • List ports with color set to mauve.

    purr query has --color mauve
    
  • Count the number of ports that have color set to mauve.

    purr query has --color mauve --count
    
  • Count the number of ports that have color set to anything other than mauve.

    purr query has --color mauve --not --count
    
  • List ports that do not have icon defined.

    purr query has --icon --not
    
  • List ports with categories of application_launcher and system.

    purr query has --category application_launcher,system
    

stars

purr query stars [--for <REPOSITORY>] [--archived]
Examples
  • Get the total stars for all repositories across the organization.

    purr query stars
    
  • Get the total stars for all non-archived repositories across the organization.

    purr query stars --archived false
    
  • Get the total stars for only archived repositories across the organization.

    purr query stars --archived true
    
  • Get the stars for a repository called <repository>.

    purr query stars --for "<repository>"
    

whiskers

purr query whiskers [--is <STATE>] [-n | --not] [-c | --count | -p | --percentage]
Examples
  • Get the overall statistics of the Whiskerification process.

    purr query whiskers
    
  • List Whiskerified repositories.

    purr query whiskers --is true
    
  • List non-Whiskerified repositories.

    purr query whiskers --is false
    
  • List repositories Whiskers is not applicable for.

    purr query whiskers --is not-applicable
    
  • List repositories Whiskers is applicable for.

    purr query whiskers --is not-applicable --not
    

init

The init command accepts each value (name, categories, etc.) via arguments, though if not provided a series of prompts will be displayed instead.

purr init <TEMPLATE> [PROPERTIES]

Templates

Template Available Properties/Flags
port name, url
userstyle name, category, icon, color, url

whiskerify

purr whiskerify <PATH> [-o | --output <PATH>]

Whiskerify a file by replacing Catppuccin colors and names with Tera expressions. Prints the output or writes to the --output file path if given.

License

MIT