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  modernize:
20    desc: Modernize code
21    cmds:
22      - modernize ./...
23
24  install:
25    desc: Install catwalk locally
26    cmds:
27      - go install -v .
28
29  run:
30    desc: Run catwalk
31    aliases: [default]
32    cmds:
33      - go run .
34  release:
35    desc: Create and push a new tag following semver
36    vars:
37      NEXT:
38        sh: svu next --always || go run github.com/caarlos0/svu/v3@latest next --always
39    prompt: "This will release {{.NEXT}}. Continue?"
40    preconditions:
41      - sh: '[ $(git symbolic-ref --short HEAD) = "main" ]'
42        msg: Not on main branch
43      - sh: "[ $(git status --porcelain=2 | wc -l) = 0 ]"
44        msg: "Git is dirty"
45    cmds:
46      - git commit --allow-empty -m "{{.NEXT}}"
47      - git tag --annotate --sign -m "{{.NEXT}}" {{.NEXT}} {{.CLI_ARGS}}
48      - echo "Pushing {{.NEXT}}..."
49      - git push origin main --follow-tags
50
51  gen:all:
52    desc: Generate all provider configurations
53    aliases: [generate, gen]
54    cmds:
55      - task: gen:copilot
56      - task: gen:huggingface
57      - task: gen:openrouter
58      - task: gen:synthetic
59
60  gen:copilot:
61    desc: Generate copilot provider configurations
62    cmds:
63      - go run cmd/copilot/main.go
64
65  gen:huggingface:
66    desc: Generate huggingface provider configurations
67    cmds:
68      - go run cmd/huggingface/main.go
69
70  gen:openrouter:
71    desc: Generate openrouter provider configurations
72    cmds:
73      - go run cmd/openrouter/main.go
74
75  gen:synthetic:
76    desc: Generate synthetic provider configurations
77    cmds:
78      - go run cmd/synthetic/main.go