
Using leftover/spare quota of Gemini CLI or Claude Code's CLI to automate daily tasks
Table of Contents
Many developers and power users have leftover quota from their Claude Pro subscription or free tier access to Gemini CLI. Instead of letting this computational power go to waste, you can harness it to automate routine tasks and create intelligent workflows that run seamlessly across all your devices.
This is product spec for the same. I wrote it as a starting point for Claude Code.
TL;DR
- Use Claude Code (with Claude Pro plan, to utilize it's leftover quota in every block of 5 hours) or Gemini CLI (which is free as of July 2025).
- Build a script, so that it can be used on on Mac, Windows and Linux. This will also allow it's usage on Android via Termux to run this system on old/spare Android smartphne for virtually no extra cost.
- Use Cron for timely execution.
- Check leftover/spare quota using:
- For Claude Code with Claude Pro plan: Use something like this: `ccusage blocks --since 20250722 --until 20250722 --json`
- For Gemini CLI: As of July 2025, it's free. I am guessing that Google has enough cash surplus to keep it free long enough either until their models are market leaders (or until they take a significant market share from their competitors).
- Maybe use thinking model, sequential thinking or deep research mode to come up with topics. Or maybe, upload a book as pdf or markdown.
- Agent mode (i.e. run multiple prompts in a pipeline).
- Use Python or bash to create a pipeline.
- Send all relevant output to a slack channel, to be reviewed later.
- Use relevant MCP servers (if you intend to run this on a spare Android device, make sure to use MCP servers that work correctly on Android).
- Zen MCP with Openrouter to use different models for different tasks that the models excel at.
- Markdown mcp to convert books (maybe ask ai to parse both pdf and markdown of same chapter to make sure everything is understood correctly)
- Sequential thinking / Deep Research
- Filesystem MCP to store generated files
- Send native mac notification when a long running prompt is finished https://github.com/devizor/macOS-Notification-MCP
- Generate output in markdown for easy consumption by next step of agent as well as human reading.
- Allow globally recognized configurations such as `.env` or `settings.json`.
Detailed description of the flow:
The Opportunity
Claude Code comes bundled with Claude Pro plans and provides generous quota that resets every 5 hours. Meanwhile, Gemini CLI remains completely free as of July 2025. Both tools offer powerful automation capabilities that most users barely scratch the surface of.
One key insight is building cross-platform scripts that work identically on Mac, Windows, Linux, and even Android via Termux. This approach lets you repurpose old Android devices as dedicated automation servers at virtually no additional cost.
Checking Your Available Quota
Before diving into automation, establish quota monitoring:
For Claude Code:
Use something similar like this:
`ccusage blocks --since 20250722 --until 20250722 --json`
For Gemini CLI:
Currently free with no quota restrictions. Google's substantial bank balance suggest this will remain viable for the foreseeable future, at least until they capture significant market share, or they launch models which become clear industry leaders in multi-modality usecases.
Building Your Automation Pipeline
Core Architecture
Create a Python or bash pipeline that chains multiple AI prompts together in agent mode. Each step feeds its output to the next, creating sophisticated workflows that rival expensive enterprise solutions.
Scheduling with Cron
Set up regular execution using cron jobs. This ensures your automation runs consistently without manual intervention, whether you're checking market trends, summarizing news, or processing documents.
Enhanced Capabilities with MCP Servers
Model Context Protocol servers dramatically expand what's possible:
- Zen MCP with OpenRouter: Route different tasks to models that excel at specific functions
- Markdown MCP: Convert and process books, ensuring accuracy by cross-referencing PDF and markdown versions
- Sequential Thinking/Deep Research: Engage advanced reasoning modes for complex analysis
- Filesystem MCP: Organize and store generated content systematically
- macOS Notification MCP: Get alerts when long-running processes complete
Cross-Platform Configuration
Use standard configuration patterns like .env files or settings.json to maintain consistency across devices. This ensures that if a user has configured settings like OPENROUTER_KEY in one of the globally de facto configuration files (for some other program), then our program will automatically pick the relevant settings.
Practical Implementation
* Structure your output in markdown format for maximum compatibility. This makes content easily consumable by both subsequent AI processing steps. It also makes human review process much easier.
* Route all results to a designated Slack channel for centralized monitoring and review.
* For Android deployment via Termux, verify that your chosen MCP servers function correctly on Android environment. Some servers may have architecture-specific dependencies that require alternatives.
Advanced Techniques
* Consider uploading entire books as PDFs or markdown files to generate comprehensive analysis and insights. Or, use sequential thinking, 'thinking' LLM models or deep research modes to explore complex topics that would be time-consuming to research manually.
* The agent mode approach allows for sophisticated multi-step reasoning where each phase builds upon previous results, creating outputs that far exceed what single prompts could achieve.
Getting Started
Begin with simple tasks like daily news summarization or weather reporting. Once your pipeline proves reliable, expand into more complex workflows like market analysis, document processing, or research synthesis.
Conclusion
The combination of free/leftover quota, cross-platform compatibility, and MCP server integration creates surprisingly powerful automation capabilities. What starts as a way to utilize spare resources often evolves into an indispensable part of daily workflows.