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:

  6. Build and start a devcontainer with binary requirements

  7. Install the pre-commit hooks

  8. Use uv to install python and all python dependencies into a local .venv

  9. 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.0a8.tar.gz (64.6 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.0a8-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ties-0.0.0a8.tar.gz
  • Upload date:
  • Size: 64.6 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.0a8.tar.gz
Algorithm Hash digest
SHA256 2a4fd58fc09a013202ea8be8fdcdb549cf950e60d42cb22626ddcf6593ca15e8
MD5 f1473f27d9ea8b90d4a3c8b415b224fd
BLAKE2b-256 59f001840e524336630573e40717dbecaa64ba6e04d2a727f811d04050fa7bf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ties-0.0.0a8.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.0a8-py3-none-any.whl.

File metadata

  • Download URL: ties-0.0.0a8-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.0a8-py3-none-any.whl
Algorithm Hash digest
SHA256 5940532445461d169d8f1cebdcc6e8b46c15c4114bfe5b5ebf6b8cbc11a617aa
MD5 779e1097e64a67d72c8b7eb40bf0e892
BLAKE2b-256 3203da3821aba6c5f5b8122c16097ba3e31cb657172ab2625f86226eea2c01ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for ties-0.0.0a8-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