
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
code-sync-cli
Advanced tools
I understand the issue. Let's try this again with the correct markdown formatting for your README.md file. You should be able to copy and paste this directly into a Markdown file:
# Code Sync CLI
Code Sync CLI is a command-line tool designed to synchronize shared code across multiple Git repositories. It streamlines the process of managing common code in various client projects, reducing the manual effort of copying and pasting code.
## Features
- **Central Repository Sync**: Synchronize code from a central Git repository to multiple client repositories.
- **Flexible Configuration**: Define specific files and folders to sync, with support for different paths in different codebases.
- **Version Control**: Sync specific versions of shared code, including support for tags, branches, and commits.
- **Conflict Handling**: Detect and handle conflicts between the central repository and client repositories.
- **Command-Line Interface**: Easy-to-use CLI for initiating and managing synchronization.
## Installation
Install the package globally using npm:
```bash
npm install -g code-sync-cli
```
## Usage
1. **Create a configuration file** (e.g., `my-config.json`) in your project root with the necessary configuration.
2. **Run the sync command with the config file**:
```
code-sync sync --config my-config.json
```
This will synchronize the files as per the configuration in the specified file. If no file is specified, `sync-config.json` will be used by default.
## Configuration
The `sync-config.json` file should follow this structure:
```json
{
"centralRepo": {
"url": "git@your-git-server.com:central-repo.git",
"auth": {
"method": "ssh",
"key": "/path/to/ssh/key"
},
"branch": "master"
},
"syncItems": [
{
"sourcePath": "path/in/central/repo/utility1",
"destinationPath": "path/in/client/repo/utility1",
"version": "latest"
},
{
"sourcePath": "path/in/central/repo/config",
"destinationPath": "different/path/in/another/client/repo/config",
"version": "specific-commit-or-tag"
}
// More items as needed...
],
"options": {
"overwrite": true,
"conflictResolution": "prompt",
"defaultVersion": "global-commit-or-tag"
}
}
```
## Sample Configuration
To create a sample configuration file, run:
```
code-sync create-sample-config
```
This will generate a `sync-config.json` file in your current directory, which you can modify according to your requirements.
### Usage
Now users can easily generate a sample configuration file by running:
```bash
code-sync create-sample-config
```
This command makes it easier for new users to get started by providing them with a template that they can edit to match their specific synchronization needs.
## Contributing
Contributions are welcome! Feel free to submit pull requests or create issues for bugs and feature requests.
## License
This project is licensed under the [MIT License](LICENSE).
FAQs
CLI to synchronize code across multiple repositories
The npm package code-sync-cli receives a total of 1 weekly downloads. As such, code-sync-cli popularity was classified as not popular.
We found that code-sync-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.