Spent the last few weeks building an Instagram automation script optimized for Termux (Android).
▲ 0 r/termux

Spent the last few weeks building an Instagram automation script optimized for Termux (Android).

I wanted to share a hobby project I’ve been hacking on recently called ReelFlow. It’s a Python script that handles automated clip downloading (yt-dlp), parses video titles to dynamically generate context-aware hashtags, and uploads them to Instagram Reels using instagrapi.

My goal was to build something low-overhead enough that I could host it 24/7 on an old Android phone using Termux without needing a VPS. However, running long-running automation tasks on mobile environments threw a ton of unexpected roadblocks at me.

Here are the main technical hurdles I ran into and how I ended up patching them:

1. The Termux Dependency Trap (Rust/Clang compilation)

When trying to run pip install -r requirements.txt on a standard phone environment, the installation completely stalled out and crashed on modern packages like pydantic-core. Because there are no pre-compiled wheels for Android architecture on PyPI, Python tries to build the packages from source, which requires a Rust compiler and C tools.

To fix this for anyone cloning the repo, I wrote an interactive setup.sh script that checks the environment path. If it identifies the Termux filesystem (/com.termux/), it automatically flags the system to run pkg install rust clang make before triggering pip. It also takes configuration prompts in the terminal to cleanly compile a .env file on the fly without making the user jump into mobile text editors.

2. Self-Healing Expiry Loops

Anyone who has worked with instagrapi knows that Instagram aggressively drops session tokens, resulting in script-killing LoginRequired or ClientError exceptions halfway through a scheduled loop.

Instead of letting the main schedule thread crash, I wrapped the initialization into a reusable state manager. Every time a scheduled post triggers, the script executes a lightweight cl.get_timeline_feed() heartbeat check. If it catches an authentication error, it halts the job, triggers a re-login workflow to refresh session.json, and then allows the upload pipeline to proceed.

3. Contextual Hashtag Splitting

To avoid getting shadowbanned for using identical blocks of 30 hashtags on every single post, I built a modular generator that takes the pulled YouTube video title as a raw string hint. It runs keyword checks (e.g., matching character names or series titles) and uses rsplit() to dynamically stitch highly targeted sub-community tags directly above the media credit lines, while randomly shuffling a generic pool of tags for the bulk of the caption.

I'd love to hear how other people handle long-running background scripts on Android, or if there's a more efficient way to maintain Instagram session stability over long periods.

u/saiyan_god07db — 8 days ago

Spent the last few weeks building an Instagram automation script optimized for Termux (Android)

I wanted to share a hobby project I’ve been hacking on recently called ReelFlow. It’s a Python script that handles automated clip downloading (yt-dlp), parses video titles to dynamically generate context-aware hashtags, and uploads them to Instagram Reels using instagrapi.

My goal was to build something low-overhead enough that I could host it 24/7 on an old Android phone using Termux without needing a VPS. However, running long-running automation tasks on mobile environments threw a ton of unexpected roadblocks at me.

1. The Termux Dependency Trap (Rust/Clang compilation)

When trying to run pip install -r requirements.txt on a standard phone environment, the installation completely stalled out and crashed on modern packages like pydantic-core. Because there are no pre-compiled wheels for Android architecture on PyPI, Python tries to build the packages from source, which requires a Rust compiler and C tools.

To fix this for anyone cloning the repo, I wrote an interactive setup.sh script that checks the environment path. If it identifies the Termux filesystem (/com.termux/), it automatically flags the system to run pkg install rust clang make before triggering pip. It also takes configuration prompts in the terminal to cleanly compile a .env file on the fly without making the user jump into mobile text editors.

2. Self-Healing Expiry Loops

Anyone who has worked with instagrapi knows that Instagram aggressively drops session tokens, resulting in script-killing LoginRequired or ClientError exceptions halfway through a scheduled loop.

Instead of letting the main schedule thread crash, I wrapped the initialization into a reusable state manager. Every time a scheduled post triggers, the script executes a lightweight cl.get_timeline_feed() heartbeat check. If it catches an authentication error, it halts the job, triggers a re-login workflow to refresh session.json, and then allows the upload pipeline to proceed.

3. Contextual Hashtag Splitting

To avoid getting shadowbanned for using identical blocks of 30 hashtags on every single post, I built a modular generator that takes the pulled YouTube video title as a raw string hint. It runs keyword checks (e.g., matching character names or series titles) and uses rsplit() to dynamically stitch highly targeted sub-community tags directly above the media credit lines, while randomly shuffling a generic pool of tags for the bulk of the caption.

I'd love to hear how other people handle long-running background scripts on Android, or if there's a more efficient way to maintain Instagram session stability over long periods.

u/saiyan_god07db — 8 days ago

Built something that I am very eager to share with ya'll

hi, soooo I built a bot that saves my insta login in .env, in a github codespace, and I can use the bot to download and repost old high stake posts with AI captions and tags, it is currently working on Anime only. I do need developers to help me refine it

There is an issue that I am facing, proxy issue because codespace and vps get banned on insta so I am currently running on custom proxy, but I do want to refine it to be able to run without anything but a start command from terminal

reddit.com
u/saiyan_god07db — 11 days ago

Built something that I am very eager to share with ya'll

hi, soooo I built a bot that saves my insta login in .env, in a github codespace, and I can use the bot to download and repost old high stake posts with AI captions and tags, it is currently working on Anime only. I do need developers to help me refine it

There is an issue that I am facing, proxy issue because codespace and vps get banned on insta so I am currently running on custom proxy, but I do want to refine it to be able to run without anything but a start command from terminal

reddit.com
u/saiyan_god07db — 11 days ago

I got tired of the manual math & chat chaos when paying my editors/clippers, so I built a Discord Workflow Ledger bot to automate it

Hey everyone,

If you manage a team of creators, clippers, or freelancers on Discord, you already know the pain. You post a task, three people try to claim it, drafts get lost in DMs, and by Sunday night, you're scrolling through weeks of chat history trying to figure out exactly how many clips or assets you owe money for.

I was dealing with this exact headache in my own operations. Spreadsheet tracking felt like a chore, and manual bookkeeping was draining my time.

So, I coded a solution: The Workflow Ledger System.

It essentially acts as a silent Project Manager and Accountant inside your server. Here’s how it handles the operational pipeline:

🔒 Zero Double-Claiming: You post a job using a clean slash command format (/post\_job). The first worker to react with 👍 automatically locks the project to their name so nobody else wastes time on it.

🔄 Automated Revision Loop: If a draft needs adjustments, you trigger /request\_revision. The bot automatically blocks the payout queue and DMs the worker with your feedback so you don't have to chase them down.

💰 One-Click Balances: Once a job is reviewed, you approve it (/approve\_work) and log the output units. At the end of the week, the administrator just runs /payout\_list to see a clean, aggregated ledger of exactly what is owed to every single worker. No manual math required.

📊 Performance Reports: It automatically compiles analytics showing who is closing out the most tasks and maintaining high productivity.

I've isolated the system architecture so data stays completely private to your specific server, and it's hosted 24/7 on a cloud architecture.

It has completely streamlined my operations, and since I made it multi-server ready, I wanted to open it up to other agency owners or creators here who are drowning in administrative work.

It's completely free to try out while it's in this phase. I'd love to get some feedback from people running actual production teams.

If you want to test it out for your server or team,

bot link

reddit.com
u/saiyan_god07db — 17 days ago
▲ 4 r/BuildToShip+2 crossposts

I got tired of the manual math & chat chaos when paying my editors/clippers, so I built a Discord Workflow Ledger bot to automate it

Hey everyone,

If you manage a team of creators, clippers, or freelancers on Discord, you already know the pain. You post a task, three people try to claim it, drafts get lost in DMs, and by Sunday night, you're scrolling through weeks of chat history trying to figure out exactly how many clips or assets you owe money for.

I was dealing with this exact headache in my own operations. Spreadsheet tracking felt like a chore, and manual bookkeeping was draining my time.

So, I coded a solution: The Workflow Ledger System.

It essentially acts as a silent Project Manager and Accountant inside your server.

📊 Performance Reports: It automatically compiles analytics showing who is closing out the most tasks and maintaining high productivity.

I've isolated the system architecture so data stays completely private to your specific server, and it's hosted 24/7 on a cloud architecture.

It has completely streamlined my operations, and since I made it multi-server ready, I wanted to open it up to other agency owners or creators here who are drowning in administrative work.

It's completely free to try out while it's in this phase. I'd love to get some feedback from people running actual production teams.

If you want to test it out for your server or team, drop a comment or shoot me a DM and I'll send over the invite link!

u/saiyan_god07db — 17 days ago
▲ 0 r/discordbots+1 crossposts

Managing and Accounting god your work

Hey everyone,

If you manage a team of creators, clippers, or freelancers on Discord, you already know the pain. You post a task, three people try to claim it, drafts get lost in DMs, and by Sunday night, you're scrolling through weeks of chat history trying to figure out exactly how many clips or assets you owe money for.

I was dealing with this exact headache in my own operations. Spreadsheet tracking felt like a chore, and manual bookkeeping was draining my time.

So, I coded a solution: The Workflow Ledger System.

It essentially acts as a silent Project Manager and Accountant inside your server.

📊 Performance Reports: It automatically compiles analytics showing who is closing out the most tasks and maintaining high productivity.

I've isolated the system architecture so data stays completely private to your specific server, and it's hosted 24/7 on a cloud architecture.

It has completely streamlined my operations, and since I made it multi-server ready, I wanted to open it up to other agency owners or creators here who are drowning in administrative work.

It's completely free to try out while it's in this phase. I'd love to get some feedback from people running actual production teams.

If you want to test it out for your server or team, drop a comment or shoot me a DM and I'll send over the invite link!

reddit.com
u/saiyan_god07db — 17 days ago

Managing and Accounting god your work

Hey everyone,

If you manage a team of creators, clippers, or freelancers on Discord, you already know the pain. You post a task, three people try to claim it, drafts get lost in DMs, and by Sunday night, you're scrolling through weeks of chat history trying to figure out exactly how many clips or assets you owe money for.

I was dealing with this exact headache in my own operations. Spreadsheet tracking felt like a chore, and manual bookkeeping was draining my time.

So, I coded a solution: The Workflow Ledger System.

It essentially acts as a silent Project Manager and Accountant inside your server.

📊 Performance Reports: It automatically compiles analytics showing who is closing out the most tasks and maintaining high productivity.

I've isolated the system architecture so data stays completely private to your specific server, and it's hosted 24/7 on a cloud architecture.

It has completely streamlined my operations, and since I made it multi-server ready, I wanted to open it up to other agency owners or creators here who are drowning in administrative work.

It's completely free to try out while it's in this phase. I'd love to get some feedback from people running actual production teams.

If you want to test it out for your server or team, drop a comment or shoot me a DM and I'll send over the invite link!

reddit.com
u/saiyan_god07db — 17 days ago