Skip to main content

Termux development environment setup tool (PostgreSQL, Redis, etc.)

Project description

termux-dev-setup logo

PyPI version Python Wheel Release

Build status Codecov Test Coverage Code style: black Ruff Security

Downloads PyPI Downloads OS Python Versions

License: MIT

Docs

termux-dev-setup (tds)

A comprehensive tool to set up and manage a development environment in Termux (Proot/Ubuntu).

Build Status License Python Version

📖 About

tds is a command-line tool designed to simplify the setup and management of a complete development environment on Termux. It provides a "batteries-included" experience for developers who want to run services like PostgreSQL and Redis without the hassle of manual configuration.

🚀 Quick Start

Prerequisites

  • Termux with Proot/Ubuntu
  • Python 3.8+
  • pip for installation

Installation

Install tds with a single command:

pip install .

Usage Example

Here's how to install and manage PostgreSQL:

# Install PostgreSQL
tds setup postgres

# Start the PostgreSQL server
tds manage postgres start

# Check the status
tds manage postgres status

# Restart the PostgreSQL server
tds manage postgres restart

✨ Key Features

  • PostgreSQL: Install, configure, and manage (start/stop/restart/status).
  • Redis: Install, configure, and manage (start/stop/restart/status).
  • OpenTelemetry: Install and configure the OTEL Collector.
  • Google Cloud CLI: Install and configure gcloud.

⚙️ Configuration & Advanced Usage

Environment Variables

Variable Description Default Value
PG_PORT PostgreSQL port 5432
PG_DATA PostgreSQL data directory ~/.tds/pg
PG_USER PostgreSQL user admin
PG_DB PostgreSQL database app
REDIS_PORT Redis port 6379
REDIS_DATA_DIR Redis data directory ~/.tds/redis
REDIS_PASSWORD Redis password ""
OTEL_VERSION OpenTelemetry Collector version 0.77.0

CLI Commands

Command Description
tds setup postgres Install and configure PostgreSQL
tds setup redis Install and configure Redis
tds setup otel Install OpenTelemetry Collector
tds setup gcloud Install Google Cloud CLI
tds manage postgres [action] Manage PostgreSQL (start/stop/restart/status)
tds manage redis [action] Manage Redis (start/stop/restart/status)

🏗️ Architecture

Directory Structure

src/
└── termux_dev_setup/
    ├── __init__.py
    ├── cli.py
    ├── gcloud.py
    ├── otel.py
    ├── postgres.py
    ├── redis.py
    └── utils/
        ├── banner.py
        └── status.py

Core Logic Flow

The tds tool is a single-entrypoint CLI application. The cli.py module uses argparse to define the command structure (setup and manage) and their subcommands. Each service (e.g., postgres.py, redis.py) has its own dedicated module that contains the logic for installation and management. The utils directory provides shared functionality, such as displaying the banner and status messages.

🗺️ Roadmap

A high-level overview of our future plans. For a more detailed breakdown, please see our ROADMAP.md file.

✅ Completed

  • Core Services: PostgreSQL, Redis, OpenTelemetry, and Google Cloud CLI.
  • Service Management: Full lifecycle support (start, stop, status, and restart).

🔮 Upcoming

  • More Services: Support for RabbitMQ, Elasticsearch, and other popular development tools.
  • Enhanced Configuration: A dedicated configuration file for easier management of settings.
  • Interactive Mode: A guided setup process for an improved user experience.
  • Automated Testing: A robust testing framework to ensure stability and reliability.

🤝 Contributing & License

Contributions are welcome! Please open an issue or submit a pull request on our GitHub repository.

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termux_dev_setup-1.0.0.tar.gz (31.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

termux_dev_setup-1.0.0-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file termux_dev_setup-1.0.0.tar.gz.

File metadata

  • Download URL: termux_dev_setup-1.0.0.tar.gz
  • Upload date:
  • Size: 31.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for termux_dev_setup-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8642721459df9e7071fb40849fe320a3edae671b97ca85a6e6ad90d10037e2b5
MD5 b59c460434fdda2b986302abc266eb1a
BLAKE2b-256 1e17b09ff54eab8945dfa922f9a296aa9bb3e7e60e7037715c4a4b41e3801948

See more details on using hashes here.

Provenance

The following attestation bundles were made for termux_dev_setup-1.0.0.tar.gz:

Publisher: publish.yml on dhruv13x/termux-dev-setup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file termux_dev_setup-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for termux_dev_setup-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44bd7712fff916eac78e1e59368b12afbb04202d4411bc0272607b8368329ed8
MD5 ad9816fd1ee3dae6bbfd4b71acafeaf0
BLAKE2b-256 65d3d2fe78485c696aa548eb500704b31768e387c00f47d29a08c6561e37d417

See more details on using hashes here.

Provenance

The following attestation bundles were made for termux_dev_setup-1.0.0-py3-none-any.whl:

Publisher: publish.yml on dhruv13x/termux-dev-setup

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page