posh-providers/arbitrary/task
2025-09-22 07:05:37 +02:00
..
command.go feat: use json required 2025-09-22 07:05:37 +02:00
config_test.go feat: use json required 2025-09-22 07:05:37 +02:00
config.base.json feat: generate schema 2025-09-19 16:29:28 +02:00
config.go feat(arbitrary/task): add command 2025-04-08 09:15:31 +02:00
config.schema.json feat: generate schema 2025-09-19 16:29:28 +02:00
README.md feat(arbitrary/task): add command 2025-04-08 09:15:31 +02:00
task.go feat: use json required 2025-09-22 07:05:37 +02: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
tasks:
  init:
    cmds: ['posh execute bun install', 'posh execute go mod tidy']
  brew-nss:
    hidden: true
    confirm: If you're using Firefox, do you want me to install 'nss'?
    cmds: ['brew install nss']
  mkcert-install:
    hidden: true
    confirm: 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