version: "3" tasks: setup: cmds: - task: install-dependencies - task: set-env-db - task: migrate - task: generate-local-encryption-keys - task: generate-docs - task: set-env-all - task: seed-dev set-env-db: cmds: - | cat > .env < .env <" echo "Example: task migrate-down -- 20260223180620 # v1.0.82" exit 1 fi go run ./cmd/hatchet-migrate --down {{.CLI_ARGS}} seed-dev: dotenv: [.env] cmds: - SEED_DEVELOPMENT=true go run ./cmd/hatchet-admin seed seed-cypress: dotenv: [.env] cmds: - SEED_DEVELOPMENT=true go run ./cmd/hatchet-admin seed-cypress start-dev: deps: - task: goose-migrate - task: start-db - task: start-api - task: start-engine - task: start-frontend start-dev-tmux: cmds: - bash ./hack/dev/start-dev-tmux.sh start-api: cmds: - bash ./hack/dev/start-api.sh start-api-ci: cmds: - bash ./hack/ci/start-api.sh start-engine: cmds: - bash ./hack/dev/start-engine.sh start-engine-ci: cmds: - bash ./hack/ci/start-engine.sh start-frontend: cmds: - bash ./hack/dev/start-frontend.sh write-e2e-env: cmds: - bash ./hack/ci/write-e2e-env.sh e2e-frontend: desc: Run Cypress E2E for frontend/app against a locally started API stack (CI-friendly). cmds: - bash ./hack/ci/e2e-frontend.sh start-lite: cmds: - bash ./hack/dev/start-lite.sh start-ngrok: cmds: - ngrok http 8080 generate-all: aliases: [generate] cmds: - task: install-dependencies - task: generate-api - task: generate-proto - task: generate-sqlc - task: generate-docs - task: pre-commit-run install-dependencies: deps: [venv] cmds: - go mod download - cd frontend/app/ && pnpm install - cd frontend/docs/ && pnpm install - source .venv/bin/activate && pip install pre-commit generate-api: cmds: - task: generate-api-server - task: generate-api-client generate-docs: deps: [venv] dir: frontend/snippets cmds: - "source {{.ROOT_DIR}}/.venv/bin/activate && python generate.py" - task: fmt - task: sync-agent-instructions generate-certs: cmds: - bash ./hack/dev/generate-x509-certs.sh ./hack/dev/certs generate-local-encryption-keys: cmds: - bash ./hack/dev/generate-local-encryption-keys.sh ./hack/dev/encryption-keys init-dev-env: dotenv: [.env] cmds: - bash ./hack/dev/init-dev-token-and-env.sh generate-dev-api-token: cmds: - bash ./hack/dev/generate-dev-api-token.sh generate-api-server: cmds: - bash ./hack/oas/generate-server.sh silent: true generate-api-client: cmds: - bash ./hack/oas/generate-clients.sh silent: true generate-proto: cmds: - bash ./hack/proto/proto.sh generate-proto-python: dir: ./python-sdk cmds: - sh ./generate.sh generate-sqlc: cmds: - go run github.com/sqlc-dev/sqlc/cmd/sqlc@v1.29.0 generate --file pkg/repository/sqlcv1/sqlc.yaml lint: cmds: - task: lint-go - task: lint-go-guides - task: lint-python-guides - task: lint-typescript-guides - task: lint-ruby-guides - task: lint-app - task: lint-docs lint-go: cmd: golangci-lint run ./... --config .golangci.yml lint-go-guides: dir: sdks/guides/go cmd: golangci-lint run ./... --config .golangci.yml lint-python-guides: dir: sdks/guides/python cmd: poetry run ruff check . lint-typescript-guides: dir: sdks/guides/typescript cmd: pnpm install && pnpm run lint:check lint-ruby-guides: dir: sdks/guides/ruby cmd: bundle install && bundle exec rubocop lint-app: dir: frontend/app cmd: pnpm run lint:check lint-docs: dir: frontend/docs cmd: npm run lint:check kill-apis: cmds: - ps -A | grep 'cmd/hatchet-api' | grep -v grep | awk '{print $1}' | xargs kill -9 $1 - ps -A | grep 'exe/hatchet-api' | grep -v grep | awk '{print $1}' | xargs kill -9 $1 kill-engines: cmds: - ps -A | grep 'cmd/hatchet-engine' | grep -v grep | awk '{print $1}' | xargs kill -9 $1 - ps -A | grep 'exe/hatchet-engine' | grep -v grep | awk '{print $1}' | xargs kill -9 $1 copy-ca-to-sdks: cmds: - mkdir -p ./python-sdk/certs/ && cp ./hack/dev/certs/ca.cert ./python-sdk/certs/ venv: status: [test -d .venv] cmd: python3 -m venv .venv pre-commit-install: deps: [venv] cmd: source .venv/bin/activate && pip install pre-commit && pre-commit install pre-commit-run: deps: [venv] cmd: "source .venv/bin/activate && pre-commit run --all-files || pre-commit run --all-files" docs: cmds: - | # Create a trap to kill the watcher when the task exits trap 'kill $(jobs -p) 2>/dev/null' EXIT npx chokidar "sdks/**/*.{py,ts,go}" --ignore "**/node_modules/**" --ignore "**/.git/**" --ignore "**/dist/**" --ignore "**/build/**" --initial -c "echo 'TODO: Add a task to generate and sync the docs'" & cd frontend/docs/ && pnpm run taskfile-dev pytest: dir: ./sdks/python vars: WORKERS: '{{.WORKERS | default "auto"}}' RETRIES: '{{.RETRIES | default "3"}}' EXTRA_ARGS: '{{.EXTRA_ARGS | default ""}}' cmds: - poetry run pytest -n auto --retries 3 --retry-delay 5 start-telemetry: cmds: - docker compose -f docker-compose.infra.yml up -d test: cmds: - go test -count=1 $(go list ./... | grep -v "quickstart") -v -failfast test-integration: deps: - start-db - goose-migrate - generate-local-encryption-keys cmds: - defer: task: stop-db - go test -count=1 -tags integration $(go list ./... | grep -v "quickstart") -v -failfast