{"id":25321442,"url":"https://github.com/dev-diaries41/termux-plugin-cli","last_synced_at":"2025-06-23T09:34:12.446Z","repository":{"id":269752258,"uuid":"908346401","full_name":"dev-diaries41/termux-plugin-cli","owner":"dev-diaries41","description":"A cli tool to manage termux-plugins","archived":false,"fork":false,"pushed_at":"2025-01-30T20:12:40.000Z","size":65,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T18:47:18.372Z","etag":null,"topics":["android","termux"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dev-diaries41.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-25T20:13:27.000Z","updated_at":"2025-04-13T13:19:20.000Z","dependencies_parsed_at":"2025-01-30T21:20:10.957Z","dependency_job_id":null,"html_url":"https://github.com/dev-diaries41/termux-plugin-cli","commit_stats":null,"previous_names":["dev-diaries41/termux-plugin-cli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dev-diaries41/termux-plugin-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-diaries41%2Ftermux-plugin-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-diaries41%2Ftermux-plugin-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-diaries41%2Ftermux-plugin-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-diaries41%2Ftermux-plugin-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dev-diaries41","download_url":"https://codeload.github.com/dev-diaries41/termux-plugin-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-diaries41%2Ftermux-plugin-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261453190,"owners_count":23160460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","termux"],"created_at":"2025-02-13T22:53:43.617Z","updated_at":"2025-06-23T09:34:12.395Z","avatar_url":"https://github.com/dev-diaries41.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tplug - Termux Plugin Manager\n\n`tplug` is a command-line tool designed to simplify and organize the management of **termux-services** and **custom scripts**, simplifying the process of adding, installing (from remote repositories), removing, and managing these services, as well as running and removing custom scripts in Termux. The tool ensures seamless integration with Termux’s service management system and provides additional functionality for executing local scripts.\n\nThe tool allows you to:\n\n- Install plugins from the repository from [Termux Plugin Repository](https://github.com/dev-diaries41/termux-plugins.git). You can override with ENV, see [Environment Variables](#environment-variables)\n- Create new **termux-services** by adding **plugin-services** from a local directory or installing from a repository.\n- List and remove **plugins** and **termux-services**.\n- View logs for **termux-services**.\n- Run **plugin-scripts** from a local directory.\n- Customize **plugin** GitHub repositories through an environment variable.\n\n---\n\n### **What are Plugins?**\n\n- **Plugin-Services**:  \n  **Plugin-services** are custom Termux services that can be managed using `tplug`. They integrate with Termux's service management system, allowing you to start, stop, and manage custom background processes (i.e., services) within Termux.\n\n- **Plugin-Scripts**:  \n  **Plugin-scripts** are user-defined, executable scripts that can be run directly from the local directory.\n\n---\n\n### **Important Notes on Plugin-Services and Plugin-Scripts**\n\n- All **plugin-services** must follow a specific format described in the [Termux Plugin Repository](https://github.com/dev-diaries41/termux-plugins.git).\n- All **plugin-services** are stored in the `$HOME/.plugins/services` directory. To add your own **plugin-services**, use this directory for compatibility with `tplug`.\n- The directory used for **plugin-scripts** is `$HOME/.plugins/scripts`. Each directory in `$HOME/.plugins/scripts` must have a `run` file that is executable to function properly.\n\n---\n\n## Table of Contents\n\n1. [Requirements](#requirements)\n2. [Installation](#installation)\n3. [Usage](#usage)\n    - [Commands](#commands)\n    - [Environment Variables](#environment-variables)\n4. [Dependencies](#dependencies)\n5. [Troubleshooting](#troubleshooting)\n\n---\n\n## Requirements\n\nEnsure that the following dependencies are installed on your Termux environment:\n\n- `git`\n\n---\n\n## Installation\n\nYou can download and use `tplug` by following these steps:\n\n1. Clone this repository or download the script to your Termux environment.\n\n2. Move it to a directory included in your `PATH` (e.g., `/usr/bin/`) and make it executable.\n   ```bash\n   cp termux-plugin-cli/tplug.sh ~/../usr/bin/tplug \u0026\u0026 chmod 755 ~/../usr/bin/tplug\n   ```\n\n---\n\n## Usage\n\nThe general syntax for `tplug` is:\n\n```bash\ntplug \u003ccommand\u003e [options]\n```\n\n### Commands\n\n1. **`add \u003cplugin_name\u003e`**  \n   Create a new termux-service by adding a plugin-service from a local directory.\n   ```bash\n   tplug add \u003cplugin_name\u003e\n   ```\n\n2. **`run \u003cscript_name\u003e [args]`**  \n   Run plugin-scripts from a local directory. For security, scripts must be made executable instead of being sourced.  \n   Example:\n   ```bash\n   tplug run \u003cscript_name\u003e [args]\n   ```\n   Here, `\u003cscript_name\u003e` refers to the name of the directory in the scripts directory that has the corresponding `run` file (e.g., `~/.plugins/scripts/myscript/run`).\n\n3. **`install [\u003cname\u003e | -a] [-s | -r]`**  \n   Install plugin-services or plugin-scripts from the repository.\n   - `\u003cname\u003e`: Install a specific plugin-service or plugin-script.\n   - `-a`: Install all plugins (requires `-s` or `-r`).\n   - `-s`: Install plugin-services.\n   - `-r`: Install plugin-scripts.\n\n   Examples:\n   ```bash\n   tplug install my-plugin\n   tplug install -a -s\n   ```\n\n4. **`logs [-c] \u003cservice_name\u003e`**  \n   View logs for a termux-service. Use the `-c` flag to clear logs.\n   ```bash\n   tplug logs \u003cservice_name\u003e\n   tplug logs -c \u003cservice_name\u003e\n   ```\n\n5. **`list [-S | -s | -r | -a]`**  \n   List items (plugin-services, plugin-scripts, termux-services, or available plugin-services/scripts in the repository).\n   - `-S`: List installed plugin-services.\n   - `-s`: List installed termux-services.\n   - `-r`: List installed plugin-scripts.\n   - `-a`: List available plugin-services or plugin-scripts in the repository.\n\n   Use `-a -S` for plugin-services or `-a -r` for plugin-scripts.\n\n   Examples:\n   ```bash\n   tplug list -S\n   tplug list -a -r\n   ```\n\n6. **`remove \u003citem_name\u003e [-s | -S | -r] [-p]`**  \n   Remove a termux-service, plugin-service, or plugin-script.\n   - `\u003citem_name\u003e`: Name of the service, plugin-service, or plugin-script to remove.\n   - `-s`: Remove a termux-service.\n   - `-S`: Remove a plugin-service.\n   - `-r`: Remove a plugin-script.\n   - `-p`: Purge logs when removing the service (only applicable to termux-services).\n\n   Examples:\n   ```bash\n   tplug remove my-service -s\n   tplug remove my-plugin -S\n   tplug remove my-script -r\n   ```\n\n7. **`--help`**  \n   Show the help message.\n   ```bash\n   tplug --help\n   ```\n\n### Environment Variables\n\n- **`TERMUX_PLUGINS_REPO_URL`**:  \n  You can override the default plugin repository URL by setting this environment variable to the desired URL.\n\n  Example:\n  ```bash\n  export TERMUX_PLUGINS_REPO_URL=\"https://github.com/your/custom-repo.git\"\n  ```\n\n---\n\n## Dependencies\n\nWhen installing plugins from local directories, the tool will automatically read the `plugin.txt` file and install any listed dependencies.\n\n---\n\n## Troubleshooting\n\n- **Missing `plugin.txt` file**:  \n  If the plugin doesn't contain a `plugin.txt` file with dependencies, the tool will skip dependency installation.\n\n- **Permission errors**:  \n  Ensure that you have appropriate permissions for installing plugins and accessing the required directories.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-diaries41%2Ftermux-plugin-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev-diaries41%2Ftermux-plugin-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-diaries41%2Ftermux-plugin-cli/lists"}