Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexis-moins/recipe
Store files in a recipe book to use them anytime, anywhere 📚
https://github.com/alexis-moins/recipe
bash cli recipe
Last synced: 4 days ago
JSON representation
Store files in a recipe book to use them anytime, anywhere 📚
- Host: GitHub
- URL: https://github.com/alexis-moins/recipe
- Owner: alexis-moins
- License: mit
- Created: 2021-10-19T18:14:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-09T14:27:30.000Z (2 months ago)
- Last Synced: 2024-09-09T17:31:48.755Z (2 months ago)
- Topics: bash, cli, recipe
- Language: Shell
- Homepage:
- Size: 115 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Version](https://img.shields.io/badge/version-1.7.1-blue.svg)
`recipe` is a bash script allowing users to manage a collection of git repositories (called a `recipe books`) of files commonly used across different projects or directories (called `recipes`). You could, for instance, add generic Dockerfile or docker-compose.yaml files to your recipe book to easily bootstrap new docker projects.
## Prerequisites
- bash 4.0 or higher
- [gum](https://github.com/charmbracelet/gum)
- git## 🧰 Installation
Clone the repository
```bash
git clone [email protected]:alexis-moins/recipe.git ~/.recipe
```Go into the install directory and execute the [install](install.sh) script:
```bash
./install.sh
```The install script copies the `recipe` script in the `~/.local/bin` directory (you can also change the destination by passing it as an argument to the install script).
## 🌱 Quick Start
After installing, you can follow these steps to quickly see how it works:
```bash
# First initialize a new recipe book
recipe book add personal# Or, if you already have a recipe book
recipe book add personal [email protected]:alexis-moins/recipe-book.git# Set the recipe book as the global one
recipe book global personal# You can now add a recipe
recipe add Dockerfile docker/express-js# View the list of your recipes
recipe list# Edit a recipe
recipe edit docker/express-js# Even use a recipe in another project
recipe use docker/express-js Dockerfile
```## 🚦 Usage
```
$ reciperecipe - store redundant files in a recipe book to use them anytime, anywhere
Usage:
recipe COMMAND
recipe [COMMAND] --help | -h
recipe --version | -vRecipe Commands:
add Add a new recipe
list List all your recipes
filter Filter recipes
use Use a recipe locally
remove Remove a recipe
edit Edit a recipe
show Show the content of a recipeCommands:
env Print environment information
book List, filter, and add recipe booksGit Commands:
status Show the status of your recipe book
stage Stage files interactively
unstage Unstage files interactively
restore Restore unstaged files interactively
diff Show interactive diff with last commit
commit Commit changes
git Run git commands within your recipe bookRecipe Book Commands:
cd Navigate to your recipe book in a new shellOptions:
--recipe-book, -b RECIPE_BOOK
Name of the recipe book--help, -h
Show this help--version, -v
Show version numberEnvironment Variables:
RECIPE_SHOW_CMD
Command used to show recipes
Default: cat
```