npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

code-sync-cli

v0.1.30

Published

CLI to synchronize code across multiple repositories

Downloads

48

Readme

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": "[email protected]: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).