Skip to content

Optimize justfile with grouped recipes and typed deploy-api flags#83

Merged
codemountains merged 7 commits into
mainfrom
cursor/justfile-optimization-0bca
Jul 11, 2026
Merged

Optimize justfile with grouped recipes and typed deploy-api flags#83
codemountains merged 7 commits into
mainfrom
cursor/justfile-optimization-0bca

Conversation

@codemountains

Copy link
Copy Markdown
Owner

Summary

Restructures the repository command surface around a documented, grouped justfile and breaks the old ENV= / DRY_RUN= deploy syntax in favor of typed flags.

Changes

  • Add [group] / [doc] metadata, set default-list, and set minimum-version := "1.46.0"
  • Add composite recipes: ci, ci-full, fix, dev-api-fresh, nix-check, nix-fmt
  • Guard reset-api-state with [confirm]
  • Extract local Cloudflare helpers to just/cloudflare.just (d1-query, r2-get)
  • Change deploy-api to --env, --dry-run, and --confirm
  • Update scripts/deploy-api.ts, tests, README/docs, and GitHub Actions to use the new just surface

New command examples

just                  # list recipes
just ci               # justfile format check + check + coverage
just ci-full          # ci + smoke e2e
just fix              # format + lint-md-fix
just dev-api-fresh    # reset local state + start API
just deploy-api --env staging --dry-run
just deploy-api --env production --confirm
just d1-query "SELECT id, mode FROM endpoints LIMIT 5;"

Verification

  • just --fmt --check
  • just ci (203 tests, coverage report generated)
  • pnpm exec vitest run scripts/deploy-api.test.ts (7 tests)

Residual risk

  • code-reviewer subagent was unavailable in this environment; review was limited to local verification above.
  • CI now depends on extractions/setup-just@v3; first run on GitHub will confirm action availability.
Open in Web Open in Cursor 

cursoragent and others added 2 commits July 11, 2026 08:18
…api flags

Reorganize the project command surface around just groups, documentation
attributes, and composite recipes (ci, ci-full, fix, dev-api-fresh). Add
Cloudflare local inspection helpers via just/cloudflare.just, guard
reset-api-state with confirmation, and expose nix-check/nix-fmt recipes.

deploy-api now uses --env/--dry-run/--confirm flags instead of ENV= style
assignments. Update docs, CI workflows, and deploy-api tests accordingly.

Co-authored-by: Kazuno Fukuda <codemountains@gmail.com>
Co-authored-by: Kazuno Fukuda <codemountains@gmail.com>
@codemountains codemountains marked this pull request as ready for review July 11, 2026 08:39
Co-authored-by: Kazuno Fukuda <codemountains@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 593f863322

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread justfile Outdated
Clear legacy deploy env vars in the just recipe and read confirmation
and dry-run state from BARESTASH_DEPLOY_* variables instead. Add regression
tests that exported CONFIRM/DRY_RUN no longer bypass --confirm or --dry-run.

Co-authored-by: Kazuno Fukuda <codemountains@gmail.com>
@codemountains

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 97c5703e68

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread justfile Outdated
The justfile uses set default-list (1.52+) and set minimum-version (1.55+),
so the declared floor must match the newest required feature.

Co-authored-by: Kazuno Fukuda <codemountains@gmail.com>
@codemountains

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6da91a582

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/deploy-api.ts Outdated
Stop accepting ambient ENV for deploy-api side effects. The just recipe
now exports BARESTASH_DEPLOY_ENV and clears legacy ENV, matching the
BARESTASH_DEPLOY_* contract used for confirm and dry-run flags.

Co-authored-by: Kazuno Fukuda <codemountains@gmail.com>
@codemountains

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c69d9cb59d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread just/cloudflare.just Outdated
Prevent shell re-parsing of operator SQL before Wrangler receives the
--command argument.

Co-authored-by: Kazuno Fukuda <codemountains@gmail.com>
@codemountains

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 63a6b51271

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@codemountains codemountains merged commit 4459b0b into main Jul 11, 2026
3 checks passed
@codemountains codemountains deleted the cursor/justfile-optimization-0bca branch July 11, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants