<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Brajesh</title>
    <description>The latest articles on DEV Community by Brajesh (@brajesh_).</description>
    <link>https://dev.to/brajesh_</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3892558%2Fde981ef8-e6f8-4d21-b549-3c7d438850f2.jpg</url>
      <title>DEV Community: Brajesh</title>
      <link>https://dev.to/brajesh_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/brajesh_"/>
    <language>en</language>
    <item>
      <title>Gemini CLI + Termux + Notifications + GitHub = You Just Hired an AI Developer</title>
      <dc:creator>Brajesh</dc:creator>
      <pubDate>Wed, 22 Apr 2026 12:57:56 +0000</pubDate>
      <link>https://dev.to/brajesh_/gemini-cli-termux-notifications-github-you-just-hired-an-ai-developer-4m9d</link>
      <guid>https://dev.to/brajesh_/gemini-cli-termux-notifications-github-you-just-hired-an-ai-developer-4m9d</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;One prompt. Zero babysitting. Full GitHub integration, smart notifications, and an agent that works while you're away.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  What You'll Have After This
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ Gemini CLI running natively on Android via Termux&lt;/li&gt;
&lt;li&gt;✅ GitHub fully authenticated — no interactive prompts, no credential walls&lt;/li&gt;
&lt;li&gt;✅ A &lt;code&gt;notify&lt;/code&gt; command Gemini uses to ping you when it needs you&lt;/li&gt;
&lt;li&gt;✅ YOLO mode enabled — Gemini executes without asking permission every 5 seconds&lt;/li&gt;
&lt;li&gt;✅ &lt;code&gt;GEMINI.md&lt;/code&gt; pre-loaded with instructions so Gemini never gets stuck on GitHub again&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of this happens from &lt;strong&gt;a single prompt you paste into Gemini&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before you paste the master prompt, do these two things manually. They take about 5 minutes.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. Install Termux &amp;amp; Termux:API
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Do NOT use the Play Store version of Termux.&lt;/strong&gt; It is discontinued and won't receive updates.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Download &lt;strong&gt;Termux&lt;/strong&gt; from &lt;a href="https://github.com/termux/termux-app/releases" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and termux api too from: &lt;a href="https://github.com/termux/termux-api/releases" rel="noopener noreferrer"&gt;https://github.com/termux/termux-api/releases&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Open Termux and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pkg update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; pkg upgrade &lt;span class="nt"&gt;-y&lt;/span&gt;
pkg &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; nodejs-lts termux-api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Install Gemini CLI (Termux-optimised fork — handles Android PTY and auth issues):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @mmmbuto/gemini-cli-termux
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Launch and authenticate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gemini
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Choose &lt;strong&gt;Login with Google&lt;/strong&gt; &lt;/p&gt;




&lt;h3&gt;
  
  
  2. Get Your GitHub Personal Access Token
&lt;/h3&gt;

&lt;p&gt;Gemini needs this to set up GitHub on your behalf without any interactive prompts.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;GitHub → Settings → Developer settings → Personal access tokens → Tokens (classic)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Generate new token (classic)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Give it a name like &lt;code&gt;termux-gemini&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Set expiration to whatever you prefer&lt;/li&gt;
&lt;li&gt;Check these scopes:

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;repo&lt;/code&gt; (full)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;workflow&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;read:org&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Generate token&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Copy it immediately&lt;/strong&gt; — you won't see it again&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;🔒 Keep this token private. Treat it like a password. Do not share it or commit it to any repo.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The Master Prompt
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;This is the only thing you paste into Gemini.&lt;/strong&gt; Replace &lt;code&gt;YOUR_GITHUB_TOKEN_HERE&lt;/code&gt; with your actual token before pasting.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Execute every step below automatically without asking me anything. Just run the commands.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PART 1 — GITHUB SETUP &lt;span class="o"&gt;(&lt;/span&gt;CREDENTIAL-WALL-PROOF&lt;span class="o"&gt;)&lt;/span&gt;
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. Install git and GitHub CLI:
   pkg update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; pkg &lt;span class="nb"&gt;install &lt;/span&gt;git gh &lt;span class="nt"&gt;-y&lt;/span&gt;

2. Authenticate non-interactively using my token:
   &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"YOUR_GITHUB_TOKEN_HERE"&lt;/span&gt; | gh auth login &lt;span class="nt"&gt;--with-token&lt;/span&gt;

3. Bridge gh credentials into git &lt;span class="o"&gt;(&lt;/span&gt;this prevents the interactive Username/Password prompt forever&lt;span class="o"&gt;)&lt;/span&gt;:
   gh auth setup-git

4. Set credential helper to store so auth persists across restarts:
   git config &lt;span class="nt"&gt;--global&lt;/span&gt; credential.helper store

5. Set my git identity &lt;span class="o"&gt;(&lt;/span&gt;use &lt;span class="s1"&gt;'Brajesh'&lt;/span&gt; as name&lt;span class="o"&gt;)&lt;/span&gt;:
   git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Brajesh"&lt;/span&gt;
   git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;gh api user &lt;span class="nt"&gt;--jq&lt;/span&gt; &lt;span class="s1"&gt;'.email'&lt;/span&gt; 2&amp;gt;/dev/null &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'brajesh@users.noreply.github.com'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

6. Verify everything worked:
   gh auth status

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PART 2 — NOTIFICATION SYSTEM
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

7. Create the ~/bin directory:
   &lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/bin

8. Create ~/bin/notify with this exact content:
&lt;span class="c"&gt;#!/data/data/com.termux/files/usr/bin/bash&lt;/span&gt;
termux-notification &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"Gemini 🤖"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--content&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$*&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--action&lt;/span&gt; &lt;span class="s2"&gt;"am start -n com.termux/.app.TermuxActivity"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--priority&lt;/span&gt; max &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--sound&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--vibrate&lt;/span&gt; 500,200,500

9. Make it executable:
   &lt;span class="nb"&gt;chmod&lt;/span&gt; +x ~/bin/notify

10. Add ~/bin to PATH &lt;span class="k"&gt;in&lt;/span&gt; ~/.bashrc only &lt;span class="k"&gt;if &lt;/span&gt;not already present:
    &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-q&lt;/span&gt; &lt;span class="s1"&gt;'HOME/bin'&lt;/span&gt; ~/.bashrc &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'export PATH="$HOME/bin:$PATH"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc

11. Source ~/.bashrc:
    &lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc

12. Test the notification:
    notify &lt;span class="s2"&gt;"Notify system is online ✅"&lt;/span&gt;

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PART 3 — YOLO MODE &lt;span class="o"&gt;(&lt;/span&gt;PERMANENT&lt;span class="o"&gt;)&lt;/span&gt;
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

13. Add a permanent gemini &lt;span class="nb"&gt;alias &lt;/span&gt;with YOLO mode to ~/.bashrc &lt;span class="o"&gt;(&lt;/span&gt;skip &lt;span class="k"&gt;if &lt;/span&gt;already exists&lt;span class="o"&gt;)&lt;/span&gt;:
    &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-q&lt;/span&gt; &lt;span class="s1"&gt;'alias gemini='&lt;/span&gt; ~/.bashrc &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"alias gemini='gemini --yolo'"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.bashrc
    &lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PART 4 — GEMINI.MD INSTRUCTIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

14. Create ~/.gemini directory &lt;span class="k"&gt;if &lt;/span&gt;it doesn&lt;span class="s1"&gt;'t exist:
    mkdir -p ~/.gemini

15. APPEND the following to ~/.gemini/GEMINI.md (do NOT overwrite existing content):

## Git &amp;amp; GitHub Workflow

MANDATORY: These rules apply to every session. Never skip them.

### Setup Verification
Before doing any git operation, ensure credentials are bridged:
  gh auth setup-git

### Cloning
Always clone using GitHub CLI to inherit permissions automatically:
  gh repo clone &amp;lt;owner&amp;gt;/&amp;lt;repo&amp;gt;

Never use plain `git clone https://...` — it will hit a credential prompt.

### Branching
Always work on a feature branch. Never commit directly to main:
  git checkout -b feature/your-feature-name

### Pushing &amp;amp; PRs
Use `gh pr create --fill` to push and open a PR non-interactively:
  git add . &amp;amp;&amp;amp; git commit -m "your message" &amp;amp;&amp;amp; git push origin HEAD
  gh pr create --fill

Never use interactive PR flows — they will stall the agent.

### If git push stalls
Run these to fix permanently:
  gh auth setup-git
  git config --global credential.helper store
Then retry the push.

---

## User Presence &amp;amp; Notifications

The user typically minimizes Termux while tasks run.
NEVER assume the user is watching the terminal.

Use the `notify` shell command in these situations:
- A long-running task has completed
- You need the user'&lt;/span&gt;s input or a decision before continuing
- An error occurred that requires attention
- You are about to &lt;span class="k"&gt;do &lt;/span&gt;something destructive or irreversible

&lt;span class="c"&gt;### How to use&lt;/span&gt;
  notify &lt;span class="s2"&gt;"your message here"&lt;/span&gt;

Tapping the notification brings the user back to Termux.

&lt;span class="c"&gt;### Rules&lt;/span&gt;
- Do NOT spam — only notify at meaningful checkpoints
- Always notify when &lt;span class="k"&gt;done &lt;/span&gt;with a multi-step task
- Always notify before destructive operations

&lt;span class="c"&gt;### Examples&lt;/span&gt;
  notify &lt;span class="s2"&gt;"Done! Build finished successfully ✅"&lt;/span&gt;
  notify &lt;span class="s2"&gt;"Waiting for your input before I continue — check Termux"&lt;/span&gt;
  notify &lt;span class="s2"&gt;"Error encountered ❌ — cannot proceed without you"&lt;/span&gt;
  notify &lt;span class="s2"&gt;"About to delete old backups — open Termux to confirm"&lt;/span&gt;

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PART 5 — FINAL CONFIRMATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

16. Send a final notification when everything is &lt;span class="k"&gt;done&lt;/span&gt;:
    notify &lt;span class="s2"&gt;"All set! Gemini + GitHub + Notifications ready 🚀"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What That Prompt Does (Behind the Scenes)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  GitHub — The Credential Wall Fix
&lt;/h3&gt;

&lt;p&gt;The standard GitHub setup breaks for AI agents because &lt;code&gt;git push&lt;/code&gt; hangs waiting for a human to type a username and password. This prompt solves it permanently using a two-layer approach:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 1 — &lt;code&gt;gh auth setup-git&lt;/code&gt;&lt;/strong&gt; configures git to use the GitHub CLI as its credential provider. Instead of prompting a human, git silently asks &lt;code&gt;gh&lt;/code&gt; for the token.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 2 — &lt;code&gt;credential.helper store&lt;/code&gt;&lt;/strong&gt; persists the session so it survives Termux restarts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Layer 3 — &lt;code&gt;gh pr create --fill&lt;/code&gt;&lt;/strong&gt; lets Gemini open pull requests without any interactive UI prompts.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Notification System
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;notify&lt;/code&gt; command wraps &lt;code&gt;termux-notification&lt;/code&gt; with settings tuned for heads-up alerts:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--priority max&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Forces a heads-up popup over any app you're using&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--sound&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Audible alert even with screen off&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--vibrate 500,200,500&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Physical vibration pattern&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;--action "am start ..."&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Tapping opens Termux immediately&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No &lt;code&gt;--id&lt;/code&gt; flag&lt;/td&gt;
&lt;td&gt;Every call is treated as a new notification — guaranteed to ring&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  YOLO Mode
&lt;/h3&gt;

&lt;p&gt;YOLO mode disables Gemini's confirmation prompts for every tool call. Without it, Gemini asks permission before every file edit, every shell command, every git operation — making autonomous work nearly impossible.&lt;/p&gt;

&lt;p&gt;The alias &lt;code&gt;gemini='gemini --yolo'&lt;/code&gt; applies it automatically every time you start a session.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Use in trusted environments only.&lt;/strong&gt; YOLO mode means Gemini executes without asking. Great for your own projects — be thoughtful about sensitive repos.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  GEMINI.md
&lt;/h3&gt;

&lt;p&gt;The instructions written to &lt;code&gt;~/.gemini/GEMINI.md&lt;/code&gt; are loaded into Gemini's context on every session, globally. This means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gemini always knows how to handle GitHub without getting stuck&lt;/li&gt;
&lt;li&gt;Gemini always knows when and how to send you notifications&lt;/li&gt;
&lt;li&gt;These rules persist across reboots, new sessions, and new projects&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  After Setup
&lt;/h2&gt;

&lt;p&gt;Start every future Gemini session just by opening Termux and running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gemini
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;YOLO mode is on. Instructions are loaded. Gemini will notify you when it needs you.&lt;/p&gt;

&lt;p&gt;You don't have to watch the terminal anymore.&lt;/p&gt;




&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Notification doesn't pop up?&lt;/strong&gt;&lt;br&gt;
Make sure Termux has notification permissions. Go to Android Settings → Apps → Termux → Notifications → Allow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;notify: command not found&lt;/code&gt;?&lt;/strong&gt;&lt;br&gt;
Run &lt;code&gt;source ~/.bashrc&lt;/code&gt; or restart Termux. The PATH update needs a fresh shell.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;gh auth status&lt;/code&gt; shows unauthenticated?&lt;/strong&gt;&lt;br&gt;
Your token may have expired or have wrong scopes. Generate a new one and re-run Part 1 of the master prompt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;git push still hangs?&lt;/strong&gt;&lt;br&gt;
Run &lt;code&gt;gh auth setup-git&lt;/code&gt; manually, then retry. If it still hangs, run &lt;code&gt;git config --global credential.helper store&lt;/code&gt; and push once manually to cache credentials.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built on Android. Runs while you sleep. Pings you when it matters.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
