Taskfile.yaml

  1version: '3'
  2
  3tasks:
  4  lint:
  5    desc: Run linters
  6    cmds:
  7      - golangci-lint run ./...
  8
  9  lint:fix:
 10    desc: Run linters and fix issues
 11    cmds:
 12      - golangci-lint run --fix ./...
 13
 14  fmt:
 15    desc: Format code
 16    cmds:
 17      - go fmt ./...
 18
 19  test:
 20    desc: Run tests
 21    cmds:
 22      - go test {{.CLI_ARGS}} ./...
 23
 24  modernize:
 25    desc: Modernize code
 26    cmds:
 27      - modernize ./...
 28
 29  install:
 30    desc: Install catwalk locally
 31    cmds:
 32      - go install -v .
 33
 34  run:
 35    desc: Run catwalk
 36    aliases: [default]
 37    cmds:
 38      - go run .
 39  release:
 40    desc: Create and push a new tag following semver
 41    vars:
 42      NEXT:
 43        sh: svu next --always || go run github.com/caarlos0/svu/v3@latest next --always
 44    prompt: "This will release {{.NEXT}}. Continue?"
 45    preconditions:
 46      - sh: '[ $(git symbolic-ref --short HEAD) = "main" ]'
 47        msg: Not on main branch
 48      - sh: "[ $(git status --porcelain=2 | wc -l) = 0 ]"
 49        msg: "Git is dirty"
 50    cmds:
 51      - git commit --allow-empty -m "{{.NEXT}}"
 52      - git tag --annotate --sign -m "{{.NEXT}}" {{.NEXT}} {{.CLI_ARGS}}
 53      - echo "Pushing {{.NEXT}}..."
 54      - git push origin main --follow-tags
 55
 56  gen:all:
 57    desc: Generate all provider configurations
 58    aliases: [generate, gen]
 59    cmds:
 60      - task: gen:aihubmix
 61      - task: gen:copilot
 62      - task: gen:huggingface
 63      - task: gen:ionet
 64      - task: gen:openrouter
 65      - task: gen:synthetic
 66      - task: gen:venice
 67      - task: gen:vercel
 68
 69  gen:aihubmix:
 70    desc: Generate aihubmix provider configurations
 71    cmds:
 72      - go run cmd/aihubmix/main.go
 73
 74  gen:copilot:
 75    desc: Generate copilot provider configurations
 76    cmds:
 77      - go run cmd/copilot/main.go
 78
 79  gen:huggingface:
 80    desc: Generate huggingface provider configurations
 81    cmds:
 82      - go run cmd/huggingface/main.go
 83
 84  gen:ionet:
 85    desc: Generate io.net provider configurations
 86    cmds:
 87      - go run cmd/ionet/main.go
 88
 89  gen:openrouter:
 90    desc: Generate openrouter provider configurations
 91    cmds:
 92      - go run cmd/openrouter/main.go
 93
 94  gen:synthetic:
 95    desc: Generate synthetic provider configurations
 96    cmds:
 97      - go run cmd/synthetic/main.go
 98
 99  gen:venice:
100    desc: Generate venice provider configurations
101    cmds:
102      - go run cmd/venice/main.go
103
104  gen:vercel:
105    desc: Generate vercel provider configurations
106    cmds:
107      - go run cmd/vercel/main.go
108
109  update:
110    desc: Trigger the update workflow on GitHub
111    cmds:
112      - gh workflow run update.yml