Skip to main content

A CLI tool to duplicate and sync file content with advanced transformations.

Project description

Ties 🔗

PyPI version CI Status Docs Status All time downloads Weekly Downloads

Python versions License: MIT Py Stack: astral.sh Open in Dev Containers Cursor Claude Code

A powerful CLI tool to duplicate and sync file content with advanced transformations. Keep your repository files in sync automatically with intelligent content synchronization.

✨ Features

  • File Synchronization: Automatically keep multiple files in sync across your repository
  • Advanced Transformations: Apply custom transformations during file copying
  • Pre-commit Integration: Enforce file consistency as part of your development workflow
  • Configuration-Driven: Simple TOML-based configuration
  • Environment Variable Support: Embed environment variables in target files
  • Cross-Platform: Works on Windows, macOS, and Linux

🚀 Quick Start

Installation

# Install from PyPI
pip install ties

# Or install with YAML support
pip install ties[yaml]

# Or install from source
git clone https://github.com/AlonKellner/ties.git
cd ties
pip install -e .

Basic Usage

  1. Create a configuration in your pyproject.toml:
[tool.ties]
[[tool.ties.tie]]
name = "gitignore sync"
source = ".gitignore"
target = "examples/.gitignore"
  1. Check for discrepancies:
ties check
  1. Fix discrepancies automatically:
ties fix

Advanced Configuration

[tool.ties]
[[tool.ties.tie]]
name = "Environment Config"
source = ".ties/config.template"
targets = [".env.local", ".env.production"]
transform = "ties:embed_environ"

[[tool.ties.tie]]
name = "Documentation Sync"
source = "README.md"
target = "docs/README.md"
transform = "transform:markdown_cleanup"

📖 Documentation

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

Prerequisites

Steps

Either click the badge (VSCode only)
Open in Dev Containers
or (Cursor/VSCode)

  1. git clone https://github.com/AlonKellner/ties.git

  2. Open the repository in your IDE of choice

  3. cmd+shift+p/ctrl+shift+p

  4. Type "reopen"

  5. Choose "Dev Containers: Reopen in Container"

    This will automatically:

    • Build and start a devcontainer with binary requirements
    • Install the pre-commit hooks
    • Use uv to install python and all python dependencies into a local .venv
    • Install a few MCP servers

    The first time it will fail and prompt you for 3 things:

MCP

The current MCP servers that this repo supports are:

  1. github-mcp-server (Remote)
  2. repomix (Local)
  3. mcp-language-server

Claude Code

The pre-commit setup in this repo uses claude code to automatically review changes.
By default, claude will not be configured and will automatically pass in the pre-commit.

If you want to use claude to review changes, you can read about Claude Code Deployment.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Built with modern Python tooling (uv, ruff, pytest)
  • CI/CD powered by GitHub Actions
  • Security scanning with Trivy

📊 Project Status

  • Development Status: Alpha
  • Python Support: 3.10+
  • License: MIT
  • Maintainer: Alon Kellner

Made with ❤️ by the Ties community

Project details


Download files

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

Source Distribution

ties-0.0.0a9.tar.gz (62.5 kB view details)

Uploaded Source

Built Distribution

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

ties-0.0.0a9-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file ties-0.0.0a9.tar.gz.

File metadata

  • Download URL: ties-0.0.0a9.tar.gz
  • Upload date:
  • Size: 62.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ties-0.0.0a9.tar.gz
Algorithm Hash digest
SHA256 188d46c40e33cfc511c5b317a9a34f2bde959da93455306cc40863bbd5388991
MD5 e33a2754010702c0961195e048258b9f
BLAKE2b-256 91d1b77aa99320905a90a2c862d146f75087ab8588c22e143e3938aa6fb4edd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for ties-0.0.0a9.tar.gz:

Publisher: publish.yml on AlonKellner/ties

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

File details

Details for the file ties-0.0.0a9-py3-none-any.whl.

File metadata

  • Download URL: ties-0.0.0a9-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ties-0.0.0a9-py3-none-any.whl
Algorithm Hash digest
SHA256 21345ec8c945ede62d79e3641de1b48791d46fa4b3ece12c4c8337c6d24a8478
MD5 18c361647ca52ef04141b5ea1cfb68db
BLAKE2b-256 bc574671a7d47b2999e32c09dc3561250a384999377680679792babc4e9b19f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ties-0.0.0a9-py3-none-any.whl:

Publisher: publish.yml on AlonKellner/ties

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