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.8.tar.gz (15.9 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.8-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repopackpy-0.1.8.tar.gz
  • Upload date:
  • Size: 15.9 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.8.tar.gz
Algorithm Hash digest
SHA256 d5a6d586e1ac4593c853a44c4ad852900aa461da0c72d9d5ca80c0717476b36d
MD5 4dab53c25970f1cc1f4cc82f4690fc13
BLAKE2b-256 8ebeda9588a8867172fd46857af3337350a0abf55fe9fb0ead9ca5c6b2642474

See more details on using hashes here.

Provenance

The following attestation bundles were made for repopackpy-0.1.8.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.8-py3-none-any.whl.

File metadata

  • Download URL: repopackpy-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 10.4 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a7a217df890fb9d015f6d1299d36fc5c2e35f4fa69698fec564fb2c098c1e586
MD5 da130d4dbab8b1eb5b6d56fad554154d
BLAKE2b-256 9f7a8b269c73cfad76df3431af9a4079006859c373de9034f8a383cfe6317899

See more details on using hashes here.

Provenance

The following attestation bundles were made for repopackpy-0.1.8-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