An open API service indexing awesome lists of open source software.

https://github.com/younesaassila/robosync

A wrapper around Robocopy that provides a simple CLI for mirroring user directories.
https://github.com/younesaassila/robosync

python python-poetry typer-cli

Last synced: 4 months ago
JSON representation

A wrapper around Robocopy that provides a simple CLI for mirroring user directories.

Awesome Lists containing this project

README

          

# Robosync

Robosync is a wrapper around Robocopy that provides a simple command-line interface for mirroring user directories.

Robosync is designed exclusively for Windows systems.

## Installation

1. Navigate to the [Releases page](https://github.com/younesaassila/robosync/releases/latest) and download the latest `robosync.exe`.
1. Move `robosync.exe` into a folder on your system `PATH`, or note its full location for direct invocation.

## Usage

To mirror the standard user profile folders (Desktop, Documents, Downloads, Music, Pictures, Videos) to an external drive, run:

```powershell
robosync.exe "E:\"
```

### Custom Sources

To back up a custom set of directories, supply one or more `--source` flags:

```powershell
robosync.exe "E:\" \
--source "C:\Users\You\Desktop" \
--source "C:\Users\You\Documents"
```

### Namespace Configuration

By default, Robosync creates a subfolder named after your computer’s name. To override this:

- Specify a custom namespace:

```powershell
robosync.exe "E:\" --namespace "MyBackup"
```

- Copy files directly into the root of the destination by setting an empty namespace:

```powershell
robosync.exe "E:\" --namespace ""
```

### Help and Options

For a full list of available flags and detailed descriptions, invoke the built‑in help:

```powershell
robosync.exe --help
```

## Development

### Prerequisites

- [Python](https://www.python.org/) 3.12 or later
- [Poetry](https://python-poetry.org/) 2.0.0 or later
- [poetry-pyinstaller-plugin](https://github.com/thmahe/poetry-pyinstaller-plugin) 1.3.0 or later

### Setup

1. Clone the repository:

```powershell
git clone https://github.com/younesaassila/robosync.git
cd robosync
```

2. Install runtime and development dependencies:

```powershell
poetry install --with dev
```

### Running Locally

Execute the application via Poetry:

```powershell
poetry run robosync [OPTIONS] DESTINATION
```

> **Note:** Robocopy may require elevated privileges, so it’s recommended to run Robosync as an Administrator. On Windows 11 (24H2 or later), you can prepend `sudo` to the command to run it with elevated permissions.

### Building the Executable

Generate a standalone executable using Poetry’s build command:

```powershell
poetry build
```

The resulting binary will be placed in the `dist/` directory.

### Testing

Run the test suite with `pytest`:

```powershell
poetry run pytest
```

### Code Quality

- **Formatting**: Apply project styling with Black:

```powershell
poetry run black .
```

- **Linting**: Enforce code standards using Flake8:

```powershell
poetry run flake8 .
```

## License

This project is distributed under the MIT License. See the [LICENSE](LICENSE) file for full terms.