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:vercel
 67
 68  gen:aihubmix:
 69    desc: Generate aihubmix provider configurations
 70    cmds:
 71      - go run cmd/aihubmix/main.go
 72
 73  gen:copilot:
 74    desc: Generate copilot provider configurations
 75    cmds:
 76      - go run cmd/copilot/main.go
 77
 78  gen:huggingface:
 79    desc: Generate huggingface provider configurations
 80    cmds:
 81      - go run cmd/huggingface/main.go
 82
 83  gen:ionet:
 84    desc: Generate io.net provider configurations
 85    cmds:
 86      - go run cmd/ionet/main.go
 87
 88  gen:openrouter:
 89    desc: Generate openrouter provider configurations
 90    cmds:
 91      - go run cmd/openrouter/main.go
 92
 93  gen:synthetic:
 94    desc: Generate synthetic provider configurations
 95    cmds:
 96      - go run cmd/synthetic/main.go
 97
 98  gen:vercel:
 99    desc: Generate vercel provider configurations
100    cmds:
101      - go run cmd/vercel/main.go