0.1.4 • Published 5 months ago

@androbinco/prompts-cli v0.1.4

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

@androbinco/prompts-cli

A simple Command Line Interface (CLI) tool to fetch and organize generative AI prompts from a predefined set of public GitHub Gists.

Description

@androbinco/prompts-cli downloads content from specified public GitHub Gists and saves each Gist's content into a separate file within a local z-prompts directory. This helps in keeping your frequently used prompts readily available and organized.

Since this tool works exclusively with public Gists, no GitHub Personal Access Token (PAT) or special configuration is required to use it.

Usage

To use this CLI, you can run it directly using npx (which comes with Node.js) or pnpx (if you use pnpm as your package manager).

With npx:

npx @androbinco/prompts-cli

With pnpx (for pnpm users):

pnpx @androbinco/prompts-cli

Executing either of these commands will:

  • Create a directory named z-prompts in your current working directory (if it doesn't already exist).
  • Fetch the content from the predefined list of public Gists.
  • Save the content of each Gist into its own file within the z-prompts directory.

How It Works

The CLI has a hardcoded list of public GitHub Gist IDs and their intended output filenames. For each Gist in the list:

  • It fetches all files within that Gist.
  • It concatenates the content of these files.
  • It saves this combined content into a new file in the ./z-prompts/ directory, using the predefined name for that Gist.

Output

The CLI will generate a folder named z-prompts in the directory from which you run the command. Inside this folder, you will find files corresponding to each fetched Gist.

Example:

your-project/
├── z-prompts/
│   ├── COLORS_FOUNDATIONS.md
│   ├── ANOTHER_PROMPT_FILE.txt
│   └── ... (other fetched Gist files)
└── ... (your other project files)

Configuration

No special configuration or API keys are needed to run this CLI, as it is designed to work with publicly accessible Gists.

Prerequisites

Node.js: Version 18.x or higher is recommended. Node.js comes with npm and npx.

If you wish to use pnpx, you'll need to have pnpm installed (npm install -g pnpm).

Important Note on Output Directory (z-prompts)

When you run the CLI locally from within its own project directory for testing purposes, it will create the z-prompts output directory at the root of the CLI project.

⚠️ Disclaimer for Developers: The z-prompts directory and its contents are generated output and should not be committed to the CLI's version control history.

0.1.4

5 months ago

0.1.3

5 months ago

0.1.2

5 months ago

0.1.1

5 months ago