Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gschier/will-you-please
✨ The easiest way to run scripts during development
https://github.com/gschier/will-you-please
cli developer-tools
Last synced: about 2 months ago
JSON representation
✨ The easiest way to run scripts during development
- Host: GitHub
- URL: https://github.com/gschier/will-you-please
- Owner: gschier
- License: mit
- Created: 2020-05-28T03:41:40.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-25T02:14:10.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T05:38:07.571Z (2 months ago)
- Topics: cli, developer-tools
- Language: Go
- Homepage:
- Size: 1.42 MB
- Stars: 40
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Will You Please [![Release](https://github.com/gschier/will-you-please/workflows/Release/badge.svg)](https://github.com/gschier/will-you-please/actions?query=workflow%3ARelease)
Will you please is a script runner for local development.
![Demo GIF](https://raw.githubusercontent.com/gschier/wyp/master/screenshots/demo.gif)
## Getting Started
Install the `wyp` binary:
```bash
go install github.com/gschier/wyp@latest
```Generate a config file:
```bash
wyp init # Generate ./wyp.yaml
```Run some commands!
```bash
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 directorywyp 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`.
```yaml
# ~~~~~~~~ #
# 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.
```yaml
# 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: .
```