A CLI tool for syncing git repositories between local and remote servers using git bundles.
This tool is useful when you need to sync code with a remote server that doesn't have direct git remote access (e.g., air-gapped environments, restricted networks).
cargo install --path .{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
miko-coder.url = "github:mikojs/coder";
};
outputs = { nixpkgs, miko-coder, ... }: {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
...
modules = [
({ pkgs, ... }: {
nixpkgs.overlays = [ miko-coder.overlays.default ];
environment.systemPackages = [ pkgs.miko-coder ];
})
];
};
};
}Sync local repository with a git bundle file:
coder sync <BUNDLE>This command will:
- Parse branches from the bundle file
- Remove local branches that don't exist in the bundle
- Add new branches from the bundle
- Update all branches with changes from the bundle
Push local repository to a remote server:
coder push <SSH_URL> <DIRECTORY>This command will:
- Create a git bundle from all local branches
- Transfer the bundle to the remote server via SCP
- Run
coder syncon the remote server - Clean up temporary files
Pull repository from a remote server:
coder pull <SSH_URL> <DIRECTORY>This command will:
- Create a git bundle on the remote server
- Transfer the bundle to local via SCP
- Run sync locally to update branches
- Clean up temporary files
Generate shell completion scripts:
coder --generate <bash|zsh|fish> > shell init script- Git
- SSH/SCP (for push/pull commands)
codermust be installed on the remote server (for push command)