# Reqsync

> Synchronize requirements.txt to match installed versions, safely and atomically.

- **Type:** MCP server
- **Install:** `agentstack add mcp-imyourboyroy-reqsync`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ImYourBoyRoy](https://agentstack.voostack.com/s/imyourboyroy)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ImYourBoyRoy](https://github.com/ImYourBoyRoy)
- **Source:** https://github.com/ImYourBoyRoy/reqsync
- **Website:** https://github.com/ImYourBoyRoy/reqsync

## Install

```sh
agentstack add mcp-imyourboyroy-reqsync
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# reqsync

Keep your `requirements.txt` (and included requirement files) synced to what is actually installed — fast, safe, and low-effort.

> Built for the "I just want my requirements file updated" workflow.

[](https://pypi.org/project/reqsync/)
[](https://pypi.org/project/reqsync/)
[](https://github.com/ImYourBoyRoy/reqsync/actions/workflows/ci.yml)
[](https://opensource.org/licenses/MIT)

---

## What reqsync is

`reqsync` reads your active environment and rewrites requirement specifiers so files reflect what you're currently running.

- Preserves comments, extras, markers, and line endings.
- Follows `-r` includes.
- Skips `-c` constraints unless you opt in.
- Uses backups + atomic writes.

### What reqsync is not

- Not a lockfile manager.
- Not a dependency solver replacement.
- Not a hash-regenerator for `--hash` pinned lines.

---

## Install

```bash
pip install reqsync
```

Optional extras:

```bash
pip install "reqsync[mcp]"      # built-in MCP server support
pip install "reqsync[pretty]"   # optional pretty ecosystem deps
```

---

## Quick start

```bash
# 1) Preview only (no writes)
reqsync run --no-upgrade --dry-run --show-diff

# 2) Apply updates
reqsync run --show-diff

# 3) CI drift gate (fails if changes needed)
reqsync run --check --no-upgrade
```

### Before / after example

```txt
# before
requests>=2.30.0
pydantic>=2.5.0

# after (installed env has requests 2.32.3, pydantic 2.7.0)
requests>=2.32.3
pydantic>=2.7.0
```

---

## Terminal demos

### Quick sync preview (`--dry-run --show-diff`)

  

### CI check mode (`--check --no-upgrade`)

  

---

## Integration Guide

### Standalone usage

```bash
reqsync run --path requirements.txt
reqsync run --path requirements/base.txt --follow-includes
```

### Agentic / MCP usage

```bash
# MCP server (stdio)
reqsync mcp

# or dedicated entrypoint
reqsync-mcp
```

### Python API (tool-friendly)

```python
from reqsync.api import run_sync_payload

result = run_sync_payload(
    {
        "path": "requirements.txt",
        "dry_run": True,
        "no_upgrade": True,
        "show_diff": True,
        "policy": "lower-bound",
    }
)
print(result["changed"])
print(result["changes"])
```

---

## Core commands

```bash
reqsync run [OPTIONS]
reqsync help [all|run|version|mcp]
reqsync --version
reqsync version
reqsync mcp [--transport stdio|sse|streamable-http]
```

Most-used options:

- `--path`
- `--no-upgrade`
- `--dry-run`
- `--check`
- `--show-diff`
- `--output human|json|both`
- `--json-report `
- `--backup-keep-last ` (default `5`)
- `--policy lower-bound|floor-only|floor-and-cap|update-in-place`

Help discoverability:

```bash
reqsync help all
reqsync run --help
reqsync mcp --help
```

---

## Common workflows

```bash
# quick local refresh
reqsync run --show-diff

# no network / no pip upgrade
reqsync run --no-upgrade --dry-run --show-diff

# machine output for tools/models
reqsync run --no-upgrade --dry-run --output json

# update constraints too
reqsync run --path requirements/base.txt --update-constraints
```

---

## Output shape (for models/tools)

`--output json` or Python API returns structured keys:

- `changed`
- `files` (with `role`, `changed`, `change_count`)
- `changes` (`file`, `package`, `installed_version`, `old_line`, `new_line`)
- `backup_paths`
- `diff`

---

## Safety model

- Blocks outside virtualenv unless `--system-ok`.
- Blocks hash-pinned files unless `--allow-hashes`.
- Optional dirty-repo guard via `--allow-dirty`.
- Lock + backup + atomic write for safer file operations.
- Timestamped backups are auto-pruned (keep latest 5 per file by default).

---

## Docs

- [Usage](docs/USAGE.md)
- [Configuration](docs/CONFIG.md)
- [Integration](docs/INTEGRATION.md)
- [Changelog](CHANGELOG.md)

---

## Author & Links

**Created by**: Roy Dawson IV  
**GitHub**:   
**PyPi**: 

Project repo: 

---

## License

MIT — see [LICENSE](LICENSE).

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ImYourBoyRoy](https://github.com/ImYourBoyRoy)
- **Source:** [ImYourBoyRoy/reqsync](https://github.com/ImYourBoyRoy/reqsync)
- **License:** MIT
- **Homepage:** https://github.com/ImYourBoyRoy/reqsync

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-imyourboyroy-reqsync
- Seller: https://agentstack.voostack.com/s/imyourboyroy
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
