@androbinco/prompts-cli v0.1.4
@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-cliWith pnpx (for pnpm users):
pnpx @androbinco/prompts-cliExecuting 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.