Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,26 @@ nfpms:
- rpm
- apk

brews:
- repository:
owner: nasimstg
name: homebrew-tap
homepage: "https://github.com/nasimstg/xenvsync"
description: "Encrypt, commit, and inject .env secrets — no cloud required"
license: "MIT"
install: |
bin.install "xenvsync"
test: |
system "#{bin}/xenvsync", "version"

scoops:
- repository:
owner: nasimstg
name: scoop-bucket
homepage: "https://github.com/nasimstg/xenvsync"
description: "Encrypt, commit, and inject .env secrets — no cloud required"
license: "MIT"

changelog:
sort: asc
filters:
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
## Install

```bash
# Homebrew (macOS / Linux)
brew install nasimstg/tap/xenvsync

# Scoop (Windows)
scoop bucket add nasimstg https://github.com/nasimstg/scoop-bucket
scoop install xenvsync

# npm
npm install -g @nasimstg/xenvsync

Expand All @@ -42,6 +49,9 @@ npx @nasimstg/xenvsync

# Go 1.22+
go install github.com/nasimstg/xenvsync@latest

# Nix
nix run github:nasimstg/xenvsync
```

Or download a prebuilt binary from [Releases](https://github.com/nasimstg/xenvsync/releases).
Expand All @@ -56,6 +66,16 @@ make build
```
</details>

<details>
<summary>Arch Linux (AUR)</summary>

```bash
git clone https://aur.archlinux.org/xenvsync.git
cd xenvsync
makepkg -si
```
</details>

## Quick Start

```bash
Expand Down Expand Up @@ -220,6 +240,9 @@ xenvsync/
│ ├── docker/ # Dockerfile, compose, entrypoint
│ ├── ci/ # GitHub Actions, GitLab, CircleCI, Bitbucket
│ └── hooks/ # Git pre-commit hook
├── packaging/
│ └── aur/ # Arch Linux AUR PKGBUILD
├── flake.nix # Nix flake for NixOS / nix users
├── Makefile # build, test, lint, install
├── .goreleaser.yml # cross-platform release builds
└── .github/workflows/ci.yml # CI: test matrix, lint, release
Expand Down
40 changes: 40 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
description = "xenvsync - Encrypt, commit, and inject .env secrets";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages.default = pkgs.buildGoModule {
pname = "xenvsync";
version = "1.9.0";
src = ./.;
vendorHash = null;
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vendorHash = null will cause buildGoModule builds (and thus nix run github:nasimstg/xenvsync) to fail until a fixed vendor hash is provided. Compute the Go module vendor hash (e.g., by building once to get the expected hash) and set vendorHash to that value so the flake is usable for end users.

Suggested change
vendorHash = null;
vendorHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";

Copilot uses AI. Check for mistakes.

ldflags = [
"-s" "-w"
"-X main.version=${self.packages.${system}.default.version}"
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ldflags pulls the version via self.packages.${system}.default.version, which is an unnecessary self-reference and makes the expression harder to follow. Prefer referencing the local version value (or a let version = "..."; binding) directly to keep evaluation simpler and avoid subtle recursion issues if the derivation structure changes.

Suggested change
"-X main.version=${self.packages.${system}.default.version}"
"-X main.version=${version}"

Copilot uses AI. Check for mistakes.
];

meta = with pkgs.lib; {
description = "Encrypt, commit, and inject .env secrets — no cloud required";
homepage = "https://github.com/nasimstg/xenvsync";
license = licenses.mit;
maintainers = [];
mainProgram = "xenvsync";
};
};

devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ go gopls golangci-lint ];
};
}
);
}
23 changes: 23 additions & 0 deletions packaging/aur/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Maintainer: Md Nasim Sheikh <nasim.stg@gmail.com>
pkgname=xenvsync
pkgver=1.9.0
pkgrel=1
pkgdesc="Encrypt, commit, and inject .env secrets — no cloud required"
arch=('x86_64' 'aarch64')
url="https://github.com/nasimstg/xenvsync"
license=('MIT')
makedepends=('go')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/nasimstg/xenvsync/archive/v${pkgver}.tar.gz")
sha256sums=('SKIP')
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sha256sums=('SKIP') disables integrity checking for the release tarball and is likely to be rejected for an AUR release PKGBUILD. Please replace SKIP with the actual SHA-256 for the source tarball (e.g., via updpkgsums), so makepkg verifies downloads.

Suggested change
sha256sums=('SKIP')
sha256sums=('REPLACE_WITH_REAL_SHA256_FROM_updpkgsums')

Copilot uses AI. Check for mistakes.

build() {
cd "${pkgname}-${pkgver}"
export CGO_ENABLED=0
go build -ldflags "-s -w -X main.version=${pkgver}" -o "${pkgname}" .
}

package() {
cd "${pkgname}-${pkgver}"
install -Dm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
36 changes: 34 additions & 2 deletions website/src/app/docs/installation/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ export default function Installation() {
description="Multiple ways to install xenvsync on any platform."
/>

<Section title="Homebrew (macOS / Linux)">
<CodeBlock title="Install via Homebrew" language="bash">
{`$ brew install nasimstg/tap/xenvsync`}
</CodeBlock>
</Section>

<Section title="Scoop (Windows)">
<CodeBlock title="Install via Scoop" language="bash">
{`$ scoop bucket add nasimstg https://github.com/nasimstg/scoop-bucket
$ scoop install xenvsync`}
</CodeBlock>
</Section>

<Section title="npm (Quickest)">
<CodeBlock title="Install globally" language="bash">
{`$ npm install -g @nasimstg/xenvsync`}
Expand Down Expand Up @@ -87,6 +100,24 @@ $ make build`}
</p>
</Section>

<Section title="Nix Flake">
<CodeBlock title="Run with Nix" language="bash">
{`# Run without installing
$ nix run github:nasimstg/xenvsync

# Add to your flake inputs
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment # Add to your flake inputs doesn't match the command shown (nix profile install ... installs into the user profile, it doesn't add an input to a flake). Update the comment and/or command so the snippet accurately describes either profile installation or flake input configuration.

Suggested change
# Add to your flake inputs
# Install into your user profile

Copilot uses AI. Check for mistakes.
$ nix profile install github:nasimstg/xenvsync`}
</CodeBlock>
</Section>

<Section title="Arch Linux (AUR)">
<CodeBlock title="Install from AUR" language="bash">
{`$ git clone https://aur.archlinux.org/xenvsync.git
$ cd xenvsync
$ makepkg -si`}
</CodeBlock>
</Section>

<Section title="Verify">
<CodeBlock title="Check version" language="bash">
{`$ xenvsync version
Expand Down Expand Up @@ -120,8 +151,9 @@ xenvsync v0.1.0
Replace the binary with a newer version. Config files are forward-compatible.
</p>
<CodeBlock language="bash">
{`$ npm update -g xenvsync
# or
{`$ brew upgrade xenvsync
$ scoop update xenvsync
$ npm update -g @nasimstg/xenvsync
$ go install github.com/nasimstg/xenvsync@latest`}
</CodeBlock>
</Section>
Expand Down
18 changes: 18 additions & 0 deletions website/src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ const searchIndex: SearchEntry[] = [
},

// Installation
{
href: "/docs/installation",
title: "Installation",
section: "Docs",
heading: "Homebrew & Scoop",
keywords: ["homebrew", "brew", "scoop", "windows", "macos", "linux", "tap", "bucket"],
content:
"Install via Homebrew on macOS and Linux with brew install nasimstg/tap/xenvsync. Install via Scoop on Windows with scoop bucket add nasimstg and scoop install xenvsync.",
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The search index content for Scoop omits the bucket URL (scoop bucket add nasimstg) but the installation page instructs scoop bucket add nasimstg https://github.com/nasimstg/scoop-bucket. Update this entry to match the actual installation instructions to avoid users seeing incomplete commands in search results.

Suggested change
"Install via Homebrew on macOS and Linux with brew install nasimstg/tap/xenvsync. Install via Scoop on Windows with scoop bucket add nasimstg and scoop install xenvsync.",
"Install via Homebrew on macOS and Linux with brew install nasimstg/tap/xenvsync. Install via Scoop on Windows with scoop bucket add nasimstg https://github.com/nasimstg/scoop-bucket and scoop install xenvsync.",

Copilot uses AI. Check for mistakes.
},
{
href: "/docs/installation",
title: "Installation",
Expand All @@ -78,6 +87,15 @@ const searchIndex: SearchEntry[] = [
content:
"Prebuilt binaries available on GitHub Releases for Linux macOS Windows. Package manager support with deb and rpm. Download tar.gz or zip from releases page.",
},
{
href: "/docs/installation",
title: "Installation",
section: "Docs",
heading: "Nix & AUR",
keywords: ["nix", "flake", "nixos", "aur", "arch", "linux", "makepkg"],
content:
"Install with Nix using nix run github:nasimstg/xenvsync or add to your flake inputs. Arch Linux users can build from AUR with makepkg.",
Comment on lines +95 to +97
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This search entry says users can "add to your flake inputs", but the installation page currently shows nix profile install ... (profile install, not flake inputs). Align the search snippet with the docs so search results don't give conflicting Nix guidance.

Suggested change
keywords: ["nix", "flake", "nixos", "aur", "arch", "linux", "makepkg"],
content:
"Install with Nix using nix run github:nasimstg/xenvsync or add to your flake inputs. Arch Linux users can build from AUR with makepkg.",
keywords: ["nix", "nixos", "aur", "arch", "linux", "makepkg"],
content:
"Install with Nix using nix profile install github:nasimstg/xenvsync. Arch Linux users can build from AUR with makepkg.",

Copilot uses AI. Check for mistakes.
},
{
href: "/docs/installation",
title: "Installation",
Expand Down
Loading