Fresko - A configurable cli that keeps your project deps fresh

Overview

🍇 Fresko

(fresh in Basque)

A configurable cli that keeps your project deps fresh

Why?

Have you ever pulled someone else's code into your local environment, only to realize later that your code doesn't work anymore?

Was it because that person added a new Node.js dependency, a new migration, or anything else that needs to be "loaded" through some command?

With fresko, this will not happen - ever. 😀

Automatically react to changes in your repository, each time you're pulling new code, and never forget to run any critical command.

Install

// npm
npm install -D fresko

// yarn
yarn add -D fresko

// pnpm
pnpm add -D fresko

Usage

Create fresko.config.ts at project root

import { declareConfiguration } from 'fresko'

export default declareConfiguration({
    prompts: [
        // Will remind you to install updated node deps
        {
            path: 'yarn.lock',
            command: 'yarn install',
        },
        // Will remind you to run updated database fixtures
        {
            path: [
                'src/migration'
                'src/fixtures'
            ],
            command: 'yarn loadFixtures'
        }
    ]
})

Add git hook on post-merge event (optional, recommended)

npx husky add .husky/post-merge "exec < /dev/tty && npx fresko || true"

Why exec < /dev/tty? By default, git hooks are not interactive. This command allows the user to use their terminal to interact with Fresko during the hook.

License

MIT License © 2022 Quentin Hello

You might also like...

download torrents with node from the CLI

download torrents with node from the CLI

torrent Download torrents from the command line usage torrent magnet link OR path to .torrent file Download a torrent from a magnet link to torre

Dec 26, 2022

:white_square_button: WhatsApp chat from commandline/console/cli using GoogleChrome puppeteer

:white_square_button: WhatsApp chat from commandline/console/cli using GoogleChrome puppeteer

Whatspup Use Whatsapp from commandline/console/cli using GoogleChrome puppeteer! 😄 Features ✅ Send and receive messages ✅ Read Receipts ✅ Switch betw

Dec 1, 2022

:notes: Control iTunes via CLI

:notes: Control iTunes via CLI

itunes-remote Control iTunes via your terminal 🎶 Using JXA via osascript via Node.js. Requirements Node.js (v0.12.7 or greater) Mac OS X (Yosemite 10

Nov 19, 2022

Add stdin support to any CLI app that accepts file input

tmpin Add stdin support to any CLI app that accepts file input It pipes stdin to a temp file and spawns the chosen app with the temp file path as the

Oct 3, 2022

A CLI for peer-to-peer file sharing using the Hypercore Protocol.

A CLI for peer-to-peer file sharing using the Hypercore Protocol.

A CLI for peer-to-peer file sharing (and more) using the Hypercore Protocol.

Dec 30, 2022

Node.js Open CLI Framework. Built with 💜 by Heroku.

Node.js Open CLI Framework. Built with 💜 by Heroku.

oclif: Node.JS Open CLI Framework 🗒 Description 🚀 Getting Started Tutorial ✨ Features 📌 Requirements 🌈 CLI Types 🏗 Usage 📚 Examples 🔨 Commands

Jan 4, 2023

Git commit CLI

commitme Based on this gist by @gustavopch Installation You can install this on your package using npm i -D commitme or run it once using npx commitme

Jun 6, 2021

A CLI progam show teminal outputs as gradients.

A CLI progam show teminal outputs as gradients.

GRADIENT-TERMINAL A CLI progam to display teminal outputs as gradients. Requirements For Installation, you will only need Node.js. Install $ git clone

Jan 3, 2023
Comments
  • Implement CLI hot-reload

    Implement CLI hot-reload

    Latest fresko version removed dependency to shelljs 🚀

    However, if one's project is relying on fresko to automatically run npm/yarn/pnpm install on a project that just got upgraded to latest fresko version (which happened @sline-io today), developers will run into this issue:

    Error: Cannot find module '/XXX/node_modules/shelljs/src/exec-child.js'
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
        at Function.Module._load (internal/modules/cjs/loader.js:746:27)
        at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
        at internal/main/run_main_module.js:17:47 {
      code: 'MODULE_NOT_FOUND',
      requireStack: []
    }
    

    This is due to the fact that the fresko CLI currently running into the developer's terminal was still the version which had the dependency to shelljs - but during the CLI run the fresko dependencies changed - removing here the path to shelljs

    Implementing a hot-reload feature into fresko would solve this issue, here's how it'd work:

    1. fresko is ran using git hooks - will save it's package version in memory
    2. each time a prompt's command is ran, we will check again if fresko package version changed
    3. if package version got changed, fresko would exit & reload itself, using the new version that just got installed
    4. optional: find a way to recover the CLI current state, to avoid re-starting the prompt sequence from the beginning
    enhancement 
    opened by qhello 1
Owner
Quentin Hello
Software Engineer @sline-io
Quentin Hello
Pretty diff to html javascript cli (diff2html-cli)

diff2html-cli Diff to Html generates pretty HTML diffs from unified and git diff output in your terminal Table of Contents Features Online Example Dis

Rodrigo Fernandes 404 Dec 19, 2022
Infinite Red's cutting edge React Native project boilerplate, along with a CLI, component/model generators, and more!

Ignite - the hottest React Native boilerplate Battle-tested React Native boilerplate The culmination of five years of constant React Native developmen

Infinite Red, Inc. 14.7k Dec 29, 2022
A CLI tool for project Pigeon.

Pigeon CLI [Incubating] A CLI tool for project Pigeon. Getting Start Download if you have node.js installed upon you machine, you can install pigeon-c

Pigeon 2 Feb 18, 2022
Test your internet connection speed and ping using speedtest.net from the CLI

speed-test Test your internet connection speed and ping using speedtest.net from the CLI Install Ensure you have Node.js version 8+ installed. Then ru

Sindre Sorhus 3.8k Jan 7, 2023
An extension geared towards Spotify users with larger libraries; view all your playlists that contain a specific song with the click of a button. Designed for Spicetify (https://github.com/khanhas/spicetify-cli)

ViewPlaylistsWithSong An extension developed for Spicetify that allows you to view all the playlists in your library that contain a certain song. Idea

null 21 Dec 13, 2022
HMSC (How Much Stuffs CLI) analyst for your files and folders

HMSC ?? About HMSC (How Much Stuffs CLI) analyst for your files and folders ?? Screenshot ?? Requirements Node.js NPM ?? Installation $ npm i -g hmsc

Abdullah Veliyev 26 Jan 10, 2022
A C++ based command-line (CLI) program that lets you manage your tasks

COMMAND LINE INTERFACE TODO APP a command-line (CLI) program that lets you manage your tasks. The specification for this project is written down as te

Rahul Prabhakar 1 Dec 25, 2021
DataENV is a cli tool that allows you to save data temporarily using your terminal.

DataEnv CLI Instllation npm install -g dataenv Usage Table of Contents LocalStorage npx dataenv save Parameters npx dataenv show Parameters npx dataen

PGamerX 2 Feb 5, 2022
CLI tool for running Yeoman generators

yo What's Yeoman? Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive. To do so, we provide a

Yeoman 3.6k Dec 30, 2022
Distributed, realtime CLI for live Node apps.

Vantage = CLI + SSH + REPL for your live node app. In one line: require("vantage")().listen(4000); What just happened? That's voodoo magic: show me th

dc 3.5k Dec 30, 2022