Skip to content

Instantly share code, notes, and snippets.

@anoochit
Last active August 20, 2025 02:36
Show Gist options
  • Save anoochit/dc8b49f1d8d7d63a3a0e77444fddec4e to your computer and use it in GitHub Desktop.
Save anoochit/dc8b49f1d8d7d63a3a0e77444fddec4e to your computer and use it in GitHub Desktop.
Makefile for flutter dev with Gemini CLI
# This Makefile is designed to be run with PowerShell on Windows.
# It explicitly sets PowerShell as the shell.
SHELL := pwsh.exe
.SHELLFLAGS := -Command
all: get
get:
# get all packages
flutter pub get
upgrade:
# upgrade to lastest major versions
dart pub upgrade --major-versions
locale:
# generate locales from messages
getx generate locales .\assets\locales\
commit-ai:
# dart fix
dart fix --apply
# Stage all changes (optional, remove if you want to stage manually)
git add .
# Generate commit message with gemini and commit
git diff HEAD | gemini --model gemini-2.5-flash -p "Based on the following git diff, write a concise and descriptive commit message following the conventional commit format." > commit-message.log
# Remove fist line (optional)
(Get-Content commit-message.log | Select-Object -Skip 1) | Set-Content commit-message.log
# Commit log from file
git commit -F commit-message.log
# Git push
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment