wyp

command module
v0.2.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 13 Imported by: 0

README

Will You Please Release

Will you please is a script runner for local development.

Demo GIF

Getting Started

Install the wyp binary:

curl -sf https://gobinaries.com/gschier/wyp | sh

Generate a config file:

wyp init  # Generate ./wyp.yaml

Run some commands!

wyp run                           # Prompt for script to run
wyp run [name]                    # Execute script by name
wyp run [name] --watch            # Prompt and restart on file change
wyp run [name] --watch-dir ./src  # Watch specific directory

wyp combine [name...]  # Execute scripts in parallel

wyp start  # Shorthand for `wyp run start`

Configuration

Configuration is defined in wyp.(yaml|toml|json). An sample config can be generated by running wyp init.

# ~~~~~~~~ #
# wyp.yaml #
# ~~~~~~~~ #

# Scripts are defined in a map of [name] => [config]
scripts:
  backend:
    help: run the backend
    run: go run main.go
    watch: .
    
  backend:
    help: run the frontend
    run: npm start
    watch: ./frontend
    
  start:
    help: run backend and frontend
    combine:
      - backend
      - frontend

Here's a dummy config that showcases all possible options.

  # Complete example
  everything-example:

    # Help text for command
    help: command with all options
  
    # Make available under "wyp [name]" vs default "wyp run [name]"
    root: true
  
    # Execute other scripts by name
    combine:
      - command1
      - command2

    # Code to execute for script
    run: echo "Hello World"
  
    # Define environment variables for run context
    env:
      - NAME=value
      - ANOTHER='something that needs quotes'

    # Change the directory the command is run in (default ./)
    dir: './some/other/directory'

    # Hide command from help output
    hide: true

    # Select between bash/zsh/sh (default: current shell)
    shell: bash

    # Restart when file change detected (recursive)
    watch: .

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL