Skip to main content

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

Project description

Ties 🔗

PyPI version Python versions License: MIT Linting: Ruff Code style: Ruff 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:

  1. Build and start a devcontainer with binary requirements
  2. Install the pre-commit hooks
  3. Use uv to install python and all python dependencies into a local .venv
  4. 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.0a7.tar.gz (63.0 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.0a7-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ties-0.0.0a7.tar.gz
  • Upload date:
  • Size: 63.0 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.0a7.tar.gz
Algorithm Hash digest
SHA256 7cba9b3184ad64faeed48865f0ea075d22b1042b09bddfecc1c40d968de81694
MD5 a33219955445e15e6bcfae2318367901
BLAKE2b-256 66de9b577c2c6d8f76017b4bea461b9f4d8807d56876ca8b34db80196b9e6dd0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ties-0.0.0a7-py3-none-any.whl
  • Upload date:
  • Size: 10.1 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.0a7-py3-none-any.whl
Algorithm Hash digest
SHA256 d9abe07244c4e5a39c1f833e5364f4c1c7a41f172b04a416a5e2588e201b4fc9
MD5 198eb0fa5a04fe522cfa83d990949961
BLAKE2b-256 222ace5f436e9a8c9cb00b729e09d552ba0882bdd80becae31ef47536e28c043

See more details on using hashes here.

Provenance

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