mirror of
https://github.com/foomo/posh-providers.git
synced 2026-12-04 19:51:51 +00:00
POSH task provider
Run simple tasks definitions.
Usage
Plugin
package main
type Plugin struct {
l log.Logger
commands command.Commands
}
func New(l log.Logger) (plugin.Plugin, error) {
var err error
inst := &Plugin{
l: l,
commands: command.Commands{},
}
// ...
inst.commands.Add(task.NewCommand(l))
// ...
return inst, nil
}
Config
## Open
task:
tasks:
init:
cmds: ['posh execute bun install', 'posh execute go mod tidy']
brew-nss:
hidden: true
prompt: If you're using Firefox, do you want me to install 'nss'?
cmds: ['brew install nss']
mkcert-install:
hidden: true
prompt: Do you need me to install the mkcert root certificate (only required once)?
cmds: ['posh execute mkcert install']
k3d-up:
deps: ['brew-nss', 'mkcert-install']
cmds:
- posh execute mkcert generate
- posh execute k3d up local
- posh execute cache clear