Skip to main content

RepoPack

Pack/unpack any source workspace regardless of technology stack (Python, Node.js, React, Angular, Vue, Rust, Go, Java, C#, and more) into a portable, structured JSON payload — and restore it faithfully from that payload.

Features

  • Universal ignore engine — respects root and nested .gitignore files plus stack-agnostic defaults (node_modules, pycache, .venv, target/, dist/, secrets, lock files, …)
  • Polyglot stack detection — auto-detects Node.js, React, TypeScript, Angular, Next.js, Vue, Python, Rust, Go, Java, C# from project sentinel files
  • Binary safety — text files encoded as UTF-8; binaries skipped by default or included as Base64 with --include-binary
  • 5 MB guard — files larger than 5 MB are skipped with a warning
  • Path traversal shieldunpack validates every path against the destination root before writing anything
  • MCP server — expose pack/unpack as tools to any MCP-compatible AI client (Claude Desktop, etc.)

Installation

From PyPI (recommended)

Install the latest stable release:

pip install RepoPackPy

Pin to a specific version:

pip install RepoPackPy==0.1.1

Requires Python 3.10+.

Quick start after install

# Verify the install
repopack --help

# Pack your project
repopack pack . -o my-workspace.json

# Restore it somewhere else
repopack unpack my-workspace.json -t ./restored

For development

Clone the repo and install in editable mode with test dependencies:

git clone https://github.com/ShanKonduru/RepoPack.git
cd RepoPack
pip install -e ".[dev]"

CLI Usage

# Pack a directory into JSON
repopack pack [DIRECTORY] [-o output.json] [--include-binary] [--custom-ignore ".next,dist"]

# Unpack JSON back into a directory
repopack unpack <input.json> [-t TARGET_DIR] [--force]

# Start the MCP server (stdio transport)
repopack serve

Examples

# Pack current directory, write to file
repopack pack . -o workspace.json

# Pack a specific project, include binaries
repopack pack ~/projects/my-app -o my-app.json --include-binary

# Unpack into a new directory
repopack unpack workspace.json -t ./restored

# Unpack and overwrite existing files
repopack unpack workspace.json -t ./restored --force

JSON Payload Schema

{
  "version": "1.0",
  "metadata": {
    "created_at": "2026-07-26T12:00:00Z",
    "root_directory_name": "my-app",
    "detected_stack": ["Node.js", "React", "TypeScript"],
    "total_files": 38,
    "total_bytes": 128450
  },
  "files": [
    { "path": "src/App.tsx", "encoding": "utf-8", "content": "..." },
    { "path": "public/favicon.ico", "encoding": "base64", "content": "..." }
  ]
}

MCP Server Tools

When running repopack serve, two tools are registered via FastMCP:

Tool Description
export_workspace(workspace_path, output_json_path, include_binary) Pack a directory into JSON
import_workspace(json_input, destination_path, overwrite) Unpack JSON into a directory

Project Structure

repopack/
├── pyproject.toml
├── README.md
└── repopack/
    ├── __init__.py
    ├── cli.py          # Typer CLI (pack / unpack / serve)
    ├── mcp_server.py   # FastMCP server
    ├── packer.py       # Directory walker & JSON builder
    ├── unpacker.py     # JSON extractor & path-safe reconstructor
    └── utils.py        # Ignore engine, binary detector, stack detection
tests/
└── test_repopack.py    # 26-test pytest suite

Running Tests

pytest tests/ -v

Dependencies

  • typer — CLI framework
  • mcp — MCP SDK (FastMCP)
  • pathspec — gitignore wildmatch pattern matching

Download files

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

Source Distribution

repopackpy-0.1.7.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

repopackpy-0.1.7-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file repopackpy-0.1.7.tar.gz.

File metadata

  • Download URL: repopackpy-0.1.7.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for repopackpy-0.1.7.tar.gz
Algorithm Hash digest
SHA256 214559b10b9221613435ea192b6acee3a495b895d6c929d38ded90b3f380b192
MD5 cc6d281d08a3997b1c4e9acb87953631
BLAKE2b-256 40b305d26803d5105df8b89d1a63cc1329b2d14d4aa89bc1a217a4699fcc40c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for repopackpy-0.1.7.tar.gz:

Publisher: publish.yml on ShanKonduru/RepoPack

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

File details

Details for the file repopackpy-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: repopackpy-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for repopackpy-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3f1342ad0f5a5518aae3e1d41312e3e5513870e9be6daa70af4f291949622ba9
MD5 3295e087db30d58604a31fe1e2ef0aa2
BLAKE2b-256 30de955e324c029c1b05e7ed401b75403b1c3fd359fcd7d7312814c28715fb05

See more details on using hashes here.

Provenance

The following attestation bundles were made for repopackpy-0.1.7-py3-none-any.whl:

Publisher: publish.yml on ShanKonduru/RepoPack

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