{"id":16049934,"url":"https://github.com/codad5/hard-sync-cli","last_synced_at":"2025-09-08T08:33:55.957Z","repository":{"id":213623182,"uuid":"733245547","full_name":"codad5/hard-sync-cli","owner":"codad5","description":"WIP !! A simple synchronisation tool between 2 directory ","archived":false,"fork":false,"pushed_at":"2024-11-20T15:32:45.000Z","size":118,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-02T14:14:26.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codad5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-18T22:27:02.000Z","updated_at":"2024-11-20T15:32:49.000Z","dependencies_parsed_at":"2023-12-22T03:36:39.989Z","dependency_job_id":"a2381ad3-44b5-46ea-ac35-c533ee53fb08","html_url":"https://github.com/codad5/hard-sync-cli","commit_stats":null,"previous_names":["codad5/hard-sync-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codad5%2Fhard-sync-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codad5%2Fhard-sync-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codad5%2Fhard-sync-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codad5%2Fhard-sync-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codad5","download_url":"https://codeload.github.com/codad5/hard-sync-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240118432,"owners_count":19750491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T00:41:11.201Z","updated_at":"2025-02-22T03:13:46.447Z","avatar_url":"https://github.com/codad5.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Hard-Sync-CLI**\n\n**Hard-Sync-CLI** is a fast and lightweight command-line tool for synchronizing two directories, written in **Rust**. It offers powerful features, including support for dry runs, file exclusion, and reverse syncing, making it a practical solution for anyone looking to manage file syncing efficiently.\n\n---\n\n## **🚀 Why Hard-Sync-CLI?**\n\n- **Speed and Simplicity**: Written in Rust, ensuring fast and reliable performance.\n- **Customization**: Allows file exclusion and dry-run testing to give you full control.\n- **Learning Project**: Built as a hands-on project to explore Rust programming while solving a real-world problem.\n\n---\n\n## **📥 Installation**\n\n### **Install From Source**\n1. **Prerequisites**: Install Rust and Cargo ([Get Rust](https://www.rust-lang.org/tools/install)).\n2. Clone this repository:\n   ```bash\n   git clone https://github.com/your-username/hard-sync-cli.git\n   cd hard-sync-cli\n   ```\n3. Install the tool globally:\n   ```bash\n   cargo install --path .\n   ```\n4. Confirm the installation:\n   ```bash\n   hsync --help\n   ```\n\n### **Install From Binary**\nPrebuilt binaries will be available on the [Releases Page](#).\n\n---\n\n## **💻 Usage**\n\n### **General Help**\nTo display the help message:\n```bash\nhsync --help\n```\n\n### **Command: `sync`**\nThe `sync` command synchronizes files between two directories.\n\n#### **Basic Usage**\n```bash\nhsync sync --src \u003csource_directory\u003e --dest \u003cdestination_directory\u003e\n```\n\n#### **Options**\n| **Option**        | **Short-Hand** | **Description**                                                                 |\n|--------------------|----------------|---------------------------------------------------------------------------------|\n| `--src \u003cpath\u003e`    | `-s \u003cpath\u003e`    | Source directory to sync from.                                                 |\n| `--dest \u003cpath\u003e`   | `-d \u003cpath\u003e`    | Destination directory to sync to.                                              |\n| `--init`          | `-i`           | Initialize the destination directory for syncing.                              |\n| `--reverse`       | `-r`           | Reverse the source and destination directories.                                |\n| `--dry-run`       | `-dr`          | Perform a dry run to show what changes would be made without syncing files.    |\n| `--exclude \u003c...\u003e` | `-e \u003c...\u003e`     | Exclude specific files or directories during sync. Supports multiple entries.  |\n\n#### **Examples**\n1. **First-Time Sync**:\n   ```bash\n   hsync sync -s /path/to/source -d /path/to/destination -i\n   ```\n2. **Dry Run**:\n   ```bash\n   hsync sync -s /path/to/source -d /path/to/destination -dr\n   ```\n3. **Exclude Files**:\n   ```bash\n   hsync sync -s /path/to/source -d /path/to/destination -e \"*.tmp\" \"ignore-this-folder/\"\n   ```\n4. **Reverse Sync**:\n   ```bash\n   hsync sync -s /path/to/source -d /path/to/destination -r\n   ```\n\n---\n\n### **Ignoring Files and Directories**\n\nYou can specify files or directories to exclude from syncing by creating a `hard_sync.ignore` file in the destination directory. The syntax is the same as a `.gitignore` file.\n\n#### Example `hard_sync.ignore` File:\n```plaintext\n# Ignore all .tmp files\n*.tmp\n\n# Ignore a specific folder\nignore-this-folder/\n\n# Ignore a specific file\ndo-not-sync.txt\n```\n\n---\n\n## **📦 Features**\n- **File Syncing**: Sync files and directories from a source to a destination with support for initialization and reverse syncing.\n- **Dry Run**: Preview changes without applying them.\n- **File Exclusion**: Specify files or directories to exclude using the `--exclude` option or an `hard_sync.ignore` file.\n- **Metadata Initialization**: Use the `--init` flag to set up the destination directory for syncing.\n- **Colorized Output**: Get detailed status information with color-coded messages for errors, successes, and warnings.\n\n---\n\n## **🛠️ Advanced Features**\n### **Planned Features**\n- **Bidirectional Syncing**: Synchronize changes in both directions (`source ↔ destination`).\n- **Network Support**: Enable syncing over SSH or SFTP.\n- **Versioning**: Create backups or versions of overwritten files.\n- **Configuration Files**: Support for `.toml` or `.json` configuration files for advanced settings.\n\n---\n\n## **📄 License**\nThis project is licensed under the **MIT License**. See the [LICENSE](LICENSE) file for details.\n\n---\n\n## **🤝 Contributing**\n\nContributions are welcome! Follow these steps to contribute:\n\n1. Fork the repository.\n2. Create a feature branch (`git checkout -b feature/your-feature-name`).\n3. Commit your changes (`git commit -m \"Add your message\"`).\n4. Push to your fork (`git push origin feature/your-feature-name`).\n5. Open a pull request.\n\n---\n\n## **📋 To-Do**\n- [x] Add dry-run functionality.\n- [x] Add file exclusion via CLI and ignore files.\n- [ ] Add tests (unit and integration).\n- [ ] Support bidirectional syncing.\n- [ ] Improve error handling and logging.\n- [ ] Provide prebuilt binaries for major platforms.\n- [ ] Add support for syncing over a network.\n\n---\n\n### 🎉 **Thank You!**\nEnjoy using **Hard-Sync-CLI**! If you encounter any issues, feel free to open an issue on GitHub. 😊","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodad5%2Fhard-sync-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodad5%2Fhard-sync-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodad5%2Fhard-sync-cli/lists"}