Termux:Tasker connects the Termux terminal to Tasker, the Android automation app. With this plugin installed, Tasker can execute shell scripts that run inside the full Termux environment — with access to all your installed packages, environment variables, and the filesystem. This makes it possible to trigger terminal commands from any event Tasker can detect: location changes, time schedules, notifications, battery levels, and more.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/termux/termux-app/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
- The Termux app installed from F-Droid or GitHub
- The Termux:Tasker APK installed from the same source as Termux
- The Tasker app (paid, available on Google Play)
allow-external-apps = trueset in~/.termux/termux.properties
Enabling external app access
Open or create~/.termux/termux.properties and add:
Installation
Install Termux:Tasker APK
Download and install the Termux:Tasker APK from the same source as your Termux app (F-Droid or GitHub).
Enable external apps in Termux
In the Termux terminal, edit your properties file:Then restart the Termux app.
Grant RUN_COMMAND permission to Tasker
Go to Android Settings → Apps → Termux → Permissions and grant Tasker the
RUN_COMMAND permission. Alternatively, Termux will prompt you when Tasker first attempts to run a command.Creating Tasker scripts
All scripts that Tasker can execute must be placed in~/.termux/tasker/ and must be marked executable:
The RUN_COMMAND permission
Termux exposes acom.termux.permission.RUN_COMMAND Android permission. This is declared as dangerous in the Termux AndroidManifest.xml, meaning Android requires explicit user approval before any external app can use it. Tasker must hold this permission to trigger script execution in Termux.
If Tasker does not have the permission, actions will fail silently. Check Android Settings → Apps → Tasker → Permissions to verify the permission is granted.
Common use cases
Scheduled backups
Scheduled backups
Use a Tasker time profile to trigger a backup script at a fixed time each day:
Location-triggered scripts
Location-triggered scripts
Run a script when you arrive at or leave a location. For example, connect to a VPN when leaving home:
Notification-triggered tasks
Notification-triggered tasks
React to Android notifications by parsing their contents and acting on them — sending a webhook, logging an event, or forwarding a message.
Battery-triggered power management
Battery-triggered power management
Stop battery-draining background processes when the battery drops below a threshold:
Passing variables from Tasker to scripts
Tasker can pass local variables to Termux scripts as environment variables. In Tasker, set variables like%termux_arg1 and they will be available in the script environment. Refer to the Termux:Tasker documentation on GitHub for the full variable passing interface.
Script output (stdout/stderr) is returned to Tasker as a task result variable, making it possible to branch Tasker flows based on script output.