Skip to main content

repopy

A modular, cross-platform Python CLI workspace manager and developer tooling suite designed to automate reproducible local scaffolding, virtual environment creation, and remote repository synchronization.

PyPI - Version    CI    Python Versions    License: MIT


🌟 Key Features

  • Lifecycle Project Scaffolding (repopy init): Replaces manual setup by provisioning clean directory structures, virtual environments, automated .gitignore presets, and standardized metadata configurations (pyproject.toml or requirements.txt).

  • Remote Cloning (repopy clone): Clones remote Git repositories into structured local footprints and auto-provisions dedicated virtual environments and dependencies.

  • Upstream Linking (repopy link): Instantly connects an unlinked local workspace to a remote Git upstream, staging files, executing initial commits, and pushing to the default branch in one step.

  • Architectural Themes: Supports presets (minimal, web_api, cli_package, data_science) tailored to the specific packaging needs of the application.

  • Transactional Cleanups: Employs defensive rollback mechanisms (shutil.rmtree) to purge incomplete workspaces if initialization fails midway.

  • Automated Test Suite & CI: Fully covered by local pytest test suites and verified via continuous integration on GitHub Actions.


🛠️ Architecture & Separation of Concerns

repopy is organized into single-responsibility layers:

  • Presentation & Routing (cli.py, prompts.py, __main__.py): Evaluates native terminal arguments via argparse, orchestrates interactive prompt flows, and handles OS interrupts gracefully.

  • Supervision (orchestrators.py): Broker layer executing lifecycle validation checks, branch sequencing, and command handoffs.

  • Low-Level Engines (file_system.py, git_engine.py): Decoupled engines handling transactional directory allocations, venv isolation, and direct subprocess execution.

  • Validation & Translation (validators.py, dependencies.py, os_detector.py): Sanitizes paths, ensures semantic regex compliance, verifies system binaries (such as git), and resolves cross-platform paths.


📥 Installation

Install the latest release from PyPI:

pip install repopy

Alternatively, you can install the latest development version directly from the source:

git clone https://github.com/manatunga/repopy.git
cd repopy
pip install -e .

🚀 Usage Guide

1. Initialize a Project (repopy init)

Generate a new workspace interactively or via CLI flags:

# Interactive setup
repopy init my-app

# Non-interactive generation with a specific theme
repopy init my-api -t web_api -s

# Initialize and immediately connect to a remote repository
repopy init my-cli -t cli_package --link <git-url>

Available Themes:

  • minimal: Bare directory setup with requirements.txt.
  • web_api: Layered service layout prepared for modern frameworks.
  • cli_package: Modular structure configured with PEP 621 compliant pyproject.toml.
  • data_science: Notebooks, data folders, and pipeline layouts.


2. Clone a Remote Project (repopy clone)

Fetch a remote repository and immediately auto-provision an isolated .venv:

repopy clone <git-url> -n [custom-project-name]

Run inside an existing workspace to push tracking history to an upstream origin:

repopy link <git-url> -m ["custom-initial-commit-message"]

🧪 Testing & Continuous Integration

Run the test suite using pytest:

pytest -v

All contributions and pull requests are validated through our GitHub Actions workflow matrix (.github/workflows/tests.yml), running integration and validation tests across supported Python versions.


🗂️ Project Structure

repopy/
├── .github/
│   └── workflows/
│       └── tests.yml            # CI test runner pipeline
├── src/
│   └── repopy/
│       ├── __init__.py          # Package initialization
│       ├── __main__.py          # Application execution entry
│       ├── cli.py               # CLI subparser configuration
│       ├── dependencies.py      # Binary prerequisite verification
│       ├── file_system.py       # Atomic workspace & venv operations
│       ├── git_engine.py        # Subprocess Git execution engine
│       ├── orchestrators.py     # High-level pipeline management
│       ├── os_detector.py       # Cross-platform environment resolver
│       ├── prompts.py           # Dynamic terminal questionnaires
│       ├── templates.py         # Static asset definitions & manifests
│       └── validators.py        # Input sanitation & regex filters
├── tests/
│   ├── test_prompts.py          # Input loop & default manifest tests
│   └── test_validators.py       # Path and schema validation tests
├── pyproject.toml               # PEP 621 packaging configuration
├── LICENSE                      # MIT License
└── README.md

📄 License

Distributed under the MIT License. See LICENSE for details.


Key Review Notes

  • Verify the GitHub Actions workflow file path (.github/workflows/tests.yml) matches your actual workflow file name so the build badge renders correctly.
  • In the repopy init theme section, verify that the theme descriptions match what you have mapped out in templates.py.

Release files for repopy 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for repopy 0.2.0
File Size Uploaded
repopy-0.2.0.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for repopy 0.2.0
File Interpreter ABI Platform
repopy-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.7 kB

Release files / repopy-0.2.0.tar.gz

Download URL repopy-0.2.0.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
71426a2be10f60609ef2459fce8c527dd8c5de47c535d58765d0c84eb0c987d7
BLAKE2b-256 checksum
How to use checksums
b0086b167a0753ed98c8618063d7e714887ae8437c6c7e7b106f2d28601f8845
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / repopy-0.2.0-py3-none-any.whl

Download URL repopy-0.2.0-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f0a6506683a120ff89c787761f44ad6215f2d9a910c62579949e14a9d9dd784
BLAKE2b-256 checksum
How to use checksums
7f824dae235dd35efa1c12b303b068bc6f4e07a027f2b9241b6dae7250dca28c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page