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:avian
 62      - task: gen:chutes
 63      - task: gen:copilot
 64      - task: gen:cortecs
 65      - task: gen:huggingface
 66      - task: gen:ionet
 67      - task: gen:nebius
 68      - task: gen:neuralwatt
 69      - task: gen:opencode-go
 70      - task: gen:opencode-zen
 71      - task: gen:openrouter
 72      - task: gen:synthetic
 73      - task: gen:venice
 74      - task: gen:vercel
 75      - task: gen:xai
 76
 77  gen:aihubmix:
 78    desc: Generate aihubmix provider configurations
 79    cmds:
 80      - go run cmd/aihubmix/main.go
 81
 82  gen:avian:
 83    desc: Generate avian provider configurations
 84    cmds:
 85      - go run cmd/avian/main.go
 86
 87  gen:chutes:
 88    desc: Generate chutes provider configurations
 89    cmds:
 90      - go run cmd/chutes/main.go
 91
 92  gen:copilot:
 93    desc: Generate copilot provider configurations
 94    cmds:
 95      - go run cmd/copilot/main.go
 96
 97  gen:cortecs:
 98    desc: Generate cortecs provider configurations
 99    cmds:
100      - go run cmd/cortecs/main.go
101
102  gen:huggingface:
103    desc: Generate huggingface provider configurations
104    cmds:
105      - go run cmd/huggingface/main.go
106
107  gen:ionet:
108    desc: Generate io.net provider configurations
109    cmds:
110      - go run cmd/ionet/main.go
111
112  gen:nebius:
113    desc: Generate Nebius provider configurations
114    cmds:
115      - go run cmd/nebius/main.go
116
117  gen:neuralwatt:
118    desc: Generate Neuralwatt provider configurations
119    cmds:
120      - go run cmd/neuralwatt/main.go
121
122  gen:opencode-go:
123    desc: Generate OpenCode Go provider configurations
124    cmds:
125      - go run cmd/opencode-go/main.go
126
127  gen:opencode-zen:
128    desc: Generate OpenCode Zen provider configurations
129    cmds:
130      - go run cmd/opencode-zen/main.go
131
132  gen:openrouter:
133    desc: Generate openrouter provider configurations
134    cmds:
135      - go run cmd/openrouter/main.go
136
137  gen:synthetic:
138    desc: Generate synthetic provider configurations
139    cmds:
140      - go run cmd/synthetic/main.go
141
142  gen:venice:
143    desc: Generate venice provider configurations
144    cmds:
145      - go run cmd/venice/main.go
146
147  gen:vercel:
148    desc: Generate vercel provider configurations
149    cmds:
150      - go run cmd/vercel/main.go
151
152  gen:xai:
153    desc: Generate xAI provider configurations
154    cmds:
155      - go run cmd/xai/main.go
156
157  update:
158    desc: Trigger the update workflow on GitHub
159    cmds:
160      - gh workflow run update.yml