• Home
  • Pet, a CLI Snippet Manager

Manage your cheat sheet library of command-line tips and techniques using Pet.

Pet, a CLI Snippet Manager

Manage your cheat sheet library of command-line tips and techniques using Pet.
Pet, a CLI Snippet Manager

<img align=“right” src="./assets/pet-cli-snippets.png" width=“300”>

Snippets are small pieces of code that we often find repeating throughout our days as software engineers. Over time we see patterns and find these snippets are simple strings of code that we like to apply to different contexts. Sometimes we like to share them with our friends as tips, tutorials, or collect them into cheat sheets.

There is a plethora of open source and commercial snippet managers available for various targets. While they all have differentiating features, at their core they manage a library of code snippets. Recently popular are gist repositories that are similar if not the same as snippet libraries.

This lab focuses on a specific type of snippet manager tuned for command-line interfaces (CLIs). It’s called Pet.

Pet is a simple command-line snippet manager.

Snippet managers can be very distracting, as often they ask you to switch context to a different interface and user experience. There you search, find, select, and copy to a clipboard. If you work with a command line, bopping out to a different interface is disruptive to your workflow. A good snippet manager should be right in the CLI, right in the terminal where you are thinking and focused.

Pet is tuned just for CLIs, to allow you to pick and manage snippets. This is particularly helpful when learning or cruising at full speed with Kubernetes tools such as kubectl.

These next steps provide an introduction to Pet as a potential way to increase your productivity and learning with Kubernetes.

In this lab, you will learn how to:

    ☐ Unstall Pet
    ☐ Use the Pet commands to manage and use snippets
    ☐ Sync your snippets to a Git Gists repository
    ☐ Use Pet to manage your Kubernetes cheat sheets

  • LEVEL

    Beginner

  • DURATION

    10 minutes

  • UPDATED

    31 Dec, 2021

Categories