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

pip install RepoPackPy

For development:

pip install -e ".[dev]"

Requires Python 3.10+.

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.1.tar.gz (14.8 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.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repopackpy-0.1.1.tar.gz
  • Upload date:
  • Size: 14.8 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.1.tar.gz
Algorithm Hash digest
SHA256 17bd0ea2e3bbf8d7a8c045cdabd96ceafc46cb3544f35a4ce54370eeb477b554
MD5 061c4a98e4aed9a3f55e17a675827dd6
BLAKE2b-256 8cb7fae88f4339e1038f407375748a007c914b7bfd6473c22a10bffcebaba0f8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: repopackpy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a1c269ddca28f22e4c60f1379bb4b0eb75b5805dec629b5fb523b106352f7b65
MD5 471dbd64dfcee344e98a9e420b525ed1
BLAKE2b-256 022319e5787f721aa294a55c0ab329a7a2a4d5076b627ca6145fea212c2e956d

See more details on using hashes here.

Provenance

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