blobfish v1.5.2
blobfish
This package allows you to dynamically sync files between GitHub repositories.
🐡 Install
You can install this with:
npm i -g blobfish🐡 Usage
Run the following command in your project root folder:
blobfish initYou can also install blobfish as a dev dependency by running
npm i -D blobfishand then run commands like this:npx blobfish init.
Or, manually create a .blobfishrc file in your project root folder. Here's an example of the JSON file:
{
"replications": [
{
"repository": "cool-org/awesome-repo",
"branch": "main",
"files": [
"path/to/file.js",
{
"from": "path/to/another_file.js",
"to": "target/path/to/another_file.js"
}
]
}
],
"comment": "// This is a generated file"
}Specifying the
fromandtofields allows you to copy the file to a different path in the target repository. If you only provide the filename, the path will be the same as the original file.
Use the branch field to specify a branch to fetch your file from.
If the comment field is present, it overrides the original auto-generated comment.
You can use
{{url}}in thecommentto add the URL of the repository to your custom comment.
However, if you wish to keep the original comment but change the delimiter, you can add the commentDelimiter field instead, like: "commentDelimiter": "#" for .py files.
Make sure you already have a GitHub personal access token with the repository scope. You can create one here.
Then, create a .env file in your project root folder with the following content:
GH_TOKEN=<your_token>You can also set the
GH_TOKENenvironment variable directly.
Then, run the following command to sync your files:
blobfish syncYou can also input the token directly in the command line:
blobfish sync --token <your_token>And that's it! Your files will be copied to the specified repositories.
🐡 Coming Soon
- Support non GitHub repositories
9 months ago
9 months ago
9 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago