<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Pratyay Mustafi</title>
    <link>https://www.pratyay.online</link>
    <description>Pratyay Mustafi - All posts</description>
    <atom:link href="https://www.pratyay.online/rss.xml" rel="self" type="application/rss+xml"></atom:link>
    <generator>Zine -- https://zine-ssg.io</generator>
    <language>en-US</language>
    <ttl>60</ttl>
    <lastBuildDate>Sat, 21 Nov 2026 18:51:51 +0000</lastBuildDate>
    
      <item>
        <title>Release your tauri app on microsoft store.</title>
        <description>&lt;p&gt;I recently built Drawx, a desktop app built using &lt;a href=&quot;https://v2.tauri.app/&quot; target=&quot;_blank&quot;&gt;https://v2.tauri.app/&lt;/a&gt; And Vite + React. Tauri is rust based framework for building cross-platform applications. Many Tauri projects already have CI set up (for example, through &lt;a href=&quot;https://web.crabnebula.cloud/&quot; target=&quot;_blank&quot;&gt;https://web.crabnebula.cloud&lt;/a&gt;), but publishing to the Microsoft Store is a different process you can only publish signed app on the app store.&lt;/p&gt;&lt;p&gt;This guide walks through the steps to publish a Tauri app to the Microsoft Store.&lt;/p&gt;&lt;p&gt;Start with Microsoft Partner Center: &lt;a href=&quot;https://partner.microsoft.com/en-US/&quot; target=&quot;_blank&quot;&gt;https://partner.microsoft.com/en-US/&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;1. Sign in to Partner Center&lt;/h2&gt;&lt;p&gt;Sign in to your Partner Center account, or create one if you do not have one yet.&lt;/p&gt;&lt;a href=&quot;https://partner.microsoft.com/&quot;&gt;&lt;img src=&quot;https://i.ibb.co/jk5CMTR7/image-png.png&quot; alt=&quot;asciicast&quot;&gt;&lt;/a&gt;
&lt;h2&gt;2. Understand code signing&lt;/h2&gt;&lt;p&gt;If you plan to publish desktop binaries, you need to understand code signing. Code signing certificates come from trusted certificate authorities, and they usually cost money. You cannot create your own trusted certificate and expect Windows or users to trust it in the same way.&lt;/p&gt;&lt;p&gt;These pages explain code signing and certificate options:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.globalsign.com/en/code-signing-certificate/what-is-code-signing-certificate&quot; target=&quot;_blank&quot;&gt;What is a code signing certificate? (Global Sign)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.digicert.com/signing/code-signing-certificates#code_signing_key_locker&quot; target=&quot;_blank&quot;&gt;Code signing certificates from (DigiCert)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://partner.microsoft.com/en-us/dashboard/home&quot; target=&quot;_blank&quot;&gt;Partner Center dashboard&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/B56kMjnS/image-png.png&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/BKjPvY7Y/image-png.png&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/fdtD9HHj/image-png.png&quot;&gt;&lt;/p&gt;&lt;h2&gt;3. Reserve your app name&lt;/h2&gt;&lt;p&gt;In Partner Center, reserve the name you want to use for your app.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://i.ibb.co/s9LGJBLd/image-png.png&quot;&gt;
&lt;figcaption&gt;create new app&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://i.ibb.co/pjw8ghpz/image-png.png&quot;&gt;
&lt;figcaption&gt;reserve app name&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;h3&gt;4. Get a code signing certificate for releasing &lt;code&gt;.exe&lt;/code&gt; or &lt;code&gt;.msi&lt;/code&gt;&lt;/h3&gt;&lt;p&gt;If you publish &lt;code&gt;.exe&lt;/code&gt; or &lt;code&gt;.msi&lt;/code&gt; Installers in the Store. Getting a code signing is necessary you need a code signing certificate which can be obtained from online providers, &lt;a href=&quot;https://www.digicert.com/signing/code-signing-certificates#code_signing_key_locker&quot; target=&quot;_blank&quot;&gt;DigiCert&lt;/a&gt; &lt;a href=&quot;https://www.globalsign.com/en/code-signing-certificate/what-is-code-signing-certificate&quot; target=&quot;_blank&quot;&gt;or GlobalSign.&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;5. Use Microsoft Store signing with MSIX&lt;/h3&gt;&lt;p&gt;Microsoft can sign your package when you submit it to the Store, but your package must be in &lt;code&gt;.msix&lt;/code&gt; or &lt;code&gt;.appx&lt;/code&gt; Format this is the only way to publish an app for free.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/9mJF99yq/image-png.png&quot;&gt;&lt;/p&gt;&lt;h2&gt;6. Example GitHub Actions workflow (MSI to MSIX)&lt;/h2&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Build MSIX&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;workflow_dispatch&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;permissions&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;contents&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;write&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;id-token&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;write&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;packages&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;write&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;actions&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;write&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;msix&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;MSI -&amp;gt; MSIX&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;windows-latest&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;timeout-minutes&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;60&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Checkout&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;actions/checkout@v7&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Setup Bun&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;oven-sh/setup-bun@v2&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;bun-version&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;1.4.1&amp;quot;&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Install Rust&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;dtolnay/rust-toolchain@stable&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Cache Rust&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Swatinem/rust-cache@v2&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;workspaces&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;./src-tauri -&amp;gt; target&amp;quot;&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Install JS dependencies&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;bun install --frozen-lockfile&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Build MSI&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;bun run tauri build --bundles msi&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ github.token }}&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;TAURI_BUNDLE_CREATE_UPDATER_ARTIFACTS&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;TAURI_SIGNING_PRIVATE_KEY&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;TAURI_SIGNING_PRIVATE_KEY_PASSWORD&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;SENTRY_AUTH_TOKEN&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ secrets.SENTRY_AUTH_TOKEN }}&lt;/span&gt;

      &lt;span class=&quot;comment spell&quot;&gt;# The runner image&amp;apos;s Appx module has no Add-AppxPackage -LicensePath, so provision&lt;/span&gt;
      &lt;span class=&quot;comment spell&quot;&gt;# with DISM (which accepts the license) and register the staged package for this user.&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Install MSIX Packaging Tool&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;shell&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;powershell&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string punctuation_delimiter&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;
          if (Get-AppxPackage -Name &amp;apos;Microsoft.MsixPackagingTool&amp;apos; -ErrorAction SilentlyContinue) {
            Write-Host &amp;apos;MSIX Packaging Tool already installed.&amp;apos;
            exit 0
          }
          $work = Join-Path $env:RUNNER_TEMP &amp;apos;msix-packaging-tool&amp;apos;
          New-Item -ItemType Directory -Path $work -Force | Out-Null
          $bundle = Join-Path $work &amp;apos;MSIXPackagingTool.msixbundle&amp;apos;
          $license = Join-Path $work &amp;apos;MSIXPackagingTool.License.xml&amp;apos;
          Invoke-WebRequest -Uri &amp;apos;https://download.microsoft.com/download/e/2/e/e2e923b2-7a3a-4730-969d-ab37001fbb5e/MSIXPackagingtoolv1.2024.405.0.msixbundle&amp;apos; -OutFile $bundle -UseBasicParsing
          Invoke-WebRequest -Uri &amp;apos;https://download.microsoft.com/download/e/2/e/e2e923b2-7a3a-4730-969d-ab37001fbb5e/MSIXPackagingtoolv1.2024.405.0.License.xml&amp;apos; -OutFile $license -UseBasicParsing
          $capability = Get-WindowsCapability -Online -ErrorAction SilentlyContinue |
            Where-Object { $_.Name -like &amp;apos;Msix*PackagingTool*Driver*&amp;apos; } |
            Select-Object -First 1
          if ($capability -and $capability.State -ne &amp;apos;Installed&amp;apos;) {
            try {
              Add-WindowsCapability -Online -Name $capability.Name | Out-Null
            }
            catch {
              Write-Warning &amp;quot;Could not install the MSIX Packaging Tool driver capability: $($_.Exception.Message)&amp;quot;
            }
          }
          Add-AppxProvisionedPackage -Online -PackagePath $bundle -LicensePath $license -ErrorAction Stop | Out-Null
          $app = Get-AppxPackage -Name &amp;apos;Microsoft.MsixPackagingTool&amp;apos; -ErrorAction SilentlyContinue
          if (-not $app) {
            if ((Get-Command Get-AppxPackage).Parameters.ContainsKey(&amp;apos;AllUsers&amp;apos;)) {
              $app = Get-AppxPackage -AllUsers -Name &amp;apos;Microsoft.MsixPackagingTool&amp;apos; -ErrorAction SilentlyContinue
            }
            if (-not $app) {
              $staged = Get-ChildItem -Path (Join-Path $env:ProgramFiles &amp;apos;WindowsApps&amp;apos;) -Directory -Filter &amp;apos;Microsoft.MsixPackagingTool*&amp;apos; -ErrorAction SilentlyContinue |
                Select-Object -First 1
              if ($staged) {
                $app = [pscustomobject]@{ InstallLocation = $staged.FullName }
              }
            }
            if (-not $app -or -not $app.InstallLocation) {
              throw &amp;apos;MSIX Packaging Tool provisioning did not stage the package.&amp;apos;
            }
            Add-AppxPackage -Register (Join-Path $app.InstallLocation &amp;apos;AppxManifest.xml&amp;apos;) -DisableDevelopmentMode -ErrorAction Stop | Out-Null
          }
          if (-not (Get-AppxPackage -Name &amp;apos;Microsoft.MsixPackagingTool&amp;apos; -ErrorAction SilentlyContinue)) {
            throw &amp;apos;MSIX Packaging Tool installation did not register the app package.&amp;apos;
          }&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Convert MSI to MSIX&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;shell&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;pwsh&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;MSIX_PUBLISHER&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;CN=67A9BB80-54AE-4F78-9A81-B2731D7D156C&amp;apos;&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;MSIX_PACKAGE_NAME&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;PratyayMustafi.drawxdraw&amp;apos;&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;MSIX_PACKAGE_DISPLAY_NAME&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;Drawx Draw&amp;apos;&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ github.token }}&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;TAURI_BUNDLE_CREATE_UPDATER_ARTIFACTS&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;false&amp;quot;&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;TAURI_SIGNING_PRIVATE_KEY&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;TAURI_SIGNING_PRIVATE_KEY_PASSWORD&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;SENTRY_AUTH_TOKEN&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ secrets.SENTRY_AUTH_TOKEN }}&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string punctuation_delimiter&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;
          $extra = @{}
          if ($env:MSIX_PACKAGE_NAME) { $extra[&amp;apos;PackageName&amp;apos;] = $env:MSIX_PACKAGE_NAME }
          if ($env:MSIX_PACKAGE_DISPLAY_NAME) { $extra[&amp;apos;PackageDisplayName&amp;apos;] = $env:MSIX_PACKAGE_DISPLAY_NAME }
          ./scripts/msi-to-msix.ps1 `
            -MsiPath &amp;quot;src-tauri/target/release/bundle/msi&amp;quot; `
            -OutDir &amp;quot;msix-out&amp;quot; `
            @extra&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Upload MSIX&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;actions/upload-artifact@v7&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;drawx-msix&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;msix-out/*.msix&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;if-no-files-found&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;error&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Resolve release tag&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;release&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;shell&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;pwsh&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string punctuation_delimiter&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;
          $version = (Get-Content -Raw src-tauri/tauri.conf.json | ConvertFrom-Json).version
          &amp;quot;tag=v$version&amp;quot; | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Attach MSIX to release&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;shell&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;pwsh&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;GH_TOKEN&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ github.token }}&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;TAG&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ steps.release.outputs.tag }}&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string punctuation_delimiter&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;
          $ErrorActionPreference = &amp;apos;Stop&amp;apos;
          $msixFiles = Get-ChildItem -Path msix-out -Filter &amp;apos;*.msix&amp;apos; -File
          if (-not $msixFiles) {
            throw &amp;apos;No .msix files found in msix-out.&amp;apos;
          }

          # Ensure the release for this version exists.
          $release = gh release view $env:TAG --json id,tagName 2&amp;gt;$null
          if ($LASTEXITCODE -ne 0 -or -not $release) {
            gh release create $env:TAG msix-out/*.msix --title &amp;quot;drawx $env:TAG&amp;quot; --target $env:GITHUB_SHA
            exit $LASTEXITCODE
          }

          foreach ($file in $msixFiles) {
            # Replace any existing asset with the same name.
            gh release upload $env:TAG $file.FullName --clobber
            if ($LASTEXITCODE -ne 0) { throw &amp;quot;Failed to upload $($file.Name)&amp;quot; }
          }
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;7. Example PowerShell script (&lt;code&gt;scripts/msi-to-msix.ps1&lt;/code&gt;)&lt;/h2&gt;&lt;pre&gt;&lt;code class=&quot;powershell&quot;&gt;&lt;span class=&quot;comment&quot;&gt;#Requires -Version 5.1&lt;/span&gt;

&lt;span class=&quot;comment&quot;&gt;&amp;lt;#
.SYNOPSIS
    Repackages a .msi installer into an .msix package.

.DESCRIPTION
    Fills an MSIX Packaging Tool conversion template (defaults come from
    src-tauri/tauri.conf.json), runs `MsixPackagingTool.exe create-package
    --template &amp;lt;template&amp;gt;`, verifies the output and removes the test
    installation the tool leaves behind.

    Requires an elevated console and the MSIX Packaging Tool on the machine
    (it installs the MSI while a driver captures system changes).

    The package is produced unsigned on purpose: for Microsoft Store
    distribution the Store re-signs the package during submission.

.PARAMETER MsiPath
    The .msi file, or a directory containing .msi files (the newest one is used).

.PARAMETER OutDir
    Directory for the .msix and the generated template. Defaults to the MSI&amp;apos;s directory.

.PARAMETER PackageName
    MSIX identity name. Must match the package identity reserved in Partner Center.
    Defaults to the tauri.conf.json identifier; can be set via $env:MSIX_PACKAGE_NAME.

.PARAMETER PackageDisplayName
    Name shown to users. Defaults to tauri.conf.json productName.

.PARAMETER PublisherName
    Publisher from Partner Center (CN=...). Defaults to $env:MSIX_PUBLISHER.

.PARAMETER PublisherDisplayName
    Publisher display name. Defaults to tauri.conf.json bundle.publisher.

.PARAMETER PackageVersion
    Four-octet package version (x.y.z.w). Defaults to tauri.conf.json version.

.PARAMETER InstallLocation
    Root folder the MSI installs to (template Installer/@InstallLocation).
    Defaults to the folder resolved from the MSI Directory table.

.PARAMETER ToolPath
    Path to MsixPackagingTool.exe. Discovered automatically when omitted.

.EXAMPLE
    ./scripts/msi-to-msix.ps1 -MsiPath src-tauri/target/release/bundle/msi -OutDir msix-out
#&amp;gt;&lt;/span&gt;

[&lt;span class=&quot;type&quot;&gt;CmdletBinding&lt;/span&gt;()]
&lt;span class=&quot;keyword&quot;&gt;param&lt;/span&gt;(
    [&lt;span class=&quot;type&quot;&gt;Parameter&lt;/span&gt;(Mandatory = &lt;span class=&quot;variable&quot;&gt;$true&lt;/span&gt;)]
    [&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$MsiPath&lt;/span&gt;,

    [&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$OutDir&lt;/span&gt; = &lt;span class=&quot;string&quot;&gt;&amp;apos;&amp;apos;&lt;/span&gt;,

    [&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$PackageName&lt;/span&gt; = (&lt;span class=&quot;variable&quot;&gt;$env:MSIX_PACKAGE_NAME&lt;/span&gt;),

    [&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$PackageDisplayName&lt;/span&gt; = (&lt;span class=&quot;variable&quot;&gt;$env:MSIX_PACKAGE_DISPLAY_NAME&lt;/span&gt;),

    [&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$PublisherName&lt;/span&gt; = (&lt;span class=&quot;variable&quot;&gt;$env:MSIX_PUBLISHER&lt;/span&gt;),

    [&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$PublisherDisplayName&lt;/span&gt; = &lt;span class=&quot;string&quot;&gt;&amp;apos;&amp;apos;&lt;/span&gt;,

    [&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$PackageVersion&lt;/span&gt; = &lt;span class=&quot;string&quot;&gt;&amp;apos;&amp;apos;&lt;/span&gt;,

    [&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$InstallLocation&lt;/span&gt; = &lt;span class=&quot;string&quot;&gt;&amp;apos;&amp;apos;&lt;/span&gt;,

    [&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$ToolPath&lt;/span&gt; = &lt;span class=&quot;string&quot;&gt;&amp;apos;&amp;apos;&lt;/span&gt;,

    [&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$TauriConfig&lt;/span&gt; = &lt;span class=&quot;string&quot;&gt;&amp;apos;&amp;apos;&lt;/span&gt;
)

&lt;span class=&quot;function&quot;&gt;Set-StrictMode&lt;/span&gt; -Version Latest
&lt;span class=&quot;variable&quot;&gt;$ErrorActionPreference&lt;/span&gt; = &lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;Stop&amp;apos;&lt;/span&gt;

&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;function&quot;&gt;ConvertTo-XmlAttributeValue&lt;/span&gt; {
    &lt;span class=&quot;keyword&quot;&gt;param&lt;/span&gt;([&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$Value&lt;/span&gt;)
    &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; [&lt;span class=&quot;type&quot;&gt;System.Security.SecurityElement&lt;/span&gt;]::&lt;span class=&quot;function&quot;&gt;Escape&lt;/span&gt;(&lt;span class=&quot;variable&quot;&gt;$Value&lt;/span&gt;)
}

&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;function&quot;&gt;ConvertTo-MsixVersion&lt;/span&gt; {
    &lt;span class=&quot;comment&quot;&gt;# MSIX requires exactly four octets, each 0..65535.&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;param&lt;/span&gt;([&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$Version&lt;/span&gt;)

    &lt;span class=&quot;variable&quot;&gt;$parts&lt;/span&gt; = &lt;span class=&quot;array assignvalue&quot;&gt;@(&lt;/span&gt;&lt;span class=&quot;array assignvalue variable&quot;&gt;$Version&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;array assignvalue function&quot;&gt;Trim&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt;() &lt;/span&gt;&lt;span class=&quot;array assignvalue operator&quot;&gt;-split&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string array assignvalue&quot;&gt;&amp;apos;\.&amp;apos;&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$parts&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;Count&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-gt&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;4&lt;/span&gt;) {
        &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Version &amp;apos;&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$Version&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;apos; has more than 4 components; MSIX requires x.y.z.w.&amp;quot;&lt;/span&gt;
    }
    &lt;span class=&quot;keyword&quot;&gt;while&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$parts&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;Count&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-lt&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;4&lt;/span&gt;) {
        &lt;span class=&quot;variable&quot;&gt;$parts&lt;/span&gt; += &lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;0&amp;apos;&lt;/span&gt;
    }

    &lt;span class=&quot;variable&quot;&gt;$octets&lt;/span&gt; = &lt;span class=&quot;array assignvalue&quot;&gt;@()&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$part&lt;/span&gt; in &lt;span class=&quot;variable&quot;&gt;$parts&lt;/span&gt;) {
        &lt;span class=&quot;variable&quot;&gt;$number&lt;/span&gt; = &lt;span class=&quot;assignvalue number&quot;&gt;0&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; [&lt;span class=&quot;type&quot;&gt;int&lt;/span&gt;]::&lt;span class=&quot;function&quot;&gt;TryParse&lt;/span&gt;(&lt;span class=&quot;variable&quot;&gt;$part&lt;/span&gt;, [&lt;span class=&quot;type&quot;&gt;ref&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$number&lt;/span&gt;) &lt;span class=&quot;operator&quot;&gt;-or&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$number&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-lt&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-or&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$number&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-gt&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;65535&lt;/span&gt;) {
            &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Version component &amp;apos;&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$part&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;apos; of &amp;apos;&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$Version&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;apos; is not a number between 0 and 65535.&amp;quot;&lt;/span&gt;
        }
        &lt;span class=&quot;variable&quot;&gt;$octets&lt;/span&gt; += &lt;span class=&quot;assignvalue variable&quot;&gt;$number&lt;/span&gt;
    }
    &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$octets&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-join&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;.&amp;apos;&lt;/span&gt;)
}

&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;function&quot;&gt;Assert-Administrator&lt;/span&gt; {
    &lt;span class=&quot;variable&quot;&gt;$identity&lt;/span&gt; = &lt;span class=&quot;assignvalue&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;type assignvalue&quot;&gt;Security.Principal.WindowsIdentity&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;]::&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;GetCurrent&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$principal&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;New-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; Security.Principal.WindowsPrincipal(&lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$identity&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$principal&lt;/span&gt;.&lt;span class=&quot;function&quot;&gt;IsInRole&lt;/span&gt;([&lt;span class=&quot;type&quot;&gt;Security.Principal.WindowsBuiltInRole&lt;/span&gt;]::&lt;span class=&quot;property&quot;&gt;Administrator&lt;/span&gt;)) {
        &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;Administrator privileges are required: MsixPackagingTool installs the MSI on this machine while capturing the changes.&amp;apos;&lt;/span&gt;
    }
}

&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;function&quot;&gt;Find-MsixPackagingTool&lt;/span&gt; {
    &lt;span class=&quot;keyword&quot;&gt;param&lt;/span&gt;([&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$Explicit&lt;/span&gt;)

    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$Explicit&lt;/span&gt;) {
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$Explicit&lt;/span&gt;)) {
            &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;MsixPackagingTool not found at &amp;apos;&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$Explicit&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;apos;.&amp;quot;&lt;/span&gt;
        }
        &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Resolve-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$Explicit&lt;/span&gt;).&lt;span class=&quot;property&quot;&gt;Path&lt;/span&gt;
    }

    &lt;span class=&quot;keyword&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$name&lt;/span&gt; in &lt;span class=&quot;array&quot;&gt;@(&lt;/span&gt;&lt;span class=&quot;string array&quot;&gt;&amp;apos;MsixPackagingTool.exe&amp;apos;&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;string array&quot;&gt;&amp;apos;MsixPackagingToolCLI.exe&amp;apos;&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;)&lt;/span&gt;) {
        &lt;span class=&quot;variable&quot;&gt;$command&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Get-Command&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$name&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -ErrorAction SilentlyContinue | &lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Select-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -First &lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$command&lt;/span&gt;) {
            &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$command&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;Path&lt;/span&gt;
        }
    }

    &lt;span class=&quot;comment&quot;&gt;# Installed as a Microsoft Store / AppX package (&amp;quot;MSIX Packaging Tool&amp;quot;).&lt;/span&gt;
    &lt;span class=&quot;comment&quot;&gt;# Its executable lives under C:\\Program Files\\WindowsApps and is not on PATH,&lt;/span&gt;
    &lt;span class=&quot;comment&quot;&gt;# so discover it through the package registration instead.&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Get-Command&lt;/span&gt; Get-AppxPackage -ErrorAction SilentlyContinue) {
        &lt;span class=&quot;keyword&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$packageName&lt;/span&gt; in &lt;span class=&quot;array&quot;&gt;@(&lt;/span&gt;&lt;span class=&quot;string array&quot;&gt;&amp;apos;Microsoft.MsixPackagingTool&amp;apos;&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;string array&quot;&gt;&amp;apos;Microsoft.MsixPackagingToolCLI&amp;apos;&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;)&lt;/span&gt;) {
            &lt;span class=&quot;variable&quot;&gt;$app&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Get-AppxPackage&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Name &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$packageName&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -ErrorAction SilentlyContinue | &lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Select-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -First &lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$app&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-and&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$app&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;InstallLocation&lt;/span&gt;) {
                &lt;span class=&quot;keyword&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$exeName&lt;/span&gt; in &lt;span class=&quot;array&quot;&gt;@(&lt;/span&gt;&lt;span class=&quot;string array&quot;&gt;&amp;apos;MsixPackagingTool.exe&amp;apos;&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;string array&quot;&gt;&amp;apos;MsixPackagingToolCLI.exe&amp;apos;&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;)&lt;/span&gt;) {
                    &lt;span class=&quot;variable&quot;&gt;$candidate&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$app&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;InstallLocation&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$exeName&lt;/span&gt;
                    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$candidate&lt;/span&gt;) {
                        &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$candidate&lt;/span&gt;
                    }
                }
                &lt;span class=&quot;variable&quot;&gt;$found&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Get-ChildItem&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Path &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$app&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;InstallLocation&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Filter &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;MsixPackagingTool*.exe&amp;apos;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -ErrorAction SilentlyContinue |
                    &lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Select-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -First &lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;1&lt;/span&gt;
                &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$found&lt;/span&gt;) {
                    &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$found&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;FullName&lt;/span&gt;
                }
            }
        }
    }

    &lt;span class=&quot;comment&quot;&gt;# Installed as a Visual Studio individual component (&amp;quot;MSIX Packaging Tool&amp;quot;).&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$searchRoots&lt;/span&gt; = &lt;span class=&quot;array assignvalue&quot;&gt;@()&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$programFilesX86&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;${env:ProgramFiles(x86)}&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$programFilesX86&lt;/span&gt;) {
        &lt;span class=&quot;variable&quot;&gt;$vsInstaller&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$programFilesX86&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;Microsoft Visual Studio\Installer\vswhere.exe&amp;apos;&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$vsInstaller&lt;/span&gt;) {
            &lt;span class=&quot;variable&quot;&gt;$vsPath&lt;/span&gt; = &lt;span class=&quot;assignvalue operator&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$vsInstaller&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -latest -property installationPath&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$vsPath&lt;/span&gt;) {
                &lt;span class=&quot;variable&quot;&gt;$searchRoots&lt;/span&gt; += &lt;span class=&quot;assignvalue variable&quot;&gt;$vsPath&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Trim&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;()&lt;/span&gt;
            }
        }
    }
    &lt;span class=&quot;keyword&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$programFiles&lt;/span&gt; in &lt;span class=&quot;array&quot;&gt;@(&lt;/span&gt;&lt;span class=&quot;array variable&quot;&gt;$env:ProgramFiles&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;array variable&quot;&gt;${env:ProgramFiles(x86)}&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;)&lt;/span&gt;) {
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$programFiles&lt;/span&gt;) {
            &lt;span class=&quot;variable&quot;&gt;$vsRoot&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$programFiles&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;Microsoft Visual Studio&amp;apos;&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$vsRoot&lt;/span&gt;) {
                &lt;span class=&quot;variable&quot;&gt;$searchRoots&lt;/span&gt; += &lt;span class=&quot;assignvalue variable&quot;&gt;$vsRoot&lt;/span&gt;
            }
        }
    }

    &lt;span class=&quot;keyword&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$root&lt;/span&gt; in (&lt;span class=&quot;variable&quot;&gt;$searchRoots&lt;/span&gt; | &lt;span class=&quot;function&quot;&gt;Select-Object&lt;/span&gt; -Unique)) {
        &lt;span class=&quot;variable&quot;&gt;$found&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Get-ChildItem&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Path &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$root&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Filter &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;MsixPackagingTool*.exe&amp;apos;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Recurse -ErrorAction SilentlyContinue |
            &lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Select-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -First &lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$found&lt;/span&gt;) {
            &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$found&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;FullName&lt;/span&gt;
        }
    }

    &lt;span class=&quot;comment&quot;&gt;# Store apps are deployed under %ProgramFiles%\\WindowsApps and are not on PATH.&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$windowsApps&lt;/span&gt; in &lt;span class=&quot;array&quot;&gt;@((&lt;/span&gt;&lt;span class=&quot;array function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;array&quot;&gt; &lt;/span&gt;&lt;span class=&quot;array variable&quot;&gt;$env:ProgramFiles&lt;/span&gt;&lt;span class=&quot;array&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string array&quot;&gt;&amp;apos;WindowsApps&amp;apos;&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;),
                              (&lt;/span&gt;&lt;span class=&quot;array function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;array&quot;&gt; &lt;/span&gt;&lt;span class=&quot;array variable&quot;&gt;${env:ProgramFiles(x86)}&lt;/span&gt;&lt;span class=&quot;array&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string array&quot;&gt;&amp;apos;WindowsApps&amp;apos;&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;))&lt;/span&gt;) {
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$windowsApps&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-and&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$windowsApps&lt;/span&gt;)) {
            &lt;span class=&quot;variable&quot;&gt;$found&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Get-ChildItem&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Path &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$windowsApps&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Filter &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;MsixPackagingTool*.exe&amp;apos;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Recurse -ErrorAction SilentlyContinue |
                &lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Select-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -First &lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;1&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$found&lt;/span&gt;) {
                &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$found&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;FullName&lt;/span&gt;
            }
        }
    }

    &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$null&lt;/span&gt;
}

&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;function&quot;&gt;Get-DefaultDirName&lt;/span&gt; {
    &lt;span class=&quot;comment&quot;&gt;# DefaultDir may be &amp;quot;SHORTN~1|Long Name&amp;quot;; the long name wins when present.&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;param&lt;/span&gt;([&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$DefaultDir&lt;/span&gt;)

    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$DefaultDir&lt;/span&gt;.&lt;span class=&quot;function&quot;&gt;Contains&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&amp;apos;|&amp;apos;&lt;/span&gt;)) {
        &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$DefaultDir&lt;/span&gt;.&lt;span class=&quot;function&quot;&gt;Substring&lt;/span&gt;(&lt;span class=&quot;variable&quot;&gt;$DefaultDir&lt;/span&gt;.&lt;span class=&quot;function&quot;&gt;IndexOf&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&amp;apos;|&amp;apos;&lt;/span&gt;) &lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;)
    }
    &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$DefaultDir&lt;/span&gt;
}

&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;function&quot;&gt;Get-MsiDefaultInstallLocation&lt;/span&gt; {
    &lt;span class=&quot;comment&quot;&gt;# Resolves e.g. &amp;quot;C:\Program Files\My Company\My Product&amp;quot; from the MSI Directory table.&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;param&lt;/span&gt;([&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$Path&lt;/span&gt;)

    &lt;span class=&quot;variable&quot;&gt;$installer&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;New-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -ComObject WindowsInstaller.Installer&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$database&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$installer&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;OpenDatabase&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$view&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$database&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;OpenView&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;SELECT `Directory`, `Directory_Parent`, `DefaultDir` FROM `Directory`&amp;apos;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$view&lt;/span&gt;.&lt;span class=&quot;function&quot;&gt;Execute&lt;/span&gt;() | &lt;span class=&quot;function&quot;&gt;Out-Null&lt;/span&gt;

    &lt;span class=&quot;variable&quot;&gt;$rows&lt;/span&gt; = &lt;span class=&quot;array assignvalue&quot;&gt;@()&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;while&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$record&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$view&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Fetch&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;()&lt;/span&gt;) {
        &lt;span class=&quot;variable&quot;&gt;$rows&lt;/span&gt; += &lt;span class=&quot;assignvalue&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;type assignvalue&quot;&gt;pscustomobject&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;]@{
            Id     = &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$record&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;StringData&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;)
            Parent = &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$record&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;StringData&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;)
            Name   = &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$record&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;StringData&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;)
        }&lt;/span&gt;
    }
    &lt;span class=&quot;variable&quot;&gt;$view&lt;/span&gt;.&lt;span class=&quot;function&quot;&gt;Close&lt;/span&gt;() | &lt;span class=&quot;function&quot;&gt;Out-Null&lt;/span&gt;

    &lt;span class=&quot;variable&quot;&gt;$rootId&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$null&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$current&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$null&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$candidate&lt;/span&gt; in &lt;span class=&quot;array&quot;&gt;@(&lt;/span&gt;&lt;span class=&quot;string array&quot;&gt;&amp;apos;ProgramFiles64Folder&amp;apos;&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;string array&quot;&gt;&amp;apos;ProgramFilesFolder&amp;apos;&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;)&lt;/span&gt;) {
        &lt;span class=&quot;variable&quot;&gt;$child&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$rows&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; | &lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Where-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; { &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;Parent&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue operator&quot;&gt;-eq&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$candidate&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; } | &lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Select-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -First &lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$child&lt;/span&gt;) {
            &lt;span class=&quot;variable&quot;&gt;$rootId&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$candidate&lt;/span&gt;
            &lt;span class=&quot;variable&quot;&gt;$current&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$child&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;break&lt;/span&gt;
        }
    }
    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$current&lt;/span&gt;) {
        &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$null&lt;/span&gt;
    }

    &lt;span class=&quot;variable&quot;&gt;$names&lt;/span&gt; = &lt;span class=&quot;array assignvalue&quot;&gt;@()&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;while&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$true&lt;/span&gt;) {
        &lt;span class=&quot;variable&quot;&gt;$names&lt;/span&gt; += &lt;span class=&quot;assignvalue function&quot;&gt;Get-DefaultDirName&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -DefaultDir &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$current&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;Name&lt;/span&gt;
        &lt;span class=&quot;variable&quot;&gt;$children&lt;/span&gt; = &lt;span class=&quot;array assignvalue&quot;&gt;@(&lt;/span&gt;&lt;span class=&quot;array assignvalue variable&quot;&gt;$rows&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; | &lt;/span&gt;&lt;span class=&quot;array assignvalue function&quot;&gt;Where-Object&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; { &lt;/span&gt;&lt;span class=&quot;array assignvalue variable&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;array property assignvalue&quot;&gt;Parent&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;array assignvalue operator&quot;&gt;-eq&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;array assignvalue variable&quot;&gt;$current&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;array property assignvalue&quot;&gt;Id&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; })&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$children&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;Count&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;) {
            &lt;span class=&quot;keyword&quot;&gt;break&lt;/span&gt;
        }
        &lt;span class=&quot;variable&quot;&gt;$current&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$children&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;]&lt;/span&gt;
    }

    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$rootId&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-eq&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;ProgramFiles64Folder&amp;apos;&lt;/span&gt;) {
        &lt;span class=&quot;variable&quot;&gt;$base&lt;/span&gt; = &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;${env:ProgramW6432}&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;${env:ProgramW6432}&lt;/span&gt; } &lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt; { &lt;span class=&quot;variable&quot;&gt;$env:ProgramFiles&lt;/span&gt; }
    }
    &lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt; {
        &lt;span class=&quot;variable&quot;&gt;$base&lt;/span&gt; = &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;${env:ProgramFiles(x86)}&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;${env:ProgramFiles(x86)}&lt;/span&gt; } &lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt; { &lt;span class=&quot;variable&quot;&gt;$env:ProgramFiles&lt;/span&gt; }
    }

    &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Join-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$base&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$names&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-join&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;\&amp;apos;&lt;/span&gt;))
}

&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;function&quot;&gt;Read-MsiInfo&lt;/span&gt; {
    &lt;span class=&quot;keyword&quot;&gt;param&lt;/span&gt;([&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$Path&lt;/span&gt;)

    &lt;span class=&quot;variable&quot;&gt;$info&lt;/span&gt; = &lt;span class=&quot;assignvalue&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;type assignvalue&quot;&gt;pscustomobject&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;]@{
        ProductCode     = &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$null&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;
        InstallLocation = &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$null&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;
    }&lt;/span&gt;

    &lt;span class=&quot;comment&quot;&gt;# COM calls can emit stray pipeline output (e.g. View.Close()); capture the&lt;/span&gt;
    &lt;span class=&quot;comment&quot;&gt;# reads so this function returns exactly one object.&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$null&lt;/span&gt; = &lt;span class=&quot;assignvalue operator&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; {
        &lt;/span&gt;&lt;span class=&quot;keyword assignvalue&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; {
            &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$installer&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; = &lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;New-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -ComObject WindowsInstaller.Installer&lt;/span&gt;
            &lt;span class=&quot;variable&quot;&gt;$database&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$installer&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;OpenDatabase&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;variable&quot;&gt;$view&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$database&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;OpenView&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;SELECT `Value` FROM `Property` WHERE `Property` = &amp;apos;&amp;apos;ProductCode&amp;apos;&amp;apos;&amp;apos;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;variable&quot;&gt;$view&lt;/span&gt;.&lt;span class=&quot;function&quot;&gt;Execute&lt;/span&gt;() | &lt;span class=&quot;function&quot;&gt;Out-Null&lt;/span&gt;
            &lt;span class=&quot;variable&quot;&gt;$record&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$view&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Fetch&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;()&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$record&lt;/span&gt;) {
                &lt;span class=&quot;variable&quot;&gt;$info&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;ProductCode&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$record&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;StringData&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;)&lt;/span&gt;
            }
            &lt;span class=&quot;variable&quot;&gt;$view&lt;/span&gt;.&lt;span class=&quot;function&quot;&gt;Close&lt;/span&gt;() | &lt;span class=&quot;function&quot;&gt;Out-Null&lt;/span&gt;
        }
        &lt;span class=&quot;keyword&quot;&gt;catch&lt;/span&gt; {
            &lt;span class=&quot;function&quot;&gt;Write-Warning&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Could not read the ProductCode from the MSI: $(&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;Exception&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;Message&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;)&amp;quot;&lt;/span&gt;
        }

        &lt;span class=&quot;keyword&quot;&gt;try&lt;/span&gt; {
            &lt;span class=&quot;variable&quot;&gt;$info&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;InstallLocation&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Get-MsiDefaultInstallLocation&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Path &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$Path&lt;/span&gt;
        }
        &lt;span class=&quot;keyword&quot;&gt;catch&lt;/span&gt; {
            &lt;span class=&quot;function&quot;&gt;Write-Warning&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Could not resolve the install folder from the MSI: $(&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;Exception&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;Message&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;)&amp;quot;&lt;/span&gt;
        }
    }

    &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$info&lt;/span&gt;
}

&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;function&quot;&gt;Test-MsiInstalled&lt;/span&gt; {
    &lt;span class=&quot;keyword&quot;&gt;param&lt;/span&gt;([&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$ProductCode&lt;/span&gt;)

    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$ProductCode&lt;/span&gt;) {
        &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$false&lt;/span&gt;
    }
    &lt;span class=&quot;variable&quot;&gt;$uninstallKeys&lt;/span&gt; = &lt;span class=&quot;array assignvalue&quot;&gt;@(
        &lt;/span&gt;&lt;span class=&quot;string array assignvalue&quot;&gt;&amp;quot;HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\&lt;/span&gt;&lt;span class=&quot;string array assignvalue variable&quot;&gt;$ProductCode&lt;/span&gt;&lt;span class=&quot;string array assignvalue&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt;,
        &lt;/span&gt;&lt;span class=&quot;string array assignvalue&quot;&gt;&amp;quot;HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\&lt;/span&gt;&lt;span class=&quot;string array assignvalue variable&quot;&gt;$ProductCode&lt;/span&gt;&lt;span class=&quot;string array assignvalue&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt;
    )&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$key&lt;/span&gt; in &lt;span class=&quot;variable&quot;&gt;$uninstallKeys&lt;/span&gt;) {
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$key&lt;/span&gt;) {
            &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$true&lt;/span&gt;
        }
    }
    &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$false&lt;/span&gt;
}

&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;function&quot;&gt;Invoke-MsiUninstall&lt;/span&gt; {
    &lt;span class=&quot;keyword&quot;&gt;param&lt;/span&gt;([&lt;span class=&quot;type&quot;&gt;string&lt;/span&gt;] &lt;span class=&quot;variable&quot;&gt;$Target&lt;/span&gt;)

    &lt;span class=&quot;variable&quot;&gt;$arguments&lt;/span&gt; = &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$Target&lt;/span&gt;.&lt;span class=&quot;function&quot;&gt;StartsWith&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&amp;apos;{&amp;apos;&lt;/span&gt;)) {
        &lt;span class=&quot;string&quot;&gt;&amp;quot;/x &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$Target&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; /qn /norestart&amp;quot;&lt;/span&gt;
    }
    &lt;span class=&quot;function&quot;&gt;else&lt;/span&gt; {
        &lt;span class=&quot;string&quot;&gt;&amp;quot;/x `&amp;quot;&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$Target&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;`&amp;quot; /qn /norestart&amp;quot;&lt;/span&gt;
    }
    &lt;span class=&quot;variable&quot;&gt;$process&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Start-Process&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -FilePath &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;msiexec.exe&amp;apos;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -ArgumentList &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$arguments&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Wait -PassThru -WindowStyle Hidden&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$process&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;ExitCode&lt;/span&gt;
}

&lt;span class=&quot;comment&quot;&gt;# --- Resolve identity defaults ------------------------------------------------&lt;/span&gt;

&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$TauriConfig&lt;/span&gt;) {
    &lt;span class=&quot;variable&quot;&gt;$TauriConfig&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$PSScriptRoot&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;..\src-tauri\tauri.conf.json&amp;apos;&lt;/span&gt;
}

&lt;span class=&quot;variable&quot;&gt;$tauri&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$null&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$TauriConfig&lt;/span&gt;) {
    &lt;span class=&quot;variable&quot;&gt;$tauri&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Get-Content&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Path &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$TauriConfig&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Raw | &lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;ConvertFrom-Json&lt;/span&gt;
}
&lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt; {
    &lt;span class=&quot;function&quot;&gt;Write-Warning&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;tauri.conf.json not found at &amp;apos;&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$TauriConfig&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;apos;; identity defaults are unavailable.&amp;quot;&lt;/span&gt;
}

&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$PackageName&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-and&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$tauri&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;$PackageName&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$tauri&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;identifier&lt;/span&gt; }
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$PackageDisplayName&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-and&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$tauri&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;$PackageDisplayName&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$tauri&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;productName&lt;/span&gt; }
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$PublisherDisplayName&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-and&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$tauri&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;$PublisherDisplayName&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$tauri&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;bundle&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;publisher&lt;/span&gt; }
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$PackageVersion&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-and&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$tauri&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;$PackageVersion&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$tauri&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;version&lt;/span&gt; }

&lt;span class=&quot;variable&quot;&gt;$missing&lt;/span&gt; = &lt;span class=&quot;array assignvalue&quot;&gt;@()&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$PackageName&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;$missing&lt;/span&gt; += &lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;-PackageName (or $env:MSIX_PACKAGE_NAME, or tauri identifier)&amp;apos;&lt;/span&gt; }
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$PackageDisplayName&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;$missing&lt;/span&gt; += &lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;-PackageDisplayName (or tauri productName)&amp;apos;&lt;/span&gt; }
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$PublisherName&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;$missing&lt;/span&gt; += &lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;-PublisherName (or $env:MSIX_PUBLISHER, e.g. CN=67A9BB80-...)&amp;apos;&lt;/span&gt; }
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$PublisherDisplayName&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;$missing&lt;/span&gt; += &lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;-PublisherDisplayName (or tauri bundle.publisher)&amp;apos;&lt;/span&gt; }
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$PackageVersion&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;$missing&lt;/span&gt; += &lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;-PackageVersion (or tauri version)&amp;apos;&lt;/span&gt; }
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$missing&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;Count&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-gt&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;0&lt;/span&gt;) {
    &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Missing required package identity values:`n  $(&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$missing&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;-join&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;`n  &amp;quot;&lt;/span&gt;)&amp;quot;
}

&lt;span class=&quot;variable&quot;&gt;$PublisherName&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$PublisherName&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Trim&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$PublisherName&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-notlike&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;CN=*&amp;apos;&lt;/span&gt;) {
    &lt;span class=&quot;variable&quot;&gt;$PublisherName&lt;/span&gt; = &lt;span class=&quot;string assignvalue&quot;&gt;&amp;quot;CN=&lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$PublisherName&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;quot;&lt;/span&gt;
}
&lt;span class=&quot;variable&quot;&gt;$PackageVersion&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;ConvertTo-MsixVersion&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Version &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$PackageVersion&lt;/span&gt;

&lt;span class=&quot;comment&quot;&gt;# --- Resolve the MSI ----------------------------------------------------------&lt;/span&gt;

&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$MsiPath&lt;/span&gt; -PathType Container) {
    &lt;span class=&quot;variable&quot;&gt;$msi&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Get-ChildItem&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Path &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$MsiPath&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Filter &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;*.msi&amp;apos;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; | &lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Sort-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; LastWriteTime -Descending | &lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Select-Object&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -First &lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$msi&lt;/span&gt;) {
        &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;No .msi file found in &amp;apos;&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$MsiPath&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;apos;.&amp;quot;&lt;/span&gt;
    }
}
&lt;span class=&quot;keyword&quot;&gt;elseif&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$MsiPath&lt;/span&gt; -PathType Leaf) {
    &lt;span class=&quot;variable&quot;&gt;$msi&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Get-Item&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$MsiPath&lt;/span&gt;
}
&lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt; {
    &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;MSI path &amp;apos;&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$MsiPath&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;apos; does not exist.&amp;quot;&lt;/span&gt;
}

&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$OutDir&lt;/span&gt;) {
    &lt;span class=&quot;variable&quot;&gt;$OutDir&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$msi&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;DirectoryName&lt;/span&gt;
}
&lt;span class=&quot;function&quot;&gt;New-Item&lt;/span&gt; -ItemType Directory -Path &lt;span class=&quot;variable&quot;&gt;$OutDir&lt;/span&gt; -Force | &lt;span class=&quot;function&quot;&gt;Out-Null&lt;/span&gt;
&lt;span class=&quot;variable&quot;&gt;$OutDir&lt;/span&gt; = &lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;Resolve-Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$OutDir&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;Path&lt;/span&gt;

&lt;span class=&quot;variable&quot;&gt;$baseName&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$msi&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;BaseName&lt;/span&gt;
&lt;span class=&quot;variable&quot;&gt;$packagePath&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$OutDir&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$baseName&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;.msix&amp;quot;&lt;/span&gt;
&lt;span class=&quot;variable&quot;&gt;$templatePath&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$OutDir&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$baseName&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;.msix.template.xml&amp;quot;&lt;/span&gt;
&lt;span class=&quot;variable&quot;&gt;$commandLineTemplatePath&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$OutDir&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$baseName&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;.msix.g.xml&amp;quot;&lt;/span&gt;

&lt;span class=&quot;function&quot;&gt;Assert-Administrator&lt;/span&gt;

&lt;span class=&quot;variable&quot;&gt;$tool&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Find-MsixPackagingTool&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Explicit &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$ToolPath&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$tool&lt;/span&gt;) {
    &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; (&lt;span class=&quot;string&quot;&gt;&amp;quot;MsixPackagingTool.exe was not found. Install the MSIX Packaging Tool &amp;quot;&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;+&lt;/span&gt;
           &lt;span class=&quot;string&quot;&gt;&amp;quot;(Visual Studio individual component or Microsoft Store app), or pass -ToolPath.&amp;quot;&lt;/span&gt;)
}

&lt;span class=&quot;comment&quot;&gt;# --- MSI metadata -------------------------------------------------------------&lt;/span&gt;

&lt;span class=&quot;variable&quot;&gt;$msiInfo&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Read-MsiInfo&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Path &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$msi&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;FullName&lt;/span&gt;
&lt;span class=&quot;variable&quot;&gt;$productCode&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$msiInfo&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;ProductCode&lt;/span&gt;

&lt;span class=&quot;variable&quot;&gt;$effectiveInstallLocation&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$InstallLocation&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$effectiveInstallLocation&lt;/span&gt;) {
    &lt;span class=&quot;variable&quot;&gt;$effectiveInstallLocation&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$msiInfo&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;InstallLocation&lt;/span&gt;
}

&lt;span class=&quot;function&quot;&gt;Write-Host&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;MSI               : $(&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$msi&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;FullName&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;function&quot;&gt;Write-Host&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;MSIX Packaging    : &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$tool&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;function&quot;&gt;Write-Host&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Package           : &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$PackageName&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$PackageDisplayName&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;) v&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$PackageVersion&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;function&quot;&gt;Write-Host&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Publisher         : &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$PublisherName&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$PublisherDisplayName&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;)&amp;quot;&lt;/span&gt;
&lt;span class=&quot;function&quot;&gt;Write-Host&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Install location  : $(&lt;/span&gt;&lt;span class=&quot;string keyword&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$effectiveInstallLocation&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;) { &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$effectiveInstallLocation&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; } &lt;/span&gt;&lt;span class=&quot;string keyword&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; { &lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;apos;&amp;lt;not set&amp;gt;&amp;apos;&lt;/span&gt; })&amp;quot;
&lt;span class=&quot;function&quot;&gt;Write-Host&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Output            : &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$packagePath&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;

&lt;span class=&quot;comment&quot;&gt;# --- Conversion template ------------------------------------------------------&lt;/span&gt;

&lt;span class=&quot;variable&quot;&gt;$installLocationAttribute&lt;/span&gt; = &lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;&amp;apos;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$effectiveInstallLocation&lt;/span&gt;) {
    &lt;span class=&quot;variable&quot;&gt;$installLocationAttribute&lt;/span&gt; = &lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos; InstallLocation=&amp;quot;&amp;apos;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;ConvertTo-XmlAttributeValue&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$effectiveInstallLocation&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;) &lt;/span&gt;&lt;span class=&quot;assignvalue operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;&amp;quot;&amp;apos;&lt;/span&gt;
}

&lt;span class=&quot;variable&quot;&gt;$templateXml&lt;/span&gt; = &lt;span class=&quot;string assignvalue&quot;&gt;@&amp;quot;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;
&amp;lt;MsixPackagingToolTemplate xmlns=&amp;quot;http://schemas.microsoft.com/appx/msixpackagingtool/template/2018&amp;quot;&amp;gt;
    &amp;lt;Settings AllowTelemetry=&amp;quot;false&amp;quot; ApplyAllPrepareComputerFixes=&amp;quot;true&amp;quot; GenerateCommandLineFile=&amp;quot;true&amp;quot; AllowPromptForPassword=&amp;quot;false&amp;quot; EnforceMicrosoftStoreVersioningRequirements=&amp;quot;false&amp;quot; /&amp;gt;
    &amp;lt;SaveLocation PackagePath=&amp;quot;$(&lt;/span&gt;&lt;span class=&quot;string assignvalue function&quot;&gt;ConvertTo-XmlAttributeValue&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$packagePath&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;)&amp;quot; TemplatePath=&amp;quot;$(&lt;/span&gt;&lt;span class=&quot;string assignvalue function&quot;&gt;ConvertTo-XmlAttributeValue&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$commandLineTemplatePath&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;)&amp;quot; /&amp;gt;
    &amp;lt;Installer Path=&amp;quot;$(&lt;/span&gt;&lt;span class=&quot;string assignvalue function&quot;&gt;ConvertTo-XmlAttributeValue&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$msi&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;string property assignvalue&quot;&gt;FullName&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;)&amp;quot;&lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$installLocationAttribute&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt; /&amp;gt;
    &amp;lt;PackageInformation PackageName=&amp;quot;$(&lt;/span&gt;&lt;span class=&quot;string assignvalue function&quot;&gt;ConvertTo-XmlAttributeValue&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$PackageName&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;)&amp;quot; PackageDisplayName=&amp;quot;$(&lt;/span&gt;&lt;span class=&quot;string assignvalue function&quot;&gt;ConvertTo-XmlAttributeValue&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$PackageDisplayName&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;)&amp;quot; PublisherName=&amp;quot;$(&lt;/span&gt;&lt;span class=&quot;string assignvalue function&quot;&gt;ConvertTo-XmlAttributeValue&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$PublisherName&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;)&amp;quot; PublisherDisplayName=&amp;quot;$(&lt;/span&gt;&lt;span class=&quot;string assignvalue function&quot;&gt;ConvertTo-XmlAttributeValue&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$PublisherDisplayName&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;)&amp;quot; Version=&amp;quot;&lt;/span&gt;&lt;span class=&quot;string assignvalue variable&quot;&gt;$PackageVersion&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;quot; /&amp;gt;
&amp;lt;/MsixPackagingToolTemplate&amp;gt;
&amp;quot;@&lt;/span&gt;

&lt;span class=&quot;function&quot;&gt;Set-Content&lt;/span&gt; -Path &lt;span class=&quot;variable&quot;&gt;$templatePath&lt;/span&gt; -Value &lt;span class=&quot;variable&quot;&gt;$templateXml&lt;/span&gt; -Encoding UTF8

&lt;span class=&quot;comment&quot;&gt;# --- Convert ------------------------------------------------------------------&lt;/span&gt;

&lt;span class=&quot;keyword&quot;&gt;try&lt;/span&gt; {
    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-MsiInstalled&lt;/span&gt; -ProductCode &lt;span class=&quot;variable&quot;&gt;$productCode&lt;/span&gt;) {
        &lt;span class=&quot;function&quot;&gt;Write-Host&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Removing a previous installation (&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$productCode&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;)...&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;variable&quot;&gt;$exitCode&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Invoke-MsiUninstall&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Target &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$productCode&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$exitCode&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-notin&lt;/span&gt; &lt;span class=&quot;array&quot;&gt;@(&lt;/span&gt;&lt;span class=&quot;array number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;array number&quot;&gt;1605&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;array number&quot;&gt;1641&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;array number&quot;&gt;3010&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;)&lt;/span&gt;) {
            &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Pre-conversion uninstall failed with msiexec exit code &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$exitCode&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.&amp;quot;&lt;/span&gt;
        }
    }

    &lt;span class=&quot;function&quot;&gt;Remove-Item&lt;/span&gt; -Path &lt;span class=&quot;variable&quot;&gt;$packagePath&lt;/span&gt; -Force -ErrorAction SilentlyContinue

    &lt;span class=&quot;function&quot;&gt;Write-Host&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Running: &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$tool&lt;/span&gt;&lt;span class=&quot;string&quot;&gt; create-package --template &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$templatePath&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;operator&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$tool&lt;/span&gt; create-package --template &lt;span class=&quot;variable&quot;&gt;$templatePath&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$exitCode&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$LASTEXITCODE&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$exitCode&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;0&lt;/span&gt;) {
        &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;MsixPackagingTool failed with exit code &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$exitCode&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.&amp;quot;&lt;/span&gt;
    }

    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;operator&quot;&gt;-not&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-Path&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$packagePath&lt;/span&gt;)) {
        &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Conversion reported success but &amp;apos;&lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$packagePath&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;apos; was not created. Check the tool output above.&amp;quot;&lt;/span&gt;
    }

    &lt;span class=&quot;comment&quot;&gt;# --- Bump TargetDeviceFamily MinVersion -------------------------------&lt;/span&gt;
    &lt;span class=&quot;comment&quot;&gt;# Microsoft Store rejects MSIX packages whose TargetDeviceFamily MinVersion&lt;/span&gt;
    &lt;span class=&quot;comment&quot;&gt;# is &amp;lt;= 10.0.17134.0. The MSIX Packaging Tool may emit a lower MinVersion,&lt;/span&gt;
    &lt;span class=&quot;comment&quot;&gt;# so repack the package with a compliant MinVersion using makeappx.&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$makeAppx&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$null&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$sdkRoot&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;${env:ProgramFiles(x86)}&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;Windows Kits\10\bin&amp;apos;&lt;/span&gt;
    &lt;span class=&quot;variable&quot;&gt;$sdkCandidates&lt;/span&gt; = &lt;span class=&quot;array assignvalue&quot;&gt;@(
        &lt;/span&gt;&lt;span class=&quot;array assignvalue function&quot;&gt;Get-ChildItem&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; -LiteralPath &lt;/span&gt;&lt;span class=&quot;array assignvalue variable&quot;&gt;$sdkRoot&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; -Directory -ErrorAction SilentlyContinue |
            &lt;/span&gt;&lt;span class=&quot;array assignvalue function&quot;&gt;Where-Object&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; { &lt;/span&gt;&lt;span class=&quot;array assignvalue variable&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;array property assignvalue&quot;&gt;Name&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;array assignvalue operator&quot;&gt;-match&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string array assignvalue&quot;&gt;&amp;apos;^\d+\.\d+\.\d+\.\d+$&amp;apos;&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; } |
            &lt;/span&gt;&lt;span class=&quot;array assignvalue function&quot;&gt;Sort-Object&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; { [&lt;/span&gt;&lt;span class=&quot;array type assignvalue&quot;&gt;version&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;array assignvalue variable&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;array property assignvalue&quot;&gt;Name&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; } -Descending |
            &lt;/span&gt;&lt;span class=&quot;array assignvalue function&quot;&gt;ForEach-Object&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; { &lt;/span&gt;&lt;span class=&quot;array assignvalue function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;array assignvalue variable&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;array property assignvalue&quot;&gt;FullName&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string array assignvalue&quot;&gt;&amp;apos;x64\makeappx.exe&amp;apos;&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; } |
            &lt;/span&gt;&lt;span class=&quot;array assignvalue function&quot;&gt;Where-Object&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; { &lt;/span&gt;&lt;span class=&quot;array assignvalue function&quot;&gt;Test-Path&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; -LiteralPath &lt;/span&gt;&lt;span class=&quot;array assignvalue variable&quot;&gt;$_&lt;/span&gt;&lt;span class=&quot;array assignvalue&quot;&gt; }
    )&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$sdkCandidates&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;Count&lt;/span&gt;) { &lt;span class=&quot;variable&quot;&gt;$makeAppx&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$sdkCandidates&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;assignvalue number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;]&lt;/span&gt; }

    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$makeAppx&lt;/span&gt;) {
        &lt;span class=&quot;variable&quot;&gt;$unpackDir&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$env:TEMP&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;quot;drawx-msix-&amp;quot;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; [&lt;/span&gt;&lt;span class=&quot;type assignvalue&quot;&gt;Guid&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;]::&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;NewGuid&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;ToString&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;N&amp;apos;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;function&quot;&gt;New-Item&lt;/span&gt; -ItemType Directory -Path &lt;span class=&quot;variable&quot;&gt;$unpackDir&lt;/span&gt; -Force | &lt;span class=&quot;function&quot;&gt;Out-Null&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;try&lt;/span&gt; {
            &lt;span class=&quot;operator&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$makeAppx&lt;/span&gt; unpack /p &lt;span class=&quot;variable&quot;&gt;$packagePath&lt;/span&gt; /d &lt;span class=&quot;variable&quot;&gt;$unpackDir&lt;/span&gt; /o | &lt;span class=&quot;function&quot;&gt;Out-Null&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$LASTEXITCODE&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;0&lt;/span&gt;) { &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;makeappx unpack failed with exit code &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$LASTEXITCODE&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.&amp;quot;&lt;/span&gt; }

            &lt;span class=&quot;variable&quot;&gt;$manifestPath&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Join-Path&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$unpackDir&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;AppxManifest.xml&amp;apos;&lt;/span&gt;
            [&lt;span class=&quot;type&quot;&gt;xml&lt;/span&gt;]&lt;span class=&quot;variable&quot;&gt;$manifest&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Get-Content&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -LiteralPath &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$manifestPath&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Raw&lt;/span&gt;
            &lt;span class=&quot;variable&quot;&gt;$ns&lt;/span&gt; = &lt;span class=&quot;assignvalue&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;type assignvalue&quot;&gt;Xml.XmlNamespaceManager&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;]::&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$manifest&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property assignvalue&quot;&gt;NameTable&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;variable&quot;&gt;$ns&lt;/span&gt;.&lt;span class=&quot;function&quot;&gt;AddNamespace&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&amp;apos;f&amp;apos;&lt;/span&gt;, &lt;span class=&quot;string&quot;&gt;&amp;apos;http://schemas.microsoft.com/appx/manifest/foundation/windows10&amp;apos;&lt;/span&gt;)
            &lt;span class=&quot;variable&quot;&gt;$nodes&lt;/span&gt; = &lt;span class=&quot;assignvalue variable&quot;&gt;$manifest&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;assignvalue function&quot;&gt;SelectNodes&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;/f:Package/f:Dependencies/f:TargetDeviceFamily&amp;apos;&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$ns&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;foreach&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$tdf&lt;/span&gt; in &lt;span class=&quot;variable&quot;&gt;$nodes&lt;/span&gt;) {
                &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; ([&lt;span class=&quot;type&quot;&gt;version&lt;/span&gt;]&lt;span class=&quot;variable&quot;&gt;$tdf&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;MinVersion&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-le&lt;/span&gt; [&lt;span class=&quot;type&quot;&gt;version&lt;/span&gt;]&lt;span class=&quot;string&quot;&gt;&amp;apos;10.0.17134.0&amp;apos;&lt;/span&gt;) {
                    &lt;span class=&quot;variable&quot;&gt;$tdf&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;MinVersion&lt;/span&gt; = &lt;span class=&quot;string assignvalue&quot;&gt;&amp;apos;10.0.17763.0&amp;apos;&lt;/span&gt;
                }
            }
            &lt;span class=&quot;variable&quot;&gt;$manifest&lt;/span&gt;.&lt;span class=&quot;function&quot;&gt;Save&lt;/span&gt;(&lt;span class=&quot;variable&quot;&gt;$manifestPath&lt;/span&gt;)

            &lt;span class=&quot;function&quot;&gt;Remove-Item&lt;/span&gt; -Path &lt;span class=&quot;variable&quot;&gt;$packagePath&lt;/span&gt; -Force
            &lt;span class=&quot;operator&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span class=&quot;variable&quot;&gt;$makeAppx&lt;/span&gt; pack /d &lt;span class=&quot;variable&quot;&gt;$unpackDir&lt;/span&gt; /p &lt;span class=&quot;variable&quot;&gt;$packagePath&lt;/span&gt; /o | &lt;span class=&quot;function&quot;&gt;Out-Null&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$LASTEXITCODE&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-ne&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;0&lt;/span&gt;) { &lt;span class=&quot;keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;makeappx pack failed with exit code &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$LASTEXITCODE&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.&amp;quot;&lt;/span&gt; }
        }
        &lt;span class=&quot;keyword&quot;&gt;finally&lt;/span&gt; {
            &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-Path&lt;/span&gt; -LiteralPath &lt;span class=&quot;variable&quot;&gt;$unpackDir&lt;/span&gt;) {
                &lt;span class=&quot;function&quot;&gt;Remove-Item&lt;/span&gt; -LiteralPath &lt;span class=&quot;variable&quot;&gt;$unpackDir&lt;/span&gt; -Recurse -Force
            }
        }
    }
    &lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt; {
        &lt;span class=&quot;function&quot;&gt;Write-Warning&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;makeappx.exe not found; MinVersion was not adjusted. Store upload may fail.&amp;quot;&lt;/span&gt;
    }

    &lt;span class=&quot;variable&quot;&gt;$created&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Get-Item&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$packagePath&lt;/span&gt;
    &lt;span class=&quot;function&quot;&gt;Write-Host&lt;/span&gt; (&lt;span class=&quot;string&quot;&gt;&amp;quot;Created: {0} ({1:N0} KB)&amp;quot;&lt;/span&gt; -f &lt;span class=&quot;variable&quot;&gt;$created&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;FullName&lt;/span&gt;, (&lt;span class=&quot;variable&quot;&gt;$created&lt;/span&gt;.&lt;span class=&quot;property&quot;&gt;Length&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;KB))
}
&lt;span class=&quot;keyword&quot;&gt;finally&lt;/span&gt; {
    &lt;span class=&quot;comment&quot;&gt;# The tool installs the MSI on this machine while capturing changes; clean up.&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;function&quot;&gt;Test-MsiInstalled&lt;/span&gt; -ProductCode &lt;span class=&quot;variable&quot;&gt;$productCode&lt;/span&gt;) {
        &lt;span class=&quot;function&quot;&gt;Write-Host&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Cleaning up the test installation...&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;variable&quot;&gt;$exitCode&lt;/span&gt; = &lt;span class=&quot;assignvalue function&quot;&gt;Invoke-MsiUninstall&lt;/span&gt;&lt;span class=&quot;assignvalue&quot;&gt; -Target &lt;/span&gt;&lt;span class=&quot;assignvalue variable&quot;&gt;$productCode&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;variable&quot;&gt;$exitCode&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;-notin&lt;/span&gt; &lt;span class=&quot;array&quot;&gt;@(&lt;/span&gt;&lt;span class=&quot;array number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;array number&quot;&gt;1605&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;array number&quot;&gt;1641&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;array number&quot;&gt;3010&lt;/span&gt;&lt;span class=&quot;array&quot;&gt;)&lt;/span&gt;) {
            &lt;span class=&quot;function&quot;&gt;Write-Warning&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Cleanup uninstall failed with msiexec exit code &lt;/span&gt;&lt;span class=&quot;string variable&quot;&gt;$exitCode&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.&amp;quot;&lt;/span&gt;
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The app store listing&lt;/p&gt;&lt;a href=&quot;https://apps.microsoft.com/store/detail/9MT3RCXNDBT4?cid=DevShareMCLPCS&quot; title=&quot;Drawx draw&quot;&gt;&lt;img src=&quot;https://i.ibb.co/5xvbQQ4C/image-png.png&quot; alt=&quot;Drawx draw&quot;&gt;&lt;/a&gt;
</description>
        <link>https://www.pratyay.online/blog/publish-tauri-app-to-microsoft-store/</link>
        <pubDate>Mon, 09 Nov 2026 18:45:16 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/publish-tauri-app-to-microsoft-store/</guid>
      </item>
    
      <item>
        <title>Why Your Tauri based appImage not working on Linux</title>
        <description>&lt;h2&gt;Tauri Apps Built as Appimages are not working on modern Linux distributions, like fedora, arch&lt;/h2&gt;&lt;p&gt;Appimages are one of the nicest ways to distribute an app but not being able to run a format meant to be used on multiple Os, is a bad thing. Appimage as a format is crucial for users who want to test a app and use it without the need of installing. Appimages are cool as they comes with all the required dependencies and can be operated on systems such as Windows with WSL2 and FreeBSD with the Linuxulator. Appimages are self contained in nature and requires no root access.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/SzdDWNG/Screenshot-20261010-211137-png.png&quot;&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;Gtk-Message:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;21:07:08.168:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;Failed&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;to&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;load&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;module&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;appmenu-gtk-module&amp;quot;&lt;/span&gt;&lt;span class=&quot;constant&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;apos;gtk_module_display_init&amp;apos;&lt;/span&gt;&lt;span class=&quot;constant&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;/usr/lib64/gtk-3.0/modules/libcolorreload-gtk-module.so:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;undefined&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;symbol:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;gtk_module_display_init&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;Could&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;not&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;EGL&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;display:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;EGL_BAD_PARAMETER.&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;Aborting...&lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;**&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constant function&quot;&gt;apiark:185476&lt;/span&gt;): &lt;span class=&quot;constant function&quot;&gt;WARNING&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;**:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;21:07:33.334:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;atk-bridge:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;get_device_events_reply:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;unknown&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;signature&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is a sample app image for a Tauri based rest api client &lt;a href=&quot;https://apiark.dev/&quot; target=&quot;_blank&quot;&gt;apiark&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;So, I was building &lt;a href=&quot;https://pratyay360.github.io/drawx/&quot; target=&quot;_blank&quot;&gt;Drawx&lt;/a&gt;, the offline version of &lt;a href=&quot;https://github.com/Pratyay360/drawy&quot; target=&quot;_blank&quot;&gt;drawy&lt;/a&gt;, which provides data sovereignty because nothing ever leaves your machine. However, the Drawx app was not working on my machine because of some odd issues. I wanted to run the AppImage in a portable manner, but using environment variables did not help. Setting &lt;code&gt;WEBKIT_DISABLE_DMABUF_RENDERER=1&lt;/code&gt; or &lt;code&gt;WEBKIT_DISABLE_COMPOSITING_MODE=1&lt;/code&gt; either caused a crash on launch or displayed a blank screen. The issue is that the CI environment adds libraries such as &lt;code&gt;libwayland-client.so&lt;/code&gt; inside the AppImage. This creates conflicts between the AppImage’s dependencies and the system’s libraries. The solution is to remove the duplicated dependencies and let the AppImage use the system’s libraries instead of those inside the AppImage.&lt;/p&gt;&lt;h2&gt;How to Fix This ?&lt;/h2&gt;&lt;p&gt;Remove all dependencies related to wayland from the AppImage. Since XWayland can handle X11 applications, there is no need to bundle these libraries internally. The creator of the AppImage also noted this in &lt;a href=&quot;https://x.com/realPratyay/status/2109024857203617944&quot; target=&quot;_blank&quot;&gt;his comment&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/Rkkyrt18/Screenshot-20261011-232802-png.png&quot;&gt;&lt;/p&gt;&lt;p&gt;I have written a shell script to handle this for you. Please create a file at &lt;code&gt;src-tauri/scripts/patch-appimage-wayland.sh&lt;/code&gt; and paste the script into it.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;comment&quot;&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-euo&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;pipefail&lt;/span&gt;

&lt;span class=&quot;property&quot;&gt;SCRIPT_DIR&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;string embedded constant function&quot;&gt;cd&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;string embedded constant function&quot;&gt;dirname&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;string embedded constant property&quot;&gt;BASH_SOURCE&lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;[0]}&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;)&amp;quot; &lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;constant function&quot;&gt;pwd&lt;/span&gt;)&amp;quot;
&lt;span class=&quot;property&quot;&gt;REPO_ROOT&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;string embedded constant function&quot;&gt;cd&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string embedded constant property&quot;&gt;SCRIPT_DIR&lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;/../..&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant function&quot;&gt;pwd&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;&amp;quot;
&lt;span class=&quot;property&quot;&gt;SRC_TAURI_DIR&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;REPO_ROOT&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/src-tauri&amp;quot;&lt;/span&gt;
&lt;span class=&quot;property&quot;&gt;TAURI_CACHE_DIR&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;string embedded property&quot;&gt;XDG_CACHE_HOME&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;:-&lt;/span&gt;&lt;span class=&quot;string embedded operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string embedded property&quot;&gt;HOME&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;/.cache}&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/tauri&amp;quot;&lt;/span&gt;

&lt;span class=&quot;comment&quot;&gt;# Clean up temp files on exit&lt;/span&gt;
&lt;span class=&quot;property&quot;&gt;TEMP_BIN&lt;/span&gt;=&lt;span class=&quot;embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;embedded constant function&quot;&gt;mktemp&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-d&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;property&quot;&gt;TEMP_EXTRACT&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;function&quot;&gt;cleanup&lt;/span&gt;() {
  &lt;span class=&quot;constant function&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-rf&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;TEMP_BIN&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; [ -n &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;TEMP_EXTRACT&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ] &lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; [ -d &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;TEMP_EXTRACT&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-rf&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;TEMP_EXTRACT&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;
}
&lt;span class=&quot;constant function&quot;&gt;trap&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;cleanup&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;EXIT&lt;/span&gt;

&lt;span class=&quot;comment&quot;&gt;# 1. Resolve linuxdeploy and appimage tools&lt;/span&gt;
&lt;span class=&quot;property&quot;&gt;LINUXDEPLOY_BIN&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; [ -d &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;TAURI_CACHE_DIR&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
  &lt;span class=&quot;property&quot;&gt;cached_linuxdeploy&lt;/span&gt;=&lt;span class=&quot;embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;embedded constant function&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;embedded string constant property&quot;&gt;TAURI_CACHE_DIR&lt;/span&gt;&lt;span class=&quot;embedded string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-maxdepth&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-name&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded string constant&quot;&gt;&amp;quot;linuxdeploy-*.AppImage&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-print&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-quit&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;embedded operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;/dev/null || &lt;/span&gt;&lt;span class=&quot;embedded constant function&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; [ -n &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;cached_linuxdeploy&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ] &lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; [ -f &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;cached_linuxdeploy&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-sf&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;cached_linuxdeploy&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;TEMP_BIN&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;/linuxdeploy&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;property&quot;&gt;LINUXDEPLOY_BIN&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;TEMP_BIN&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/linuxdeploy&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;

  &lt;span class=&quot;property&quot;&gt;cached_plugin&lt;/span&gt;=&lt;span class=&quot;embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;embedded constant function&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;embedded string constant property&quot;&gt;TAURI_CACHE_DIR&lt;/span&gt;&lt;span class=&quot;embedded string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-maxdepth&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-name&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded string constant&quot;&gt;&amp;quot;linuxdeploy-plugin-appimage.AppImage&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-print&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-quit&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;embedded operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;/dev/null || &lt;/span&gt;&lt;span class=&quot;embedded constant function&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; [ -n &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;cached_plugin&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ] &lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; [ -f &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;cached_plugin&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;ln&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-sf&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;cached_plugin&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;TEMP_BIN&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;/linuxdeploy-plugin-appimage&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; [ -z &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;LINUXDEPLOY_BIN&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ] &lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;constant function&quot;&gt;command&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-v&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;linuxdeploy&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;/dev/null &lt;span class=&quot;number&quot;&gt;2&lt;/span&gt;&amp;gt;&amp;amp;1; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
  &lt;span class=&quot;property&quot;&gt;LINUXDEPLOY_BIN&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;string embedded constant function&quot;&gt;command&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;-v&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;linuxdeploy&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;PATH&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;TEMP_BIN&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;APPIMAGE_EXTRACT_AND_RUN&lt;/span&gt;=1

&lt;span class=&quot;comment&quot;&gt;# 2. Patch an AppDir in-place&lt;/span&gt;
&lt;span class=&quot;function&quot;&gt;patch_appdir&lt;/span&gt;() {
  local &lt;span class=&quot;property&quot;&gt;appdir&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;Patching AppDir: &lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;

  &lt;span class=&quot;comment&quot;&gt;# 1. Write self-contained Wayland compatibility hook&lt;/span&gt;
  &lt;span class=&quot;constant function&quot;&gt;mkdir&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-p&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;/apprun-hooks&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;constant function&quot;&gt;cat&lt;/span&gt; &amp;lt;&amp;lt; &lt;span class=&quot;string&quot;&gt;&amp;apos;EOF&amp;apos;&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/apprun-hooks/wayland-compat.sh&amp;quot;&lt;/span&gt;
&lt;span class=&quot;string&quot;&gt;export DESKTOPINTEGRATION=1

if [ -z &amp;quot;${LD_PRELOAD:-}&amp;quot; ]; then
  for lib in \
    /usr/lib/libwayland-client.so \
    /usr/lib64/libwayland-client.so \
    /usr/lib/x86_64-linux-gnu/libwayland-client.so \
    /usr/lib/aarch64-linux-gnu/libwayland-client.so \
    /usr/lib/arm-linux-gnueabihf/libwayland-client.so; do
    if [ -f &amp;quot;$lib&amp;quot; ]; then
      export LD_PRELOAD=&amp;quot;$lib&amp;quot;
      break
    fi
  done
fi
&lt;/span&gt;EOF
  &lt;span class=&quot;constant function&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;+x&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;/apprun-hooks/wayland-compat.sh&amp;quot;&lt;/span&gt;

  &lt;span class=&quot;comment&quot;&gt;# 2. Patch AppRun so it sources the new hook before executing AppRun.wrapped&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; [ -f &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/AppRun.wrapped&amp;quot;&lt;/span&gt; ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; ! &lt;span class=&quot;constant function&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-q&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;wayland-compat.sh&amp;quot;&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;/AppRun&amp;quot;&lt;/span&gt;; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;constant function&quot;&gt;cat&lt;/span&gt; &amp;lt;&amp;lt; &lt;span class=&quot;string&quot;&gt;&amp;apos;EOF&amp;apos;&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/AppRun&amp;quot;&lt;/span&gt;
&lt;span class=&quot;string&quot;&gt;#!/usr/bin/env bash
HERE=&amp;quot;$(dirname &amp;quot;$(readlink -f &amp;quot;${0}&amp;quot;)&amp;quot;)&amp;quot;
if [ -f &amp;quot;$HERE/apprun-hooks/wayland-compat.sh&amp;quot; ]; then
  . &amp;quot;$HERE/apprun-hooks/wayland-compat.sh&amp;quot;
fi
exec &amp;quot;$HERE/AppRun.wrapped&amp;quot; &amp;quot;$@&amp;quot;
&lt;/span&gt;EOF
      &lt;span class=&quot;constant function&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;+x&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;/AppRun&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;elif&lt;/span&gt; [ -f &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/AppRun&amp;quot;&lt;/span&gt; ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;mv&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;/AppRun&amp;quot;&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;/AppRun.wrapped&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;cat&lt;/span&gt; &amp;lt;&amp;lt; &lt;span class=&quot;string&quot;&gt;&amp;apos;EOF&amp;apos;&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/AppRun&amp;quot;&lt;/span&gt;
&lt;span class=&quot;string&quot;&gt;#!/usr/bin/env bash
HERE=&amp;quot;$(dirname &amp;quot;$(readlink -f &amp;quot;${0}&amp;quot;)&amp;quot;)&amp;quot;
if [ -f &amp;quot;$HERE/apprun-hooks/wayland-compat.sh&amp;quot; ]; then
  . &amp;quot;$HERE/apprun-hooks/wayland-compat.sh&amp;quot;
fi
exec &amp;quot;$HERE/AppRun.wrapped&amp;quot; &amp;quot;$@&amp;quot;
&lt;/span&gt;EOF
    &lt;span class=&quot;constant function&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;+x&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;/AppRun&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;
}

&lt;span class=&quot;comment&quot;&gt;# 3. Repack AppDir into AppImage&lt;/span&gt;
&lt;span class=&quot;function&quot;&gt;repack_appdir&lt;/span&gt;() {
  local &lt;span class=&quot;property&quot;&gt;appdir&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;
  local &lt;span class=&quot;property&quot;&gt;expected_appimage&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;
  local &lt;span class=&quot;property&quot;&gt;bundle_dir&lt;/span&gt;
  &lt;span class=&quot;property&quot;&gt;bundle_dir&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;string embedded constant function&quot;&gt;dirname&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string embedded constant property&quot;&gt;expected_appimage&lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;&amp;quot;
  local &lt;span class=&quot;property&quot;&gt;appimage_base&lt;/span&gt;
  &lt;span class=&quot;property&quot;&gt;appimage_base&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;string embedded constant function&quot;&gt;basename&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string embedded constant property&quot;&gt;expected_appimage&lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;&amp;quot;

  &lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;Repacking AppImage into &lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;expected_appimage&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;...&amp;quot;&lt;/span&gt;
  (
    &lt;span class=&quot;constant function&quot;&gt;cd&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;bundle_dir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;LDAI_OUTPUT&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;appimage_base&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;

    &lt;span class=&quot;comment&quot;&gt;# Remove existing AppImage before repacking&lt;/span&gt;
    [ -f &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;expected_appimage&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ] &lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;constant function&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;expected_appimage&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;

    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; [ -n &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;LINUXDEPLOY_BIN&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;string constant function&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property function&quot;&gt;LINUXDEPLOY_BIN&lt;/span&gt;&lt;span class=&quot;string constant function&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--appdir&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--output&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;appimage&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;elif&lt;/span&gt; &lt;span class=&quot;constant function&quot;&gt;command&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-v&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;appimagetool&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;/dev/null &lt;span class=&quot;number&quot;&gt;2&lt;/span&gt;&amp;gt;&amp;amp;1; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;constant function&quot;&gt;appimagetool&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;expected_appimage&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;elif&lt;/span&gt; [ -x &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;TEMP_BIN&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/linuxdeploy-plugin-appimage&amp;quot;&lt;/span&gt; ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
      &lt;span class=&quot;string constant function&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property function&quot;&gt;TEMP_BIN&lt;/span&gt;&lt;span class=&quot;string constant function&quot;&gt;/linuxdeploy-plugin-appimage&amp;quot;&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--appdir&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt;
      &lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;Error: Could not find linuxdeploy or appimagetool to repack &lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt; &amp;gt;&amp;amp;2
      &lt;span class=&quot;constant function&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;
  )

  &lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;Successfully repacked AppImage at &lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;expected_appimage&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
}

&lt;span class=&quot;comment&quot;&gt;# 4. Process targets&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; [ &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;string embedded property&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;:-}&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; != &lt;span class=&quot;string&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt; ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
  &lt;span class=&quot;property&quot;&gt;TARGET_PATH&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;string embedded constant function&quot;&gt;readlink&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;-f&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string embedded constant property&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;&amp;quot;
  &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; [ -d &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;TARGET_PATH&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;patch_appdir&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;TARGET_PATH&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;property&quot;&gt;bundle_dir&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;string embedded constant function&quot;&gt;dirname&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string embedded constant property&quot;&gt;TARGET_PATH&lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;&amp;quot;
    &lt;span class=&quot;property&quot;&gt;appdir_name&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;string embedded constant function&quot;&gt;basename&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string embedded constant property&quot;&gt;TARGET_PATH&lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;&amp;quot;
    &lt;span class=&quot;property&quot;&gt;expected_appimage&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;string embedded property&quot;&gt;bundle_dir&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;string embedded property&quot;&gt;appdir_name&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;%.AppDir}&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.AppImage&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;repack_appdir&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;TARGET_PATH&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;expected_appimage&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;elif&lt;/span&gt; [ -f &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;TARGET_PATH&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;property&quot;&gt;TEMP_EXTRACT&lt;/span&gt;=&lt;span class=&quot;embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;embedded constant function&quot;&gt;mktemp&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-d&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;Extracting AppImage: &lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;TARGET_PATH&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
    (&lt;span class=&quot;constant function&quot;&gt;cd&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;TEMP_EXTRACT&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;string constant function&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property function&quot;&gt;TARGET_PATH&lt;/span&gt;&lt;span class=&quot;string constant function&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--appimage-extract&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;/dev/null)
    &lt;span class=&quot;property&quot;&gt;EXTRACTED_APPDIR&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;TEMP_EXTRACT&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/squashfs-root&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;patch_appdir&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;EXTRACTED_APPDIR&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;repack_appdir&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;EXTRACTED_APPDIR&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;TARGET_PATH&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;Error: Target path not found: &lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;TARGET_PATH&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt; &amp;gt;&amp;amp;2
    &lt;span class=&quot;constant function&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;1&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt;
  &lt;span class=&quot;property&quot;&gt;APPDIRS&lt;/span&gt;=()
  &lt;span class=&quot;keyword&quot;&gt;while&lt;/span&gt; &lt;span class=&quot;constant property&quot;&gt;IFS&lt;/span&gt;&lt;span class=&quot;constant&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;constant function&quot;&gt;read&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-r&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-d&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;apos;&amp;apos;&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;dir&lt;/span&gt;; &lt;span class=&quot;keyword&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;property&quot;&gt;APPDIRS&lt;/span&gt;+=(&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;dir&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;)
  &lt;span class=&quot;keyword&quot;&gt;done&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;embedded&quot;&gt;&amp;lt;(&lt;/span&gt;&lt;span class=&quot;embedded constant function&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;embedded string constant property&quot;&gt;SRC_TAURI_DIR&lt;/span&gt;&lt;span class=&quot;embedded string constant&quot;&gt;/target&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;embedded string constant property&quot;&gt;REPO_ROOT&lt;/span&gt;&lt;span class=&quot;embedded string constant&quot;&gt;/target&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-type&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-name&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded string constant&quot;&gt;&amp;quot;*.AppDir&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded constant&quot;&gt;-print0&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;embedded number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;embedded operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;/dev/null || &lt;/span&gt;&lt;span class=&quot;embedded constant function&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;

  &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; [ &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;${#&lt;/span&gt;&lt;span class=&quot;string embedded property&quot;&gt;APPDIRS&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;[@]}&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt; -eq 0 ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;No *.AppDir found to patch. (Did you run tauri build?)&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;0&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;

  &lt;span class=&quot;keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;appdir&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;string embedded property&quot;&gt;APPDIRS&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;[@]}&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;; &lt;span class=&quot;keyword&quot;&gt;do&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;patch_appdir&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;property&quot;&gt;bundle_dir&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;string embedded constant function&quot;&gt;dirname&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string embedded constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;&amp;quot;
    &lt;span class=&quot;property&quot;&gt;appdir_name&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;string embedded constant function&quot;&gt;basename&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt; &lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string embedded constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string embedded constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;embedded&quot;&gt;)&lt;/span&gt;&amp;quot;
    &lt;span class=&quot;property&quot;&gt;expected_appimage&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;string embedded property&quot;&gt;bundle_dir&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;string embedded property&quot;&gt;appdir_name&lt;/span&gt;&lt;span class=&quot;string embedded&quot;&gt;%.AppDir}&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;.AppImage&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;repack_appdir&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;appdir&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string constant operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string constant property&quot;&gt;expected_appimage&lt;/span&gt;&lt;span class=&quot;string constant&quot;&gt;&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;done&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;Wayland AppImage patching complete.&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;And Change a Little Thing in the Existing Workflow&lt;/h2&gt;&lt;h2&gt;Replace All &lt;code&gt;tauri build&lt;/code&gt; Commands With &lt;code&gt;tauri build &amp;amp;&amp;amp; source src-tauri/scripts/patch-appimage-wayland.sh&lt;/code&gt;&lt;/h2&gt;&lt;p&gt;if you are using vite then replace the &lt;code&gt;tauri build&lt;/code&gt; command with &lt;code&gt;tauri build &amp;amp;&amp;amp; source src-tauri/scripts/patch-appimage-wayland.sh&lt;/code&gt; in the scripts section of &lt;code&gt;package.json&lt;/code&gt;.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;json&quot;&gt;{
 &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;drawx&amp;quot;&lt;/span&gt;,
 &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;version&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;0.8.5&amp;quot;&lt;/span&gt;,
 &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;type&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;module&amp;quot;&lt;/span&gt;,
 &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;imports&amp;quot;&lt;/span&gt;: {
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;#components/*&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;./src/components/*.tsx&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;#lib/*&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;./src/lib/*.ts&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;#hooks/*&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;./src/hooks/*.ts&amp;quot;&lt;/span&gt;
 },
 &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;scripts&amp;quot;&lt;/span&gt;: {
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;dev&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;vite&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;build&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;tsc &amp;amp;&amp;amp; vite build&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;typecheck&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;tsc --noEmit&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;preview&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;vite preview&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;tauri&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;tauri&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;tauri:build&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;tauri build &amp;amp;&amp;amp; source src-tauri/scripts/patch-appimage-wayland.sh&amp;quot;&lt;/span&gt;
 },
 &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;dependencies&amp;quot;&lt;/span&gt;: {
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@astryxdesign/cli&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^0.5.4&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@astryxdesign/core&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^0.5.4&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@astryxdesign/theme-matcha&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^0.5.4&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@astryxdesign/theme-neutral&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^0.5.4&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@astryxdesign/theme-stone&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^0.5.4&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@astryxdesign/theme-y2k&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^0.5.4&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@excalidraw/excalidraw&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^0.18.1&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@fontsource-variable/inter&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^5.3.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@fontsource-variable/jetbrains-mono&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^5.3.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@hugeicons/core-free-icons&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^4.3.5&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@hugeicons/react&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^1.1.10&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@iconify/react&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^6.0.2&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@phosphor-icons/react&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.1.10&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@stylexjs/stylex&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^0.19.1&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@tauri-apps/api&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.12.1&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@tauri-apps/plugin-clipboard-manager&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.4.1&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@tauri-apps/plugin-dialog&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.8.1&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@tauri-apps/plugin-fs&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.6.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@tauri-apps/plugin-log&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.10.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@tauri-apps/plugin-opener&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.7.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@tauri-apps/plugin-process&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.4.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@tauri-apps/plugin-updater&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.13.2&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;class-variance-authority&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^0.7.1&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;clsx&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.1.1&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;lucide-react&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^1.53.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;radix-ui&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^1.7.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;react&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^19.3.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;react-dom&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^19.3.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;react-router-dom&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^7.18.4&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;tailwind-merge&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^3.7.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;tw-animate-css&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^1.4.0&amp;quot;&lt;/span&gt;
 },
 &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;devDependencies&amp;quot;&lt;/span&gt;: {
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@biomejs/biome&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.5.15&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@oxlint/plugins&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;1.81.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@tailwindcss/vite&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^4.3.3&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@tauri-apps/cli&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^2.12.1&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@types/node&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^26.6.4&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@types/react&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^19.3.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@types/react-dom&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^19.3.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@vitejs/plugin-react&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^6.1.2&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;astryx&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^0.0.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;oxfmt&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^0.72.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;oxlint&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^1.87.0&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;typescript&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;~7.0.2&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;vite&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^8.3.4&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;zustand&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^5.0.15&amp;quot;&lt;/span&gt;
 },
 &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;devEngines&amp;quot;&lt;/span&gt;: {
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;packageManager&amp;quot;&lt;/span&gt;: {
   &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;name&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;pnpm&amp;quot;&lt;/span&gt;,
   &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;version&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;^12.10.1&amp;quot;&lt;/span&gt;,
   &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;onFail&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;warn&amp;quot;&lt;/span&gt;
  }
 },
 &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;packageManager&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;pnpm@12.10.1+sha512.ba40a37eb1a370d60fea8c4cf1d364c13bcccef518e98ad2bcee954f539d38da37458e58261a3fa55e06523450ea0ffff9f497b135be41f2c15c1642bacace6c&amp;quot;&lt;/span&gt;,
 &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;trustedDependencies&amp;quot;&lt;/span&gt;: [
  &lt;span class=&quot;string&quot;&gt;&amp;quot;@astryxdesign/cli&amp;quot;&lt;/span&gt;,
  &lt;span class=&quot;string&quot;&gt;&amp;quot;@astryxdesign/core&amp;quot;&lt;/span&gt;
 ],
 &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;allowScripts&amp;quot;&lt;/span&gt;: {
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@astryxdesign/cli&amp;quot;&lt;/span&gt;: &lt;span class=&quot;constant_builtin&quot;&gt;true&lt;/span&gt;,
  &lt;span class=&quot;string_special_key string&quot;&gt;&amp;quot;@astryxdesign/core&amp;quot;&lt;/span&gt;: &lt;span class=&quot;constant_builtin&quot;&gt;true&lt;/span&gt;
 }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I referred to this &lt;a href=&quot;https://girishjoshi.io/post/tauri-2.0-appimage-egl-issue-on-wayland/&quot; target=&quot;_blank&quot;&gt;blog post&lt;/a&gt; For the initial solution to the issue.&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/1791646262/</link>
        <pubDate>Sat, 10 Oct 2026 15:31:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/1791646262/</guid>
      </item>
    
      <item>
        <title>Toolbx Containers, A Guide to Development in isolation</title>
        <description>&lt;p&gt;I recently ran into a problem while trying to work with Homebrew on my Atomic Fedora system. I was developing a custom formula and running &lt;code&gt;brew audit&lt;/code&gt; To debug it, but it failed because GCC &amp; ruby was not available on the host, and i was doing &lt;code&gt;brew bundle install&lt;/code&gt; To make this work but had no luck.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/ks1MD54Q/Build-Your-Own-Developer-Toolbox-png.png&quot;&gt;&lt;/p&gt;&lt;p&gt;The issue wasn’t with Homebrew itself, it was that my host environment was missing the specific dependencies needed for that workflow. I could have installed more packages globally on the host, but that would have made the system more cluttered and harder to manage.&lt;/p&gt;&lt;p&gt;Similarly recently I was trying to develop an app in flutter for internal use but have faced issues running that … and things got solved when I am using a sand boxed environment. Also for agents, toolbox can be a bliss. They can run any command and there is a very low chance of breaking stuff.&lt;/p&gt;&lt;h2&gt;Why Toolbox?&lt;/h2&gt;&lt;p&gt;Toolbox containers are useful because they integrate well with your host system without forcing you to abandon isolation. They share your home directory and can access host resources such as the SSH agent, while still giving you a clean, disposable Linux environment for development.&lt;/p&gt;&lt;p&gt;That makes them especially useful when you need a project-specific toolchain but don’t want to pollute your main system. They also make it easy to define a development workflow as code instead of manually installing packages every time.&lt;/p&gt;&lt;p&gt;I realized that if I could create my own customized Toolbox image, I could keep the tools and dependencies I use regularly in one reusable environment.&lt;/p&gt;&lt;h2&gt;Defining Your Own Development Environment&lt;/h2&gt;&lt;p&gt;If you work with package maintenance, formula development, or distro-specific tooling, learning to write a Dockerfile or Containerfile is incredibly valuable. It lets you build a consistent environment that is reproducible and version able.&lt;/p&gt;&lt;p&gt;Here is an example of an AlmaLinux based Toolbox image for Homebrew development:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;dockerfile&quot;&gt;&lt;span class=&quot;keyword&quot;&gt;FROM&lt;/span&gt; quay.io/toolbx-images/almalinux-toolbox&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;latest

&lt;span class=&quot;keyword&quot;&gt;LABEL&lt;/span&gt; com.github.containers.toolbox=&lt;span class=&quot;string&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt; \
    name=&lt;span class=&quot;string&quot;&gt;&amp;quot;alma-brew&amp;quot;&lt;/span&gt; \
    version=&lt;span class=&quot;string&quot;&gt;&amp;quot;latest&amp;quot;&lt;/span&gt; \
    usage=&lt;span class=&quot;string&quot;&gt;&amp;quot;This image is meant to be used with the toolbox or distrobox command&amp;quot;&lt;/span&gt; \
    summary=&lt;span class=&quot;string&quot;&gt;&amp;quot;AlmaLinux Toolbox with GCC and Homebrew for developing brew recipes&amp;quot;&lt;/span&gt; \
    maintainer=&lt;span class=&quot;string&quot;&gt;&amp;quot;Pratyay Mustafi &amp;lt;pratyaymustafi@outlook.com&amp;gt;&amp;quot;&lt;/span&gt;

&lt;span class=&quot;comment&quot;&gt;# Copy setup scripts and package lists&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;COPY&lt;/span&gt; scripts/ /scripts/
&lt;span class=&quot;keyword&quot;&gt;COPY&lt;/span&gt; packages/ /packages/

&lt;span class=&quot;comment&quot;&gt;# Run the setup scripts, then remove the build-time files&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;RUN&lt;/span&gt; chmod +x /scripts/*.sh &amp;amp;&amp;amp; /scripts/*.sh
&lt;span class=&quot;keyword&quot;&gt;RUN&lt;/span&gt; rm -rf /scripts /packages
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This approach makes it easy to build a container that includes exactly what you need, without modifying the host system.&lt;/p&gt;&lt;p&gt;I also wanted an Arch-based environment with Chaotic-AUR and &lt;code&gt;paru&lt;/code&gt;, so I created a second image for that workflow:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;dockerfile&quot;&gt;&lt;span class=&quot;keyword&quot;&gt;FROM&lt;/span&gt; quay.io/toolbx/arch-toolbox&lt;span class=&quot;operator&quot;&gt;:&lt;/span&gt;latest

&lt;span class=&quot;keyword&quot;&gt;LABEL&lt;/span&gt; com.github.containers.toolbox=&lt;span class=&quot;string&quot;&gt;&amp;quot;true&amp;quot;&lt;/span&gt; \
    name=&lt;span class=&quot;string&quot;&gt;&amp;quot;arch-chaotic-toolbox&amp;quot;&lt;/span&gt; \
    version=&lt;span class=&quot;string&quot;&gt;&amp;quot;latest&amp;quot;&lt;/span&gt; \
    usage=&lt;span class=&quot;string&quot;&gt;&amp;quot;This image is meant to be used with the toolbox or distrobox command&amp;quot;&lt;/span&gt; \
    summary=&lt;span class=&quot;string&quot;&gt;&amp;quot;Arch Linux Toolbox with Chaotic-AUR and paru&amp;quot;&lt;/span&gt; \
    maintainer=&lt;span class=&quot;string&quot;&gt;&amp;quot;Pratyay Mustafi &amp;lt;pratyaymustafi@outlook.com&amp;gt;&amp;quot;&lt;/span&gt;

&lt;span class=&quot;comment&quot;&gt;# Copy setup scripts and package lists&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;COPY&lt;/span&gt; scripts/ /scripts/
&lt;span class=&quot;keyword&quot;&gt;COPY&lt;/span&gt; packages/ /packages/

&lt;span class=&quot;comment&quot;&gt;# Run the Chaotic-AUR setup script, then remove the build-time files&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;RUN&lt;/span&gt; chmod +x /scripts/*.sh &amp;amp;&amp;amp; /scripts/chaotic.sh
&lt;span class=&quot;keyword&quot;&gt;RUN&lt;/span&gt; rm -rf /scripts /packages
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;A Simple Layout of the file structure.&lt;/h2&gt;&lt;p&gt;A project like this can stay clean and easy to maintain if it follows a simple layout:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;.&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;├──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;.github&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;│&lt;/span&gt;   &lt;span class=&quot;constant&quot;&gt;└──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;workflows&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;│&lt;/span&gt;       &lt;span class=&quot;constant&quot;&gt;├──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;build.yml&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;│&lt;/span&gt;       &lt;span class=&quot;constant&quot;&gt;└──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;clean-runs.yml&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;├──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;.gitignore&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;├──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;ContainerFiles&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;│&lt;/span&gt;   &lt;span class=&quot;constant&quot;&gt;├──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;brew&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;│&lt;/span&gt;   &lt;span class=&quot;constant&quot;&gt;└──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;chaotic&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;├──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;LICENSE&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;├──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;README.md&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;├──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;packages&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;│&lt;/span&gt;   &lt;span class=&quot;constant&quot;&gt;├──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;brew.packages&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;│&lt;/span&gt;   &lt;span class=&quot;constant&quot;&gt;└──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;chaotic.packages&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;└──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;scripts&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;├──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;brew.sh&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;└──&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;chaotic.sh&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This structure keeps each concern separated:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;scripts/&lt;/code&gt; contains the setup logic&lt;/li&gt;&lt;li&gt;&lt;code&gt;packages/&lt;/code&gt; contains package lists&lt;/li&gt;&lt;li&gt;&lt;code&gt;ContainerFiles/&lt;/code&gt; stores the image definitions&lt;/li&gt;&lt;li&gt;&lt;code&gt;README.md&lt;/code&gt; Explains how to build and use the environment&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;That keeps the workflow organized and easier to extend later.&lt;/p&gt;&lt;h2&gt;Example Package List&lt;/h2&gt;&lt;p&gt;For the Arch-based image, the package list can be as simple as this:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;devel&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;git&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;paru&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is nice because package changes are declarative. If I need to add a tool, I can update the package list and rebuild the image whenever I need a new dependency or a different toolchain.&lt;/p&gt;&lt;h2&gt;Setting up &lt;a href=&quot;https://aur.chaotic.cx/&quot; target=&quot;_blank&quot;&gt;Chaotic AUR based toolbox&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;For Arch-based work, I also wanted a clean way to configure &lt;a href=&quot;https://aur.chaotic.cx/&quot; target=&quot;_blank&quot;&gt;Chaotic AUR&lt;/a&gt; And install the packages I use most often. The setup script below does just that:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;comment&quot;&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-euo&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;pipefail&lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;==&amp;gt; Configuring Chaotic AUR repository...&amp;quot;&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;pacman-key&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--init&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;pacman-key&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--recv-key&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;3056513887B78AEB&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--keyserver&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;keyserver.ubuntu.com&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;pacman-key&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--lsign-key&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;3056513887B78AEB&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;pacman&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-U&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--noconfirm&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;apos;https://geo-mirror.chaotic.cx/chaotic-aur/x86_64/chaotic-keyring.pkg.tar.zst&amp;apos;&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;pacman&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-U&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--noconfirm&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;apos;https://geo-mirror.chaotic.cx/chaotic-aur/x86_64/chaotic-mirrorlist.pkg.tar.zst&amp;apos;&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;sed&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-i&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;apos;s|^Server = https://cdn-mirror.chaotic.cx|# Server = https://cdn-mirror.chaotic.cx|&amp;apos;&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;/etc/pacman.d/chaotic-mirrorlist&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;printf&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;apos;\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist\n&amp;apos;&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; /etc/pacman.conf

&lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;==&amp;gt; Installing packages from chaotic.packages...&amp;quot;&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;grep&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-v&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;apos;^#&amp;apos;&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;/packages/chaotic.packages&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt; /tmp/chaotic.pkglist
&lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; [ ! -s /tmp/chaotic.pkglist ]; &lt;span class=&quot;keyword&quot;&gt;then&lt;/span&gt;
    &lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;chaotic.packages is missing or empty&amp;quot;&lt;/span&gt; &amp;gt;&amp;amp;2
    &lt;span class=&quot;constant function&quot;&gt;exit&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;fi&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;xargs&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;pacman&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-Syu&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--needed&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--noconfirm&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt; /tmp/chaotic.pkglist
&lt;span class=&quot;constant function&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-f&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;/tmp/chaotic.pkglist&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-rf&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;/var/cache/pacman/pkg/*&lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;==&amp;gt; Configuring toolbx permissions...&amp;quot;&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;string constant&quot;&gt;&amp;quot;%wheel ALL=(ALL) NOPASSWD: ALL&amp;quot;&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt; /etc/sudoers.d/toolbox
&lt;span class=&quot;constant function&quot;&gt;chmod&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;0440&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;/etc/sudoers.d/toolbox&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This keeps the setup steps reproducible and easy to manage. If the Arch repository or package list changes, the update is straightforward.&lt;/p&gt;&lt;h2&gt;Why This Workflow Works So Well&lt;/h2&gt;&lt;p&gt;This pattern has several practical advantages:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Reproducible builds : the environment is defined in code&lt;/li&gt;&lt;li&gt;Portability: the same image can be built elsewhere&lt;/li&gt;&lt;li&gt;Isolation: dependencies stay inside the container instead of the host&lt;/li&gt;&lt;li&gt;Speed: no repeated manual package setup&lt;/li&gt;&lt;li&gt;Simplicity: the environment is easier to debug and maintain.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;It is a great fit for package maintenance, Linux tooling, custom formula work, and any development workflow that depends on a specific tool chain.&lt;/p&gt;&lt;p&gt;Toolbox/Distrobox gives you a flexible middle ground: you get the isolation of a container without losing the convenience of working closely with your host environment.&lt;/p&gt;&lt;p&gt;For me, building a specialized toolbox image solved an immediate problem and gave me a more maintainable sand boxed way to work going forward. I can now create exactly the environment I need, whether that’s for Home brew development, Arch based tooling, or any other project-specific workflow.&lt;/p&gt;&lt;p&gt;If you work with Linux tooling, package building, or want reproducible dev setups, this is a workflow with toolbox container based development is worth adopting. &lt;a href=&quot;https://github.com/Pratyay360/chaotic-toolbx&quot; target=&quot;_blank&quot;&gt;Source code on GitHub.&lt;/a&gt;&lt;/p&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;toolbox container type&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;image link&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;brew-toolbox&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;https://quay.io/repository/pratyay360/brew-toolbox&quot; target=&quot;_blank&quot;&gt;quay.io/pratyay360/brew-toolbox:latest&lt;/a&gt;&lt;/td&gt;&lt;td&gt;docker.io/pratyay360/brew-toolbox:latest&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;https://github.com/Pratyay360/chaotic-toolbx&quot; target=&quot;_blank&quot;&gt;ghcr.io/pratyay360/brew-toolbox:latest&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;chaotic-toolbox&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;https://quay.io/repository/pratyay360/chaotic-toolbox&quot; target=&quot;_blank&quot;&gt;quay.io/pratyay360/chaotic-toolbox:latest&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://docker.io/pratyay360/chaotic-toolbox:latest&quot; target=&quot;_blank&quot;&gt;docker.io/pratyay360/chaotic-toolbox:latest&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;https://github.com/Pratyay360/chaotic-toolbx&quot; target=&quot;_blank&quot;&gt;ghcr.io/pratyay360/chaotic-toolbox:latest&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;android-toolbox&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://quay.io/pratyay360/android-toolbox&quot; target=&quot;_blank&quot;&gt;quay.io/pratyay360/android-toolbox:latest&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://docker.io/pratyay360/android-toolbox&quot; target=&quot;_blank&quot;&gt;docker.io/pratyay360/android-toolbox&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;http://ghcr.io/pratyay360/android-toolbox&quot; target=&quot;_blank&quot;&gt;ghcr.io/pratyay360/android-toolbox&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</description>
        <link>https://www.pratyay.online/blog/1791570929/</link>
        <pubDate>Fri, 09 Oct 2026 18:35:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/1791570929/</guid>
      </item>
    
      <item>
        <title>Releasing tools on different channels with goreleaser</title>
        <description>&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/Nd5Dx7js/download-png.png&quot;&gt;&lt;/p&gt;&lt;h2&gt;Creating a CLI tool is easy, compared to distributing it&lt;/h2&gt;&lt;p&gt;Goreleaser makes publishing almost a cake walk, but it comes with a steep learning curve. Still, distribution is just as important as the product itself. Shipping your tool as standalone binaries isn’t enough. reaching users through established channels matters It increses your tool’s reputation and gives a free visibility. Like for macOS, there’s Homebrew, now a days many Linux distributions are promoting it, brew is backed by a large community. Similarly, Winget and Scoop are important distribution channels. Being available through these channels brings significantly more visibility and ease of use.&lt;/p&gt;&lt;p&gt;By the way, GoReleaser is a publishing automation tool, and it’s not exclusive to Go, one can build and distribute apps written in many languages like Go, Zig, Rust, Typescript and more.&lt;/p&gt;&lt;p&gt;Let’s first learn about different types of package managers before publishing there.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;homebrew.&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Brew is generally maintained by the community and formulas are mostly written in Ruby &lt;code&gt;:)&lt;/code&gt;.&lt;/p&gt;&lt;h3&gt;So do you have to learn ruby to publish on homebrew?&lt;/h3&gt;&lt;p&gt;The answer is no, you don’t. goreleaser covers everything for you.&lt;/p&gt;&lt;p&gt;You can create an empty GitHub repo named &lt;code&gt;homebrew-tap&lt;/code&gt; or any other name with a &lt;code&gt;homebrew-&lt;/code&gt; prefix. &lt;em&gt;the prefix is recommended&lt;/em&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;gh&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;repo&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;user1/homebrew-tap&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--public&lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;brew&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;new-tap&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;user1/tap&lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;brew&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;gh&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;git&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;What is tap?&lt;/h4&gt;&lt;p&gt;A tap is a repository with some recipes that brew needs to follow to install a tool. recipe is, in the sense, a formula to install a tool the repo user1/homebrew-tap will be reffered as user1/tap while using.&lt;/p&gt;&lt;p&gt;On the other side you can make a repo like user1/homebrew-cli –&gt; user1/cli (tap).&lt;/p&gt;&lt;ol&gt;&lt;li&gt;scoop?&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Scoop is a command line installer for Windows. Think of it as the Windows equivalent of Homebrew, but with its own flavor. To distribute your tool via Scoop, you’ll need to create a “bucket.” A bucket is basically Scoop’s version of a tap, a repo with the name &lt;code&gt;scoop-bucket&lt;/code&gt; is suggested.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;gh&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;repo&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;create&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;user1/scoop-bucket&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--public&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;scoop&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;bucket&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;bucket-name&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;https://github.com/user1/bucket-name&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;## adding a bucket to scoop&lt;/span&gt;
scoop install bucket-name/your-tool &lt;span class=&quot;comment&quot;&gt;## installing your tool from the bucket&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Creating a Scoop bucket is straightforward:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Winget&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Now, Winget is Microsoft’s official package manager for Windows built into the operating system.&lt;/p&gt;&lt;p&gt;The process here is a bit different. Instead of creating a new repo you have to fork the &lt;a href=&quot;https://github.com/microsoft/winget-pkgs&quot; target=&quot;_blank&quot;&gt;main repo&lt;/a&gt;,&lt;/p&gt;&lt;p&gt;&lt;del&gt;and then create a new branch for your tool&lt;/del&gt; you don’t have to do this thing manually goreleaser handles that for you.&lt;/p&gt;&lt;h5&gt;Winget do’s and don’ts&lt;/h5&gt;&lt;p&gt;There are a few things to keep in mind:&lt;/p&gt;&lt;p&gt;one tool = one branch,&lt;/p&gt;&lt;p&gt;you can’t submit multiple tools in one branch as the pr is for tracking the changes of a single tool, goreleaser automates this process too.&lt;/p&gt;&lt;p&gt;Generally, Linux users are techy so they are more likely to install &lt;code&gt;.deb&lt;/code&gt; and &lt;code&gt;.rpm&lt;/code&gt; packages, as well as tools like &lt;code&gt;eget&lt;/code&gt;, And the thing with go as a language is that it includes all the necessary C libraries in the binaries so it can be runned by just putting in $PATH on any machine.&lt;/p&gt;&lt;h4&gt;the process generally is like you have to create/modify a file in other repo. But github-actions only gives your workflow access to that repo only&lt;/h4&gt;&lt;p&gt;create a PAT (personal access token) with scopes read, write, releasing, files, repos, actions, action-metadata etc, and add it to your repo secrets. then you can use that token in your workflow to access other repo.&lt;/p&gt;&lt;p&gt;Remember you can’t create any variable with &lt;code&gt;GITHUB_&lt;/code&gt; prefix in the secrets, so you have to use a different name for your secret like &lt;code&gt;PAT&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;to create a release, you have to create a numeric tag only as winget refuses to accept alphanumeric tags.&lt;/p&gt;&lt;p&gt;like,&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;c&quot;&gt;&lt;span class=&quot;number&quot;&gt;1.1&lt;/span&gt;&lt;span class=&quot;delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;
&lt;span class=&quot;number&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;number&quot;&gt;.2&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;tags can be created using&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;tag&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;1.1.1&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;push&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-u&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;origin&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;1.1.1&lt;/span&gt;

&lt;span class=&quot;comment&quot;&gt;## if you use jj then &lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;jj&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;# stage changes&lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;jj&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;desc&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;# describe changes&lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;jj&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;bookmark&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;advance&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;main&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;# advance bookmark main to the new staged state.&lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;jj&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;tag&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;set&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;1.1.1&lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;jj&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;push&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--all&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;#or &lt;/span&gt;

&lt;span class=&quot;constant function&quot;&gt;jj&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;git&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;push&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--tag&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;1.1.1&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you have followed my &lt;a href=&quot;https://pratyay.qzz.io/blog/1788377082/&quot; target=&quot;_blank&quot;&gt;previous post on doing ci with mise&lt;/a&gt;&lt;/p&gt;&lt;p&gt;then read that post first as I am going to use the same approach here. Also I am assuming you are already using mise on your machine. goreleaser is available on mise, so you can install it using &lt;code&gt;mise use goreleaser@latest&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;To getting started, you have to generate a goreleaser config file using &lt;code&gt;goreleaser init&lt;/code&gt; command. It will create a &lt;code&gt;.goreleaser.yml&lt;/code&gt; file in your repo. You can modify it according to your needs. For detailed info please refer to the &lt;a href=&quot;https://goreleaser.com/customization/&quot; target=&quot;_blank&quot;&gt;official documentation&lt;/a&gt;.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;build and release&lt;/span&gt;
&lt;span class=&quot;string property&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;tags&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;*&amp;apos;&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;workflow_dispatch&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;permissions&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;contents&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;write&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;pages&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;write&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;id-token&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;write&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;ci&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ghcr.io/jdx/mise:2026.8.16&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;checkout code&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;actions/checkout@main&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;fetch-depth&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;0&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Trust git directory in container&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;git config --global --add safe.directory &amp;apos;*&amp;apos;&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Install dependencies &amp;amp; building&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string punctuation_delimiter&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;
            mise deps
            mise fetch
            mise run release&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;GITHUB_TOKEN&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ secrets.PAT }}&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;MISE_EXPERIMENTAL&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;boolean&quot;&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;mise.toml&lt;/h3&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;tools&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;string&quot;&gt;go = &amp;quot;latest&amp;quot;
goreleaser = &amp;quot;latest&amp;quot;

[deps]
go = { auto = true }

[tasks]
fetch = { description = &amp;quot;Fetch Go module dependencies&amp;quot;, run = &amp;quot;go mod download&amp;quot; }
testcase = { description = &amp;quot;Run Go testcase&amp;quot;, run = &amp;quot;go run ./test/test.go&amp;quot; }
build = { description = &amp;quot;Build Go binary&amp;quot;, run = [&amp;quot;mise deps&amp;quot;, &amp;quot;mise run fetch&amp;quot;, &amp;quot;goreleaser build --snapshot --clean&amp;quot;] }
test = { description = &amp;quot;test binary&amp;quot;, run = [&amp;quot;mise deps&amp;quot;, &amp;quot;mise run testcase&amp;quot;, &amp;quot;mise run build&amp;quot;] }
testcases = { description = &amp;quot;Run Go test cases&amp;quot;, run = &amp;quot;go test ./...&amp;quot; }
release = { description = &amp;quot;Build and release using Goreleaser&amp;quot;, run = &amp;quot;goreleaser release --clean&amp;quot; }&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So I had composed the &lt;code&gt;.goreleaser.yml&lt;/code&gt; file for &lt;a href=&quot;https://github.com/Pratyay360/ensor&quot; target=&quot;_blank&quot;&gt;ensor&lt;/a&gt; it should look like this.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;comment spell&quot;&gt;# yaml-language-server: $schema=https://goreleaser.com/static/schema.json&lt;/span&gt;
&lt;span class=&quot;string property&quot;&gt;version&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;2&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;project_name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;before&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;hooks&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;go mod tidy&lt;/span&gt;
    &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;go generate ./...&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;builds&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;.&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;binary&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;CGO_ENABLED=0&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;goos&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;linux&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;windows&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;darwin&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;freebsd&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;openbsd&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;goarch&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;amd64&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;arm64&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;386&amp;quot;&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;ignore&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;goos&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;darwin&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;goarch&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;386&amp;quot;&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;flags&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;-trimpath&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;ldflags&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;-s -w -X github.com/Pratyay360/ensor/cmd.version={{.Version}}&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;archives&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;default&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;ids&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;formats&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;tar.gz&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;name_template&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string punctuation_delimiter&quot;&gt;&amp;gt;-&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;
      {{ .ProjectName }}_
      {{- title .Os }}_
      {{- if eq .Arch &amp;quot;amd64&amp;quot; }}x86_64
      {{- else if eq .Arch &amp;quot;386&amp;quot; }}i386
      {{- else }}{{ .Arch }}{{ end }}
      {{- if .Arm }}v{{ .Arm }}{{ end }}&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;format_overrides&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;goos&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;windows&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;formats&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;zip&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;checksum&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;name_template&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;checksums.txt&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;changelog&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;sort&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;asc&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;github&lt;/span&gt;

  &lt;span class=&quot;string property&quot;&gt;filters&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;exclude&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;^docs:&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;^test:&amp;quot;&lt;/span&gt;

  &lt;span class=&quot;string property&quot;&gt;groups&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Features&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;regexp&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;^feat&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;order&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;0&lt;/span&gt;

    &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Bug fixes&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;regexp&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;^fix&amp;quot;&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;order&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;

    &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Others&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;order&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;999&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;nfpms&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;packages&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;package_name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Censor secrets from your codebase&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;homepage&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;https://github.com/Pratyay360/ensor&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;maintainer&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Pratyay360 &amp;lt;pratyaymustafi@outlook.com&amp;gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;license&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Apache-2.0&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;formats&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;deb&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;rpm&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;apk&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;homebrew_casks&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;homepage&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;https://github.com/Pratyay360/ensor&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Censor secrets from your codebase&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;license&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Apache-2.0&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;binaries&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;generate_completions_from_executable&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;executable&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;args&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;completion&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;base_name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;shell_parameter_format&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;cobra&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;shells&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;bash&lt;/span&gt;
        &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;zsh&lt;/span&gt;
        &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;fish&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;directory&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Casks&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;commit_msg_template&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Brew cask update for {{ .ProjectName }} version {{ .Tag }}&amp;quot;&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;repository&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;owner&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Pratyay360&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;homebrew-tap&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;branch&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;main&lt;/span&gt;
&lt;span class=&quot;string property&quot;&gt;scoops&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;homepage&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;https://github.com/Pratyay360/ensor&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Censor secrets from your codebase&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;license&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Apache-2.0&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;commit_msg_template&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Scoop update for {{ .ProjectName }} version {{ .Tag }}&amp;quot;&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;repository&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;owner&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Pratyay360&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;scoop-bucket&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;branch&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;main&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;winget&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;winget&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;publisher&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Pratyay360&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;publisher_url&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;https://github.com/Pratyay360&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;publisher_support_url&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;https://github.com/Pratyay360/ensor/issues&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;package_identifier&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;pratyay360.ensor&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;short_description&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Censor secrets from your codebase&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;A unified CLI for censoring secrets from your codebase&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;license&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Apache-2.0&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;homepage&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;https://github.com/Pratyay360/ensor&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;commit_msg_template&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;{{ .PackageIdentifier }}: {{ .Tag }}&amp;quot;&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;repository&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;owner&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Pratyay360&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;winget-pkgs&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;branch&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;   &lt;span class=&quot;comment spell&quot;&gt;# branch name should be your tool name. for easy navigation later on.&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;release&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;github&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;owner&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Pratyay360&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ensor&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;snapshot&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;version_template&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;{{ incpatch .Version }}-next&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;for other tech stack you can use make or &lt;a href=&quot;https://just.systems/&quot; target=&quot;_blank&quot;&gt;just&lt;/a&gt; or &lt;a href=&quot;https://mise.jdx.dev/&quot; target=&quot;_blank&quot;&gt;mise&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/zvw5SdG/distributing-tools-with-goreleaser-png.png&quot;&gt;&lt;/p&gt;&lt;p&gt;I am yet to explore aur as they have stopped registration and haven’t seen any literature on conda forge so have to try this later on (maybe content for a new post),  Also creating a custom coppr repo or ppa to distribute tool is tbd.&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/1791199414/</link>
        <pubDate>Mon, 05 Oct 2026 11:23:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/1791199414/</guid>
      </item>
    
      <item>
        <title>Building Your own operating system is not that hard</title>
        <description>&lt;p&gt;Containerizing web applications is standard practice these days, but deploying&lt;br&gt;your entire operating system as a container image fundamentally changes how we&lt;br&gt;interact with and manage the system. If you have been exploring the&lt;br&gt;cloud-native ecosystem, you have likely heard of the &lt;code&gt;bootc&lt;/code&gt; and &lt;code&gt;ostree&lt;/code&gt; projects. But what exactly do they do, and why should you care?&lt;/p&gt;&lt;h2&gt;First, let’s talk about what bootc is ?&lt;/h2&gt;&lt;p&gt;Bootc (bootable containers) fundamentally changes how we operate our OS. Instead of just spinning up containers on top of a traditional host, you practically boot into and live inside one.&lt;/p&gt;&lt;p&gt;Operating systems built this way are inherently &lt;strong&gt;immutable&lt;/strong&gt;, meaning you cannot write directly to the root directory (&lt;code&gt;/&lt;/code&gt;). While this might sound restrictive at first glance, it provides massive advantages for system security, predictability, and stability.&lt;/p&gt;&lt;h3&gt;Why an immutable, container centric OS?&lt;/h3&gt;&lt;p&gt;A bootc based OS gives you very little headroom to break your system. It is not a drill you tried some tinkering with and suddenly the system refuses to boot. If you were still able to break it, no worries, because your system treats itself as a version-controlled system:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Atomic upgrades:&lt;/strong&gt; Updates download in the background and unpack in parallel to the running system without interrupting your work. It is either successful or failed, with no in-between state.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Instant rollbacks:&lt;/strong&gt; If a bad update or regression ever slips through, you can instantly roll back to the previous working deployment with a simple reboot.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;There are also excellent templates and tooling built around &lt;code&gt;bootc&lt;/code&gt;, such as &lt;a href=&quot;https://blue-build.org/&quot; target=&quot;_blank&quot;&gt;BlueBuild&lt;/a&gt;, which has a fantastic community. Because your OS is essentially a container image, you can customize it, build, and distribute it via a container registry.&lt;/p&gt;&lt;h3&gt;Creating and Sharing Custom ISOs&lt;/h3&gt;&lt;p&gt;Building your own container image is straightforward, but what if you want to use it on your machine? You can’t directly install a container image on a new system.&lt;/p&gt;&lt;p&gt;Should you be re-basing to your image after installing &lt;a href=&quot;https://fedoraproject.org/coreos/&quot; target=&quot;_blank&quot;&gt;CoreOS&lt;/a&gt;? No. Then why write recipes to mend your own OS?&lt;/p&gt;&lt;p&gt;BlueBuild gives you an option to generate your own ISO files with &lt;code&gt;blue-build generate-iso&lt;/code&gt;, but creating that on your machine is a lot of work. So we are going to delegate that to GitHub Actions, but there remains a catch: GitHub allows release assets up to 2 GB per file, which is often too small for full OS ISOs.&lt;/p&gt;&lt;p&gt;Alternative storage options include object storage like S3, but there is an egress ingress cost associated, and paying money for a small hobby is a big no-no. Services like &lt;a href=&quot;https://gofile.io/&quot; target=&quot;_blank&quot;&gt;Gofile.io&lt;/a&gt; can be great options for storing and sharing ISO files.&lt;/p&gt;&lt;h3&gt;Be gentle with GitHub-hosted runners: the whole process can be computationally expensive&lt;/h3&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://img.youtube.com/vi/60A9WaeDMYU/hqdefault.jpg&quot;&gt;
&lt;figcaption&gt;Please Be Gentle XD&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Here is an example of my resource consumption:&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://i.ibb.co/LD573nDr/Screenshot-2026-09-25-at-00-53-54-Workflow-runs-Pratyay360-blueee-os-png.png&quot;&gt;
&lt;figcaption&gt;GitHub Actions Workflow Run&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;h3&gt;You can check out the repository building these ISOs here: &lt;a href=&quot;https://github.com/Pratyay360/blueee-os&quot; target=&quot;_blank&quot;&gt;Pratyay360/blueee-os&lt;/a&gt;.&lt;/h3&gt;&lt;h2&gt;Recommended Base Images for Customization&lt;/h2&gt;&lt;p&gt;If you are looking to start building your own custom &lt;code&gt;bootc&lt;/code&gt; images, here are popular upstream base image registries:&lt;/p&gt;&lt;table&gt;&lt;tr&gt;&lt;th align=&apos;left&apos;&gt;Distribution&lt;/th&gt;&lt;th align=&apos;left&apos;&gt;Base Image Registry&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&apos;left&apos;&gt;&lt;strong&gt;Fedora&lt;/strong&gt;&lt;/td&gt;&lt;td align=&apos;left&apos;&gt;&lt;a href=&quot;https://quay.io/organization/fedora-ostree-desktops&quot; target=&quot;_blank&quot;&gt;fedora-ostree-desktops&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&apos;left&apos;&gt;&lt;strong&gt;AlmaLinux&lt;/strong&gt;&lt;/td&gt;&lt;td align=&apos;left&apos;&gt;&lt;a href=&quot;https://quay.io/organization/almalinuxorg&quot; target=&quot;_blank&quot;&gt;almalinuxorg&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td align=&apos;left&apos;&gt;&lt;strong&gt;CentOS Stream&lt;/strong&gt;&lt;/td&gt;&lt;td align=&apos;left&apos;&gt;&lt;a href=&quot;https://quay.io/organization/centos-bootc&quot; target=&quot;_blank&quot;&gt;centos-bootc&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</description>
        <link>https://www.pratyay.online/blog/1790272985/</link>
        <pubDate>Thu, 24 Sep 2026 18:03:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/1790272985/</guid>
      </item>
    
      <item>
        <title>I have automated most of my social media accounts for free.</title>
        <description>&lt;h2&gt;Recently, I have started writing blogs as a hobby to discipline myself about building a habit which is consistent&lt;/h2&gt;&lt;p&gt;However, writing is only half the battle. As the saying goes, “If people don’t know your product exists, they can’t judge its value.”&lt;/p&gt;&lt;p&gt;To seriously grow, and sharing whatever I do with a wider audience is essential.&lt;/p&gt;&lt;h3&gt;But Who Is My Target Audience?&lt;/h3&gt;&lt;p&gt;People who are curious about technology and are accustomed to read articles.&lt;br&gt;These specific requirements make my target audience quite niche,&lt;br&gt;Which limits my choices of social media platforms even more limited.&lt;br&gt;To keep people informed about my work, I can use microblogging platforms like (X twitter/threads/blue sky/ mastodon) and LinkedIn.&lt;/p&gt;&lt;p&gt;But writing 10 different post on 10 different platforms is a lot of work, and I am not into that.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Also, as programmers, we tend to be “lazy” as we hate repetitive tasks,&lt;br&gt;also on the other side we love doing overengineering to solve simple problems.&lt;/p&gt;&lt;/blockquote&gt;&lt;h3&gt;&lt;em&gt;Here is what I have so far:&lt;/em&gt;&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;A blog website built with a Static Site Generator (SSG).&lt;/li&gt;&lt;li&gt;An automatically generated RSS feed (handled automatically by the SSG).&lt;/li&gt;&lt;li&gt;A &lt;a href=&quot;https://en.wikipedia.org/wiki/Cron&quot; target=&quot;_blank&quot;&gt;Cronjob&lt;/a&gt;  to check for new posts.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;First I have had planned to use some action runners on schedule like github actions, to check and trigger based on rss feed, but after I started, going through the different developer sections, I felt that’s not worth my time as someone has already done so.&lt;br&gt;So, Why reinvent the wheel when there are already some good solutions available.&lt;/p&gt;&lt;h3&gt;&lt;em&gt;Exploring existing automation solutions&lt;/em&gt;:&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;&lt;del&gt;iftttt.com (This  is  free on paper only , and unusable )&lt;/del&gt;&lt;/li&gt;&lt;li&gt;zapier.com (Very limited free plan, but at least allows performing basic automation for free)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;windmill.com (cloud: Very limited free plan, Can be self hosted) has a steep learning curve.&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;make.com (free plan isn’t that limited and this is the simplest solution in terms of ui).&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;zohoflow (free tier has good limits too but should be used along with &lt;a href=&quot;https://www.inoreader.com/&quot; target=&quot;_blank&quot;&gt;https://www.inoreader.com/&lt;/a&gt;)&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;activepieces (good but don’t use ai copilot here)&lt;/strong&gt;*&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;I will be using &lt;a href=&quot;http://make.com&quot; target=&quot;_blank&quot;&gt;make.com&lt;/a&gt; but how to use make.com to automate my social media posting?&lt;/strong&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;X (twitter) api  used to be free, but that’s now paid so using official API dropped. ❌&lt;/li&gt;&lt;li&gt;For threads. though it’s free but automation platforms are yet to integrate it.&lt;/li&gt;&lt;li&gt;mastodon is free to use in most of the platforms.&lt;/li&gt;&lt;li&gt;same for Bluesky  but it isn’t free on zapier .&lt;/li&gt;&lt;li&gt;Buffer is free on most of the automation platforms.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;I have only found &lt;a href=&quot;https://eu1.make.com/public/shared-scenario/GT23pzkTgzg/integration-rss-linked-in-bluesky&quot; target=&quot;_blank&quot;&gt;make.com&lt;/a&gt; to be the most suitable automation platform for free tier users and power users, as  It barely restricts any core feature.&lt;/p&gt;&lt;p&gt;The only drawback is the limited monthly allowance of 1,000 credits. Similar to a Deterministic Finite Automaton, each step consumes one credit, regardless of whether the operation succeeds or fails.&lt;/p&gt;&lt;h4&gt;But why am I telling you all of this and how is this free. Also will you be posting on such unsupported social media platforms manually ?&lt;/h4&gt;&lt;p&gt;&lt;strong&gt;Answer is no. You don’t as we are going to use &lt;a href=&quot;https://buffer.com/join/2705ce7aba72db2c064eae8f641e3bc969d060d68927db95716ea19233461d51&quot; target=&quot;_blank&quot;&gt;buffer&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://buffer.com/join/2705ce7aba72db2c064eae8f641e3bc969d060d68927db95716ea19233461d51&quot; target=&quot;_blank&quot;&gt;Buffer&lt;/a&gt; is a social media aggregator and management platform which can manage up to 3 accounts for free&lt;/p&gt;&lt;p&gt;The X (Twitter) API is no longer free, so I use &lt;a href=&quot;https://buffer.com/join/2705ce7aba72db2c064eae8f641e3bc969d060d68927db95716ea19233461d51&quot; target=&quot;_blank&quot;&gt;Buffer&lt;/a&gt; for that part of the workflow.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://eu1.make.com/public/shared-scenario/GT23pzkTgzg/integration-rss-linked-in-bluesky&quot; target=&quot;_blank&quot;&gt;Make.com&lt;/a&gt; lets you connect up to 3 actions in a chain on the free plan. At the time of writing, using my referral link may include a promotional credit offer; check Make’s current terms and pricing before relying on it.&lt;/p&gt;&lt;p&gt;Buffer is generous enough to allow you to connect 3 social media accounts and manage them for free.&lt;br&gt;But you can at most post 10 posts per day on free plan which is more than enough for me.&lt;/p&gt;&lt;p&gt;So you can hook 3 accounts to buffer and two on &lt;a href=&quot;https://eu1.make.com/public/shared-scenario/GT23pzkTgzg/integration-rss-linked-in-bluesky&quot; target=&quot;_blank&quot;&gt;make.com.&lt;/a&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;The workflow consumes 4 credits per new post. If you post too frequently, you will be limited to approximately 8 per day (4 credits × 30 days × 8 runs = 960 credits).&lt;/p&gt;&lt;p&gt;To avoid exhausting the free limits, it is recommended to poll executions at 3 hour intervals. Additionally, since the workflow spends most of its time polling, it only consumes one task per run.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://github.com/user-attachments/assets/a1f0305f-489e-4db4-bd8f-0c2a4e17048e&quot;&gt;
&lt;figcaption&gt;Untitled1&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://github.com/user-attachments/assets/76488289-af8a-42d3-b16a-5559d02037df&quot;&gt;
&lt;figcaption&gt;Untitled&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://github.com/user-attachments/assets/c6150ea7-bdf5-4333-8600-1d710dc30ea8&quot;&gt;
&lt;figcaption&gt;Untitled2&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://github.com/user-attachments/assets/2e2778ed-f48f-48d9-ae06-17f80d41b723&quot;&gt;
&lt;figcaption&gt;Untitled3&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://eu1.make.com/public/shared-scenario/GT23pzkTgzg/integration-rss-linked-in-bluesky&quot; target=&quot;_blank&quot;&gt;Visit make with my referral link. (for 1st month free pro)&lt;/a&gt;&lt;/p&gt;&lt;p&gt;All this automation for absolutely free and with no credit card.&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/1789816067/</link>
        <pubDate>Sat, 19 Sep 2026 11:07:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/1789816067/</guid>
      </item>
    
      <item>
        <title>Navigating around bootc and immutable/atomic distros</title>
        <description>&lt;h2&gt;So, as you all know I have been a Linux user for the past 5-6 years.&lt;/h2&gt;&lt;p&gt;And have installed os 100s of times on my system because of kernel panics or some bad driver bricking my machine, this made me an avid &lt;a href=&quot;https://www.linux-magazine.com/Online/Blogs/Off-the-Beat-Bruce-Byfield-s-Blog/Distro-hopping&quot; target=&quot;_blank&quot;&gt;distro hopper.&lt;/a&gt;&lt;/p&gt;&lt;p&gt;As I have already written about the approx timeline of my distro hopping, I’m not going to repeat it here.&lt;/p&gt;&lt;p&gt;I personally loved KDE Plasma, and its look and feel overall. The simplicity and customization options are something I loved the most&lt;/p&gt;&lt;p&gt;And Fedora has the best experience with KDE Plasma.&lt;/p&gt;&lt;p&gt;And for the past 1 - 1.5 years, topics related to DevOps, like KVM, docker-compose, and reproducible builds, sparked curiosity in me. I got a bit deep digging into containerization, and how containerization works with namespaces and cgroups is very interesting. Though Docker has become synonymous with containers itself. But all the container runtimes follow OCI specs (Open Container Initiative) .&lt;/p&gt;&lt;h3&gt;Podman&lt;/h3&gt;&lt;p&gt;Podman is a daemonless container runtime. This means Podman just runs the service and vanishes from the entire process tree; unlike containerd or Docker, we don’t need to run a containerd or dockerd daemon. With Docker, running killall docker /containerd  just stops all your running containers by default.&lt;/p&gt;&lt;p&gt;Podman is specifically impressive because of its rootless nature. One can run any number of containers as an unprivileged user and perform privileged operations within the container, similar to a fake-root environment.  Btw, this is the exact same approach used in tools like &lt;a href=&quot;https://github.com/rootless-containers/rootlesskit&quot; target=&quot;_blank&quot;&gt;rootlesskit&lt;/a&gt;, very similar to ports in FreeBSD, or MacPorts on Apple.&lt;/p&gt;&lt;p&gt;Podman doesn’t run persistently on your system, making it incredibly memory efficient.&lt;br&gt;The toolchain is practically identical to Docker; you can use podman build, podman run, podman push, etc.&lt;br&gt;Furthermore, Podman’s build tool, Buildah, is noticeably faster, making it preferable for building images quickly and efficient specially in CI/CD environments.&lt;/p&gt;&lt;p&gt;I probably don’t need to give a re-introduction to containers; you already know that if you’re here.&lt;br&gt;Tools like Toolbox or Distrobox just utilize this exact approach of unprivileged containers sharing the host’s user space, specifically mounting&lt;br&gt;$HOME (like /home/user/).&lt;/p&gt;&lt;p&gt;TBH, I personally love the philosophy behind OSTree-based operating systems: the idea of atomic updates, either successful or failed, is the exact same reason making os tree virtually unbreakable.&lt;/p&gt;&lt;p&gt;The concept of layering here is brilliant. The base image is immutable, and any system changes are stored in a separate layer. This makes it incredibly easy to roll back to a previous state if something gets messed up. It gives you an unbeatable safety net, and the logic is identical to how standard OCI container images are layered.&lt;/p&gt;&lt;p&gt;But layering packages onto the host OS isn’t always the ideal thing to do. The best approach is to use a Toolbox container for installing and running your day-to-day apps.&lt;/p&gt;&lt;p&gt;You can create a random Toolbox container and install any app you want. No matter how many containers you spin up, if their base image is the same, they will share that underlying image and won’t cost you extra gigabytes in storage. Sharing that base layer saves disk space and makes managing multiple environments effortless.&lt;/p&gt;&lt;p&gt;But aren’t containers bloated? Don’t they cost you a lot of storage space (the container tax)? The answer is both yes and no. Yes, it does cache a lot of data, but the benefits are well worth the trade-off. You get a super solid base OS while keeping the flexibility of other distros. I’ve installed paru (the Arch User Repository helper) inside a Toolbox container, installed .deb and .rpm packages, and things just work.&lt;br&gt;Distrobox or Toolbox?&lt;/p&gt;&lt;p&gt;I want something easy. I don’t want to type toolbox enter every time I need to run a basic app.&lt;/p&gt;&lt;p&gt;As I’ve mentioned, Toolbox containers generally respect the host machine a bit more (plus PAM is shared with the host), but Distrobox is undeniably convenient because of the export feature like &lt;code&gt;distrobox-export --app /usr/bin/ghostty&lt;/code&gt; and &lt;code&gt;distrobox-export --bin /usr/bin/ghostty&lt;/code&gt;&lt;/p&gt;&lt;p&gt;But what if I share something that makes Toolbox just as convenient or better ?&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;curl&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-fsSL&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;https://github.com/Pratyay360/toolbox-export/raw/refs/heads/main/install.sh&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;constant function&quot;&gt;bash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Benefits of ostree ?&lt;/h3&gt;&lt;p&gt;libostree or Ostree is like a version control system similar to git but for the entire os. It is a crucial component of your atomic distro. Either you update your machine reboot, update completes successfully or unsuccessfully.&lt;/p&gt;&lt;p&gt;Even after success, ostree based os can still rollback to the previous state if anything is not working. resetting your os back to previous commit just works. It’s too hard to mess with such a&lt;/p&gt;&lt;p&gt;resilient system. Specially if you are using, your own recipie to build os Though it’s hard to make a faulty container image. You  can identify any flaws during the image build process.&lt;/p&gt;&lt;h3&gt;So, is everything perfect with Toolbox containers?&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;Networking related apps like wireshark, airmon-ng etc etc. and drivers don’t play nice; I am yet to use  installed in containerd , though script evaluation is fast. Also, I’ve noticed apps installed via Distrobox often fail to honour the system theme, on the other side Toolbox respects the system theme + apps share the same secret store, in my case it’s kde wallet, and the apps I have installed in Toolbox never made me feel like they are alien to my system.&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;What if I don’t want the prepacked apps that comes with Fedora can i modify without pinning?&lt;/h3&gt;&lt;h4&gt;What if I want to remove Konsole and use Ghostty as my default without layering &amp; pinning it onto my host os? I’ve actually run Ghostty installed inside an Arch Linux Toolbx as my default terminal, and it felt 100% native.&lt;/h4&gt;&lt;p&gt;If you want absolute control on what software should be available on os and what not, I highly suggest making your own customized bootc image. Believe me, it is as easy as sipping a cup of tea thanks to tools like Bluebuild or OSBuild and the community around it.&lt;/p&gt;&lt;p&gt;I personally have 3 to 4 Toolbox images running continuously on my system, containing most of my daily apps.&lt;/p&gt;&lt;p&gt;One containing everything development related like ides, editors.&lt;/p&gt;&lt;p&gt;One containing all the media and specially CLI tools in a arch based toolbox. and another just for testing my &lt;a href=&quot;https://github.com/Pratyay360/drawx&quot; target=&quot;_blank&quot;&gt;apps&lt;/a&gt;. All my web browsers are downloaded via the arch toolbox.&lt;/p&gt;&lt;p&gt;And a Debian based toolbox just for testing my apps. and I use that ephemerally.&lt;/p&gt;&lt;a href=&quot;https://asciinema.org/a/nxr4bAotEDlCuwvS&quot; title=&quot;asciicast&quot;&gt;&lt;img src=&quot;https://asciinema.org/a/nxr4bAotEDlCuwvS.svg&quot; alt=&quot;asciicast&quot;&gt;&lt;/a&gt;
&lt;p&gt;See the disk usage of my system by containers above.&lt;/p&gt;&lt;p&gt;By the way, I am a full stack developer. And I have a graveyard of dozens of late-night ideas, abandoned projects, and half finished stuffs. You can believe me when I say the storage utilized by those 10-15 project folders easily takes up 2 to 2.5x the amount of storage that all my containers do! and that’s just from npm’s node_modules only and rust, go cache is yet to look into.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://i.ibb.co/whHVmSGH/image.png&quot;&gt;
&lt;figcaption&gt;img&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/1789669704/</link>
        <pubDate>Thu, 17 Sep 2026 18:28:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/1789669704/</guid>
      </item>
    
      <item>
        <title>Looking into redirect rules in dns</title>
        <description>&lt;h2&gt;How HTTPS Redirects Work Across Different Domains&lt;/h2&gt;&lt;p&gt;You have probably seen URL shorteners and domain redirects like this:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;https://old-domain.com&lt;/span&gt;
        &lt;span class=&quot;constant function&quot;&gt;↓&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;https://new-domain.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;One notable example was:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;perplexity.in&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;→&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;gemini.google.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;How can one domain securely redirect to a completely different domain without controlling the destination’s DNS, server, or TLS certificate?&lt;/p&gt;&lt;h3&gt;The answer is simple: &lt;strong&gt;the browser makes two separate connections&lt;/strong&gt;.&lt;/h3&gt;&lt;h2&gt;Redirects involve three separate systems&lt;/h2&gt;&lt;p&gt;A redirect uses:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;DNS&lt;/strong&gt;: directs the browser to the source server.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;TLS&lt;/strong&gt;: secures the connection to the source domain.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;HTTP&lt;/strong&gt;: tells the browser to visit another URL.&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;DNS itself does not redirect visitors. It only helps the browser find the server that will issue the redirect.&lt;/h3&gt;&lt;h2&gt;What happens when you open the URL?&lt;/h2&gt;&lt;p&gt;Suppose you visit:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;https://old-domain.com/page?id=10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;1. DNS resolves the source domain&lt;/h3&gt;&lt;p&gt;The browser asks DNS where &lt;code&gt;old-domain.com&lt;/code&gt; is hosted.&lt;/p&gt;&lt;p&gt;DNS returns the address of a server, CDN, or edge provider such as Cloudflare.&lt;/p&gt;&lt;h3&gt;2. HTTPS is established&lt;/h3&gt;&lt;p&gt;The browser connects to the server, which presents a valid TLS certificate for:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;old-domain.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The server does not need a certificate for the destination domain.&lt;/p&gt;&lt;h3&gt;3. The server sends a redirect&lt;/h3&gt;&lt;p&gt;Instead of returning a webpage, the server responds:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;HTTP/1.1&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;301&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;Moved&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;Permanently&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;Location:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;https://new-domain.com/page?id=10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;4. The browser opens the new URL&lt;/h3&gt;&lt;p&gt;The browser now makes a completely new connection to &lt;code&gt;new-domain.com&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;That domain presents its own TLS certificate.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;Browser&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;──HTTPS──&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt; old-domain.com
&lt;span class=&quot;constant function&quot;&gt;Browser&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;──301 redirect── old-domain.com

&lt;span class=&quot;constant function&quot;&gt;Browser&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;──HTTPS──&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt; new-domain.com
&lt;span class=&quot;constant function&quot;&gt;Browser&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;──200 OK── new-domain.com
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;This is why the source domain does not need control over the destination.&lt;/h3&gt;&lt;h2&gt;Does the destination need to approve the redirect?&lt;/h2&gt;&lt;p&gt;No.&lt;/p&gt;&lt;p&gt;Redirecting to a public URL is similar to linking to it. The destination does not need to add the source domain to its DNS or server configuration.&lt;/p&gt;&lt;p&gt;The destination simply receives a normal request:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;GET&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;/page?id=10&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;HTTP/1.1&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;Host:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;new-domain.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It may not even know that the visitor arrived through a redirect.&lt;/p&gt;&lt;h3&gt;However, the destination must support the requested path, method and parameters. A redirect cannot force an unrelated server to accept an unsupported request.&lt;/h3&gt;&lt;h2&gt;Which redirect status should you use?&lt;/h2&gt;&lt;p&gt;The most useful redirect codes are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;301&lt;/strong&gt;: permanent redirect&lt;/li&gt;&lt;li&gt;&lt;strong&gt;302&lt;/strong&gt;: temporary redirect&lt;/li&gt;&lt;li&gt;&lt;strong&gt;303&lt;/strong&gt;: redirect to another page using &lt;code&gt;GET&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;307&lt;/strong&gt;: temporary redirect that preserves the request method&lt;/li&gt;&lt;li&gt;&lt;strong&gt;308&lt;/strong&gt;: permanent redirect that preserves the request method&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The important distinction is method preservation.&lt;/p&gt;&lt;p&gt;With &lt;code&gt;301&lt;/code&gt; and &lt;code&gt;302&lt;/code&gt;, a browser may change a &lt;code&gt;POST&lt;/code&gt; request into a &lt;code&gt;GET&lt;/code&gt;. Use &lt;code&gt;307&lt;/code&gt; or &lt;code&gt;308&lt;/code&gt; when the original method and body must remain unchanged. &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Redirections&quot; target=&quot;_blank&quot;&gt;1&lt;/a&gt;&lt;/p&gt;&lt;p&gt;For example:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;POST&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;/api/order&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After a &lt;code&gt;308&lt;/code&gt; redirect, the browser or API client sends:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;POST&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;/api/order&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to the new domain.&lt;/p&gt;&lt;h3&gt;Still, redirects are not transparent proxies. Authentication, cookies, CORS rules and API compatibility can prevent a redirected request from working correctly.&lt;/h3&gt;&lt;h2&gt;Other 3xx status codes&lt;/h2&gt;&lt;p&gt;Not every &lt;code&gt;3xx&lt;/code&gt; response is a URL redirect:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;304 Not Modified&lt;/strong&gt;: tells the browser to use its cached copy&lt;/li&gt;&lt;li&gt;&lt;strong&gt;305 Use Proxy&lt;/strong&gt;: deprecated&lt;/li&gt;&lt;li&gt;&lt;strong&gt;306&lt;/strong&gt;: unused&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Therefore, the commonly useful redirect codes are &lt;code&gt;301&lt;/code&gt;, &lt;code&gt;302&lt;/code&gt;, &lt;code&gt;303&lt;/code&gt;, &lt;code&gt;307&lt;/code&gt; and &lt;code&gt;308&lt;/code&gt;. &lt;a href=&quot;https://www.rfc-editor.org/rfc/rfc9110.html&quot; target=&quot;_blank&quot;&gt;2&lt;/a&gt;&lt;/h3&gt;&lt;h2&gt;How Cloudflare handles redirects&lt;/h2&gt;&lt;p&gt;Cloudflare can perform a redirect without requiring a real origin server.&lt;/p&gt;&lt;p&gt;You can create proxied records such as:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;A&lt;/span&gt;    &lt;span class=&quot;constant&quot;&gt;@&lt;/span&gt;      &lt;span class=&quot;constant&quot;&gt;192.0.2.1&lt;/span&gt;    &lt;span class=&quot;constant&quot;&gt;Proxied&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;A&lt;/span&gt;    &lt;span class=&quot;constant&quot;&gt;www&lt;/span&gt;    &lt;span class=&quot;constant&quot;&gt;192.0.2.1&lt;/span&gt;    &lt;span class=&quot;constant&quot;&gt;Proxied&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;192.0.2.1&lt;/code&gt; is not the actual redirect server. It is a placeholder address that allows requests to enter Cloudflare’s network, where a Redirect Rule or Worker returns the redirect response. &lt;a href=&quot;https://developers.cloudflare.com/fundamentals/manage-domains/redirect-domain/&quot; target=&quot;_blank&quot;&gt;3&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The process is:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;Visitor&lt;/span&gt;
   &lt;span class=&quot;constant function&quot;&gt;↓&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;Cloudflare&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;DNS&lt;/span&gt;
   &lt;span class=&quot;constant function&quot;&gt;↓&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;Cloudflare&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;edge&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;server&lt;/span&gt;
   &lt;span class=&quot;constant function&quot;&gt;↓&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;TLS&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;certificate&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;source&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;domain&lt;/span&gt;
   &lt;span class=&quot;constant function&quot;&gt;↓&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;301/302/307/308&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;redirect&lt;/span&gt;
   &lt;span class=&quot;constant function&quot;&gt;↓&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;Destination&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;domain&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Cloudflare can automatically issue and renew a trusted TLS certificate for activated domains, which is why HTTPS works without browser warnings. &lt;a href=&quot;https://developers.cloudflare.com/ssl/edge-certificates/universal-ssl/&quot; target=&quot;_blank&quot;&gt;4&lt;/a&gt;&lt;a href=&quot;https://developers.cloudflare.com/ssl/edge-certificates/universal-ssl/enable-universal-ssl/&quot; target=&quot;_blank&quot;&gt;5&lt;/a&gt;&lt;/h3&gt;&lt;h2&gt;Can you redirect an apex domain?&lt;/h2&gt;&lt;p&gt;Yes.&lt;/p&gt;&lt;p&gt;It is true that a traditional CNAME record normally cannot be placed at the zone apex. But a CNAME is not required for redirection.&lt;/p&gt;&lt;p&gt;You can redirect an apex domain using:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;An &lt;code&gt;A&lt;/code&gt; or &lt;code&gt;AAAA&lt;/code&gt; record&lt;/li&gt;&lt;li&gt;A proxied placeholder record&lt;/li&gt;&lt;li&gt;CNAME flattening&lt;/li&gt;&lt;li&gt;An &lt;code&gt;ALIAS&lt;/code&gt; or &lt;code&gt;ANAME&lt;/code&gt; record&lt;/li&gt;&lt;li&gt;Registrar-level forwarding&lt;/li&gt;&lt;li&gt;A server or edge function&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;For example, Cloudflare supports redirecting both:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;example.com&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;www.example.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;using proxied &lt;code&gt;A&lt;/code&gt; records. &lt;a href=&quot;https://developers.cloudflare.com/fundamentals/manage-domains/redirect-domain/&quot; target=&quot;_blank&quot;&gt;3&lt;/a&gt;&lt;/h3&gt;&lt;h2&gt;How search engines handle redirects&lt;/h2&gt;&lt;p&gt;Search engines generally interpret:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;301 or 308&lt;/strong&gt; as a permanent move&lt;/li&gt;&lt;li&gt;&lt;strong&gt;302 or 307&lt;/strong&gt; as a temporary move&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;A permanent redirect tells Google that the destination should eventually replace the source URL in search results. A temporary redirect usually tells Google to keep the source URL indexed. &lt;a href=&quot;https://developers.google.com/search/docs/crawling-indexing/301-redirects&quot; target=&quot;_blank&quot;&gt;6&lt;/a&gt;&lt;/p&gt;&lt;p&gt;However, a redirect is only a signal. Search engines may also examine:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Whether the destination contains similar content&lt;/li&gt;&lt;li&gt;Whether paths are mapped correctly&lt;/li&gt;&lt;li&gt;Canonical tags&lt;/li&gt;&lt;li&gt;Internal links and sitemaps&lt;/li&gt;&lt;li&gt;Redirect chains&lt;/li&gt;&lt;li&gt;Spam or abuse signals&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;For SEO, map each old page to its closest replacement:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;old.example/docs/install&lt;/span&gt;
        &lt;span class=&quot;constant function&quot;&gt;↓&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;new.example/docs/install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Avoid redirecting every old page to an unrelated homepage.&lt;/h3&gt;&lt;h2&gt;Final takeaway&lt;/h2&gt;&lt;p&gt;A secure cross-domain redirect works because:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;DNS&lt;/strong&gt; sends traffic to the redirect provider.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;TLS&lt;/strong&gt; secures the source domain.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;HTTP&lt;/strong&gt; tells the browser where to go next.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The destination&lt;/strong&gt; handles its own DNS and TLS separately.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The source domain never serves the destination’s certificate. It simply returns a response such as:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;HTTP/1.1&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;301&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;Moved&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;Permanently&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;Location:&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;https://destination.example&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The browser then starts a new, independent HTTPS connection to the destination.&lt;/p&gt;&lt;p&gt;That is the basic mechanism behind URL shorteners, branded links, domain forwarding and website migrations.&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/1789472151/</link>
        <pubDate>Tue, 15 Sep 2026 11:35:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/1789472151/</guid>
      </item>
    
      <item>
        <title>Using chezmoi to manage dotfiles</title>
        <description>&lt;p&gt;&lt;a href=&quot;https://www.chezmoi.io/&quot; target=&quot;_blank&quot;&gt;CHEZMOI&lt;/a&gt;  is a nice, modern, secure dotfiles manager with built-in support for handling secrets and provides a nice configurable/hackable ecosystem to tinker with. Chezmoi is a batteries-included dotfiles manager.&lt;/p&gt;&lt;p&gt;Unlike yadm, chezmoi doesn’t just create a git repo of your user space.  Also, chezmoi supports integration with multiple password managers&lt;/p&gt;&lt;p&gt;Also, chezmoi is super nice with dotfiles. For example, .bashrc will be named as &lt;code&gt;dot_bashrc&lt;/code&gt;&lt;/p&gt;&lt;p&gt;And if encrypted with chezmoi, it will be stored as &lt;code&gt;encrypted_dot_bashrc.age&lt;/code&gt;&lt;/p&gt;&lt;p&gt;How to  use age with chezmoi?&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;chezmoi&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;age-keygen&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-o&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;key.txt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;chezmoi comes prepackaged with age. You just can run any age related command with just a chezmoi prefix&lt;/p&gt;&lt;p&gt;age ==&gt; chezmoi age&lt;/p&gt;&lt;p&gt;and everything stays the same.&lt;/p&gt;&lt;p&gt;You can use chezmoi with age encryption with ssh, pgp, passphrase for recipient …&lt;/p&gt;&lt;p&gt;I don’t recommend using a remote password manager to store secret values as I have faced delay in shell startup due to slow internet or dns related issues.&lt;/p&gt;&lt;p&gt;$callout💡 Always remember AGE_ (in caps) is your private key and should be stored safely ..and the one age.. (in small) is your public key and we will be encrypting this to this public key as an recipient $&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;The answer is yes and no.&lt;/p&gt;&lt;p&gt;If you have added a file as encrypted, Chezmoi will always keep that encrypted remotely.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;chezmoi&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--encrypt&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;~/.profile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;will be stored as encrypted_dot_profile.age&lt;/p&gt;&lt;p&gt;You can also use your GitHub account for the AGE recipient, since AGE can encrypt to SSH public keys. You can fetch the public SSH keys with:&lt;/p&gt;&lt;p&gt;&lt;code&gt;curl https://github.com/&amp;amp;lt;your username&amp;amp;gt;.keys&lt;/code&gt;&lt;/p&gt;&lt;p&gt;For me, that’s&lt;/p&gt;&lt;p&gt;&lt;code&gt;https://github.com/pratyay360.keys&lt;/code&gt;&lt;/p&gt;&lt;p&gt;This convention is followed by all the Gitforges, like GitLab, Codeberg, Source hut, etc.&lt;/p&gt;&lt;p&gt;If you want to use an SSH public key as the recipient in chezmoi, the general flow is:&lt;/p&gt;&lt;p&gt;Pick the recipient key you want to encrypt to (one line that starts with `ssh-rsa`).&lt;/p&gt;&lt;p&gt;Configure chezmoi/age to use it as the recipient (or export it in your shell), then add files with `–encrypt`.&lt;/p&gt;&lt;p&gt;You can integrate this with chezmoi configuration by hacking in your way.&lt;/p&gt;&lt;p&gt;If you generated an age keypair using:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;chezmoi&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;age-keygen&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-o&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;key.txt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;then:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;key.txt&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;your&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;identity&lt;/span&gt; (&lt;span class=&quot;constant function&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;key&lt;/span&gt;) &lt;span class=&quot;constant function&quot;&gt;AGE\_&lt;/span&gt;&lt;span class=&quot;constant&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constant function&quot;&gt;allcaps&lt;/span&gt;).

&lt;span class=&quot;constant function&quot;&gt;The&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;corresponding&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;age1...&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;inside&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;that&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;file&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;the&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;recipient&lt;/span&gt; (&lt;span class=&quot;constant function&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;key&lt;/span&gt;).
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;&lt;h2&gt;So, I am storing my secrets in plaintext in my dot files isn’t that bad and will not chezmoi mess by leaking my secrets.&lt;/h2&gt;&lt;h3&gt;Answer is yes and no.&lt;/h3&gt;&lt;p&gt;1st you need to configure a chezmoi configuration&lt;/p&gt;&lt;p&gt;something like this:-&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;string&quot;&gt;encryption = &amp;quot;age&amp;quot;
[git]
autoCommit = true
autoPush = true
[delta]
by-side = true
numbers = true
[age]
identity = &amp;quot;/home/&amp;lt;username&amp;gt;/.config/chezmoi/keys.txt&amp;quot;
recipient = &amp;quot;public age key here&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you have added a file as encrypted chezmoi will remember that and always keep that encrypted remotely.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;chezmoi&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--encrypt&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;~/.profile&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;will be stored as encrypted_dot_profile.age&lt;/p&gt;&lt;p&gt;Re-tracking a file after manual edits&lt;/p&gt;&lt;p&gt;If you edited a file directly (instead of using &lt;code&gt;chezmoi edit&lt;/code&gt;), that’s fine.&lt;/p&gt;&lt;p&gt;If you want, chezmoi to re track the file from your home directory into the source state, run:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;chezmoi&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;re-add&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will re-add the file according to your current configuration (including encryption rules), so the repo still only stores the encrypted version when applicable.&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/1789073130/</link>
        <pubDate>Thu, 10 Sep 2026 20:45:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/1789073130/</guid>
      </item>
    
      <item>
        <title>Making ci/cd easy and accessable again</title>
        <description>&lt;h2&gt;To Begin with I Would Love to reintroduce You to My Favorite Cli Tool Mise&lt;/h2&gt;&lt;p&gt;Mise is a version manager for dev tools &amp; dependencies, a task runner, an environment variables manager all in one place. Mise ensures that every collaborator is working on the same environment and each every stage is reproducible.&lt;/p&gt;&lt;p&gt;In an earlier post, I have discussed, managing environment variables with mise. Today I will be discussing mise’s task runner feature.&lt;/p&gt;&lt;p&gt;For example, if you are using mise, then you can write task recipes to execute a particular job. One mise task can have multiple child subtasks.&lt;/p&gt;&lt;p&gt;Like:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;ocaml&quot;&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;function_builtin variable&quot;&gt;tasks&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;description&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;Install JS dependencies&amp;quot;&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;nub install&amp;quot;&lt;/span&gt;

&lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;function_builtin variable&quot;&gt;tasks&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;build project&amp;quot;&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;nub run build&amp;quot;&lt;/span&gt;

&lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;function_builtin variable&quot;&gt;tasks&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;start project in production env&amp;quot;&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;nub run start&amp;quot;&lt;/span&gt;

&lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;function_builtin variable&quot;&gt;tasks&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;upload&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;surge ./dist test69.surge.sh&amp;quot;&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;description&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;deploy the built dir on surge&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;&lt;p&gt;Btw surge is an awesome tool that deploys your static site for free on their CDN.&lt;/p&gt;&lt;p&gt;you can check them out: &lt;a href=&quot;https://surge.sh/&quot; target=&quot;_blank&quot;&gt;https://surge.sh&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;You can see basic tasks for a simple Node.js application. But you might ask, “How do I use this in CI/CD?”&lt;/p&gt;&lt;p&gt;The simple answer is:&lt;/p&gt;&lt;p&gt;With the help of mise as a task runner and with subtasks.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;ocaml&quot;&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;function_builtin variable&quot;&gt;tasks&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;ci&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;description&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;production build&amp;quot;&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;function_builtin variable function&quot;&gt;mise&lt;/span&gt; &lt;span class=&quot;function_builtin variable&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;function_builtin variable&quot;&gt;install&lt;/span&gt;
    &lt;span class=&quot;function_builtin variable&quot;&gt;mise&lt;/span&gt; &lt;span class=&quot;function_builtin variable&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;function_builtin variable&quot;&gt;build&lt;/span&gt;
&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;function_builtin variable&quot;&gt;tasks&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;deploy&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;deploy project&amp;quot;&lt;/span&gt;
&lt;span class=&quot;function_builtin variable&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;function_builtin variable function&quot;&gt;mise&lt;/span&gt; &lt;span class=&quot;function_builtin variable&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;function_builtin variable&quot;&gt;ci&lt;/span&gt;
    &lt;span class=&quot;function_builtin variable&quot;&gt;mise&lt;/span&gt; &lt;span class=&quot;function_builtin variable&quot;&gt;run&lt;/span&gt; &lt;span class=&quot;function_builtin variable&quot;&gt;upload&lt;/span&gt;
&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Whenever someone runs &lt;code&gt;mise run ci&lt;/code&gt;, the output always stays deterministic, which you can test on your own machine. before pushing.&lt;/p&gt;&lt;h3&gt;And Now a Question Arises: What If?&lt;/h3&gt;&lt;p&gt;I’ve Written Something Wrong in Tasks Then Isn’t It the Same as Writing the Entire Pipeline?&lt;/p&gt;&lt;p&gt;The simple answer is no. Mise never allows you to ship an invalid configuration, plus you can always debug your tasks:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;mise&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;doctor&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Safety?&lt;/h3&gt;&lt;p&gt;Mise always checks and matches check-sums (SLSA) for each package downloaded. It’s generally suggested to not use “latest”, but to pin versions for example, &lt;a href=&quot;mailto:node@24.03&quot;&gt;node@24.03&lt;/a&gt; or &lt;a href=&quot;mailto:node@24.04&quot;&gt;node@24.04&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;And if you want to containerize the app before running it:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;mise&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;oci&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will spin up a container for you containing the application. (This is not suggested for chunk blobs) you can move those build artifacts to some alpine Linux or distroless container.&lt;/p&gt;&lt;p&gt;Want to Spin up a Devcontainer ?&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;mise&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;gen&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;devcontainer&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--write&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Mise handles most of the things for you.&lt;/p&gt;&lt;p&gt;It’s up to you and your creativity on, how well you write task recipes. Personally, I prefer writing atomic tasks so each task stays debug able, manageable and reproducible.&lt;/p&gt;&lt;p&gt;Mise can handle shell scripts as tasks too, and you can use virtually any CLI tool thanks to its nice plugin ecosystem.&lt;/p&gt;&lt;p&gt;Let’s Stay on Our Main Topic: CI.&lt;/p&gt;&lt;p&gt;In any CI platform like GitHub Actions, GitLab Pipelines, Bitbucket Pipelines, Forgejo CI, or any custom CI one thing is always common in all, your ability to run containers and running commands inside it.&lt;/p&gt;&lt;p&gt;Want to write a GitHub Action?&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;mise&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;gen&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;github-action&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;--write&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ci&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;workflow_dispatch&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;pull_request&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;concurrency&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;group&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ github.workflow }}-${{ github.ref }}&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;cancel-in-progress&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;boolean&quot;&gt;true&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;MISE_EXPERIMENTAL&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;boolean&quot;&gt;true&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;ci&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;timeout-minutes&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;10&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;actions/checkout@v6&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;jdx/mise-action@v3&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;mise run ci&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But our goal isn’t to understand yaml for doing CI, but to simplify the process of writing CI pipelines. The goal is to simplify the process:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ci&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;workflow_dispatch&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;pull&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;permissions&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;contents&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;read&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;pages&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;write&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;id-token&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;write&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;ci&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ghcr.io/jdx/mise:latest&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;checkout code&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;actions/checkout@main&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Install dependencies &amp;amp; building&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string punctuation_delimiter&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;
            mise deps
            mise run fetch
            mise run build&lt;/span&gt;

        &lt;span class=&quot;string property&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;SOME_ENV&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ secrets.SOME_ENV }}&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Upload artifact&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;actions/upload-pages-artifact@main&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;./public&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Deploy to GitHub Pages&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;deployment&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;actions/deploy-pages@main&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For you, the basic structure of the pipeline stays the same always like some kind of like a boilerplate and the quest of one tab vs 4 spaces somehow becomes irrelevant. You can now focus on writing tasks and let mise handle the rest.&lt;/p&gt;&lt;p&gt;The fun part is that you can now run the same on any CI platform,&lt;/p&gt;&lt;p&gt;Each will be giving you a predictable result&lt;/p&gt;&lt;p&gt;See a sample workflow for Forgejo Actions:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;CI&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;push&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;pull_request&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;workflow_dispatch&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;MISE_EXPERIMENTAL&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;boolean&quot;&gt;true&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;jobs&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;check&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Check&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;runs-on&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;codeberg-medium-lazy&lt;/span&gt;
    &lt;span class=&quot;string property&quot;&gt;container&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;string property&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ghcr.io/jdx/mise:latest&lt;/span&gt;

    &lt;span class=&quot;string property&quot;&gt;steps&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;Check out source code&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;uses&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;actions/checkout@v7.0.0&lt;/span&gt;

      &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;install dependencies&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string punctuation_delimiter&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;
            mise deps
            mise run deploy&lt;/span&gt;
        &lt;span class=&quot;string property&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
          &lt;span class=&quot;string property&quot;&gt;SOME_ENV&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;${{ secrets.SOME_ENV }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And the same for Git Lab Actions:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;string property&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;ghcr.io/jdx/mise:latest&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;stages&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;

&lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;build&lt;/span&gt;

&lt;span class=&quot;string property&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;stage&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;build&lt;/span&gt;
  &lt;span class=&quot;string property&quot;&gt;script&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;mise deps&lt;/span&gt;
    &lt;span class=&quot;punctuation_delimiter&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;string boolean&quot;&gt;mise run deploy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
</description>
        <link>https://www.pratyay.online/blog/1788377082/</link>
        <pubDate>Wed, 02 Sep 2026 19:24:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/1788377082/</guid>
      </item>
    
      <item>
        <title>Using sops &amp; age to manage environment variables</title>
        <description>&lt;p&gt;Managing &lt;code&gt;.env&lt;/code&gt; variables without a secret management workflow gets messy, especially if you work across many projects and repositories. Once values are scattered or committed by mistake, it becomes hard to remember which &lt;code&gt;.env&lt;/code&gt; Belongs to which project, even with a password manager.&lt;/p&gt;&lt;p&gt;I prefer keeping encrypted secrets close to the code. Algorithms like AES-256 and PGP are strong in theory (see &lt;a href=&quot;https://csrc.nist.gov/csrc/media/Events/2024/fifth-pqc-standardization-conference/documents/papers/on-practical-cost-of-grover.pdf&quot; target=&quot;_blank&quot;&gt;NIST’s discussion&lt;/a&gt;), but PGP is difficult for most people to use correctly in day-to-day workflows. If you cannot reliably decrypt your own files later, the setup is not practical.&lt;/p&gt;&lt;p&gt;Age is a simpler alternative. It uses modern cryptography, has manageable keys, and can work with existing credentials such as SSH keys. In this post, I use age with SOPS to encrypt secrets while keeping them in the repository.&lt;/p&gt;&lt;h2&gt;I am assuming that you are using some sort of *nix based operating system if not then at least use WSL(windows subsystem for Linux) to follow along.&lt;/h2&gt;&lt;p&gt;Here we will be using a tool like &lt;a href=&quot;https://getsops.io&quot; target=&quot;_blank&quot;&gt;sops(secret operations)&lt;/a&gt; .Sops is now a CNCF sandbox project and historically it’s been a project of people working at Mozilla, and later donated the project.&lt;/p&gt;&lt;p&gt;Sops can manage Yaml, Toml, dotenv, env.json.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://s6.imgcdn.dev/Y8IpEH.png&quot;&gt;&lt;/p&gt;&lt;p&gt;But writing yaml files for configuration is something no one should be doing.&lt;/p&gt;&lt;p&gt;Why doing Gitops the hard way, also by not committing environment variables you are not creating a reference so that others can collaborate on the project, SOPs is very selective at encryption it just encrypts the values not the keys.&lt;/p&gt;&lt;p&gt;So introducing &lt;a href=&quot;https://mise.jdx.dev/&quot; target=&quot;_blank&quot;&gt;mise&lt;/a&gt;  My favorite tool nowadays to manage dev tools, tasks, handling environment variables, Generally it’s not recommended to pin “latest“ but I am doing so :(.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;💡 To generate a mise.toml run `mise gen config` and choose tools you need from the Tui (terminal user interface)&lt;/p&gt;&lt;/blockquote&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;tools&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;string&quot;&gt;age = &amp;quot;latest&amp;quot;
sops = &amp;quot;latest&amp;quot;

[env]
SOPS_AGE_RECIPIENTS = &amp;quot;{your age recipients here}, {yet another recipient}&amp;quot;
_ = { file = &amp;quot;{ path = .env }&amp;quot; }

[tasks]
encrypt = &amp;quot;sops -e -i .env &amp;amp;&amp;amp; mv .env .env.example&amp;quot;
decrypt = &amp;quot;mv .env.example .env &amp;amp;&amp;amp; sops -d -i .env&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is generally my overall workflow for secrets. The public key is safe to share.&lt;/p&gt;&lt;p&gt;Export an env variable system wide generally from the dot rc file like .bashrc, .zshrc etc&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;SOPS_AGE_KEYS&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;AGE_PRIVATE_KEY_HERE&amp;quot;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or, you can use&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;sh&quot;&gt;&lt;span class=&quot;keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;SOPS_AGE_KEY_FILE&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;HOME&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/.sops/age/keys.txt&amp;quot;&lt;/span&gt;
&lt;span class=&quot;constant function&quot;&gt;or&lt;/span&gt; 
&lt;span class=&quot;keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;SOPS_AGE_KEY_FILE&lt;/span&gt;=&lt;span class=&quot;string&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string operator&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;string property&quot;&gt;HOME&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;/.config/sops/age/keys.txt&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;keep the contents of keys.txt safe in some password manager only .&lt;/p&gt;&lt;p&gt;AGE supports YubiKey, ssh-agent as a helpers too.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://asciinema.org/a/1130380.svg&quot;&gt;
&lt;figcaption&gt;asciicast&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;This is the workflow with sops configuration.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://asciinema.org/a/DByfEGsk6UQPSzmD.svg&quot;&gt;
&lt;figcaption&gt;asciicast&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Using mise makes the process straightforward. Once this is set up, you can keep encrypted secrets in the repository and decrypt them when needed.&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/1788197745/</link>
        <pubDate>Mon, 31 Aug 2026 17:35:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/1788197745/</guid>
      </item>
    
      <item>
        <title>Hello World, my first post</title>
        <description>&lt;p&gt;This is my small corner in the internet will be sharing ideas and thoughts maybe no one will be reading this but who cares. If only me and google spider reads this that’s perfectly fine. I will be writing stuff here sharing my views, opinions, and experience I gathered over the years.&lt;/p&gt;&lt;p&gt;From the very early age computers, electronics and internet excited me a lot.&lt;/p&gt;&lt;p&gt;Btw I am a Linux user for the past 5 6 years, so I can claim that I have learned&lt;br&gt;A little bit about UNIX and Linux, and I think I am self entitled to share some of my experiences here Btw, now days I boot an atomic/immutable Bootc based distro&lt;br&gt;(which is heavily customized by me)&lt;/p&gt;&lt;p&gt;Most of the stuff I do is just to explore. Not afraid of trying anything new or unknown I am still equally open and curious about learning new things.&lt;/p&gt;&lt;p&gt;By the way, I had a childhood dream of becoming a lawyer because I tend to defend any side in any debate &lt;del&gt;Though that usually stays within my social bubble.&lt;/del&gt; However, with age I have realized that I am too introverted for that profession.&lt;/p&gt;&lt;p&gt;I have got some hot takes too, but won’t be sharing everything in one post.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;So, see you later dear anon&lt;/strong&gt;&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/firstpost/</link>
        <pubDate>Sat, 22 Aug 2026 21:13:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/firstpost/</guid>
      </item>
    
      <item>
        <title>My adventures with linux so far.</title>
        <description>&lt;h2&gt;Beginning story&lt;/h2&gt;&lt;p&gt;During the COVID lockdown, my school was closed and I spent a lot of time watching YouTube on my Windows desktop. One day I came across a video about Linux and riced desktop setups. I liked how minimal and polished they looked, so I decided to try Linux on my own machine.&lt;/p&gt;&lt;p&gt;I was not fully confident yet, so I started with Ubuntu. I downloaded the ISO and tried it in VirtualBox by following tutorials. At the time, most of the software I used was pirated proprietary software like Photoshop and Microsoft Office, so I also needed to find alternatives. I knew being comfortable with the terminal mattered in case I broke something and needed to fix it with a search.&lt;/p&gt;&lt;p&gt;I installed Ubuntu WSL on my Windows machine and started learning basic Unix commands. I loved spending time in the terminal and VS Code. After using WSL for about a month and a half and running Ubuntu in VirtualBox, I wanted to use Linux more seriously. My desktop did not have much RAM, so the VirtualBox experience was not great.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://upload.wikimedia.org/wikipedia/commons/2/27/Ubuntu_on_Windows_10_-_bash.png&quot;&gt;
&lt;figcaption&gt;Windows Subsystem for Linux - Wikipedia&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;(This is a visual representation of Wsl Obviously copied from internet not mine as I don’t use windows any more)&lt;/p&gt;&lt;h2&gt;Installing Linux alongside Windows&lt;/h2&gt;&lt;p&gt;After spending about one to one‑and‑a‑half months experimenting with Linux via WSL, I discovered that VirtualBox performed poorly because of my limited RAM. I decided to set up a dual‑boot system with Linux and Windows. As a beginner, installing even a simple operating system was a challenge. I deleted a Windows partition and installed Ubuntu in that space, which was on my HDD rather than the SSD, so I had to switch operating systems manually through the BIOS. Despite running from the HDD, Ubuntu felt noticeably faster than Windows 10. I began tinkering with Linux, eventually spending roughly two‑thirds of my computer time in Ubuntu and using Windows only for gaming. Confident in my Linux skills, I later moved Ubuntu permanently to the SSD and reformatted the HDD from NTFS to ext4. From that point on, I considered myself a true Linux user.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://res.cloudinary.com/canonical/image/fetch/f_auto,q_auto,fl_sanitize,c_fill,w_3840,h_2160/https://ubuntu.com/wp-content/uploads/d944/yaru-screenshot-large.jpg&quot;&gt;
&lt;figcaption&gt;Ubuntu Desktop&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;(Representation of Ubuntu desktop)&lt;/p&gt;&lt;h2&gt;Distro Hopping&lt;/h2&gt;&lt;p&gt;After installing Linux permanently on my desktop there was no looking back terminal was great, I have found suitable Foss or web based alternatives to whatever I used to do. Installing/ uninstalling apps was easier than ever and after installing linux I started following multiple foss advocates and linux channels on YouTube. Ricing desktop changing themes customizing is what i used to do all day . But sadly there isn’t enough option for customization on Gnome.&lt;/p&gt;&lt;p&gt;I began exploring various Linux distributions—Elementary OS, Manjaro, Endeavour OS, Fedora, and others. Some I loved, some didn’t suit my hardware due to driver issues, and a few I may have unintentionally broken. As a beginner, Pop!\ OS was my favorite; its Ubuntu base and the polished Cosmic desktop made a great first impression.&lt;/p&gt;&lt;p&gt;After hopping between distros, I realized that the window manager and desktop environment, rather than the distribution itself, drive the user experience. After about four to five months with Pop!\ OS, I switched to Manjaro KDE. It was my first encounter with KDE Plasma, and I was instantly impressed by its limitless customization options. Compared with GNOME, KDE consumes far fewer resources, and I quickly grew to love KRunner—an intuitive launcher reminiscent of macOS’s Spotlight.&lt;/p&gt;&lt;p&gt;I proudly showed my customized desktop to friends, following tweaks inspired by the “Linux Experiment” YouTube channel. Thanks to Manjaro, I was also introduced to the Arch User Repository (AUR), a collection of build scripts that let anyone install applications natively with minimal effort—without relying on sandboxed solutions like Flatpak or Snap.&lt;/p&gt;&lt;h2&gt;Ditching Manjaro&lt;/h2&gt;&lt;p&gt;I initially experienced broken applications and even a compromised OS because Manjaro holds Arch packages for testing, which interfered with AUR-installed software. After leaving Manjaro, I tried Garuda Linux’s KDE Plasma edition. While the visual polish and tailored animations were impressive, the distribution proved too resource‑intensive for my hardware, leading to performance issues. Consequently, I switched to EndeavourOS. The EndeavourOS community on Telegram has been exceptionally helpful and active; they have resolved numerous problems I raised, often multiple times.&lt;/p&gt;&lt;p&gt;Although the Linux community is sometimes perceived as unfriendly, my experience with EndeavourOS has been the opposite. After adopting it, my distro‑hopping days came to an end. I have now been using EndeavourOS continuously for two to three years and have finally found a stable, satisfying environment.&lt;/p&gt;&lt;h2&gt;Exploring CyberSecurity&lt;/h2&gt;&lt;p&gt;I spent the lockdown watching numerous movies and web series, and the show &lt;em&gt;Robot&lt;/em&gt; Sparked my interest in cybersecurity. After viewing HackerSploit’s YouTube videos, I began exploring the field, but most of the content focused on theory rather than hands‑on practice. To fill that gap, I turned to Udemy and Telegram for more practical tutorials.&lt;/p&gt;&lt;p&gt;I set up Kali Linux and Parrot OS on my desktop using VirtualBox and started experimenting with real‑world scenarios, such as Wi‑Fi password cracking and exploiting outdated WordPress installations. This hands‑on experience has deepened my understanding and fueled my enthusiasm for a career in cybersecurity.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://www.kali.org/images/kali-desktop-gnome.jpg&quot;&gt;
&lt;figcaption&gt;Kali Linux | Penetration Testing and Ethical Hacking Linux&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;(visual representation of kali linux desktop)&lt;/p&gt;&lt;h2&gt;Current Os&lt;/h2&gt;&lt;p&gt;I recently purchased a high‑performance HP laptop with a powerful processor and initially installed EndeavourOS. The system performed well until I upgraded to kernel 5.8, after which Bluetooth audio began to stutter and the 5 GHz Wi‑Fi connection became unreliable—likely due to driver issues. Consequently, I switched to the distribution favored by Linus Torvalds himself: Fedora.&lt;/p&gt;&lt;p&gt;After years of using Arch‑based distributions, I realized they were not sufficiently stable for my primary workstation. I now run the KDE Plasma spin of Fedora, and after six months the experience has been excellent. The rolling‑release model, combined with reliable Flatpak updates, meets all my needs. I have stopped hopping between distributions and finally found my sweet spot.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1734346269192/a55b5cc6-2c0c-4204-9b61-463f54161f71.png&quot;&gt;
&lt;figcaption&gt;fastfetch&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;(Fast Fetch of my personal laptop)&lt;/p&gt;&lt;h3&gt;&lt;strong&gt;Freedom&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;One of the biggest reasons I fell in love with Linux is the sense of &lt;strong&gt;freedom&lt;/strong&gt; it offers.&lt;br&gt;Unlike proprietary operating systems like Windows or macOS, Linux doesn’t limit you to a particular way of doing things. You’re free to:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Choose from hundreds of distributions that suit your needs, whether it’s a beginner-friendly distro like Ubuntu or a cutting-edge rolling release like Arch Linux.&lt;/li&gt;&lt;li&gt;Customize your system to work the way you want, from changing the desktop environment to tweaking even the smallest settings.&lt;/li&gt;&lt;li&gt;Use your computer without worrying about invasive tracking or forced updates.&lt;br&gt;This freedom extends to how you use your hardware as well. Linux runs smoothly even on older machines, letting you breathe new life into aging systems. For someone like me, who loves tinkering and optimizing, this level of control felt liberating.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;strong&gt;Customization&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;The &lt;strong&gt;customization&lt;/strong&gt; Capabilities of Linux are what initially drew me in, and they are what kept me hooked. With Linux, you’re not stuck with a standard, unchangeable interface. Instead, you can:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Switch between desktop environments like GNOME, KDE Plasma, or XFCE, depending on your preferences.&lt;/li&gt;&lt;li&gt;“Rice” your desktop to create stunning and minimalist designs, tailoring everything from the color schemes to the window manager.&lt;/li&gt;&lt;li&gt;Modify the terminal to look and behave exactly how you want, using themes, plugins, and tools like Zsh or Oh My Zsh.&lt;br&gt;For me, experimenting with different configurations felt like a creative outlet. The ability to design a workspace that was both visually pleasing and incredibly functional was empowering. Unlike closed systems, Linux encouraged me to make my computer an extension of my personality.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;strong&gt;Open-Source Philosophy&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;At the heart of Linux is its &lt;strong&gt;open-source philosophy&lt;/strong&gt;, which fundamentally changed the way I view technology. Open-source software is not just about using free tools. It is about being part of a community where collaboration and transparency take precedence.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;With Linux, I realized I wasn’t just a passive consumer; I was part of a larger movement that values sharing knowledge and empowering others.&lt;/li&gt;&lt;li&gt;I could access the source code of the operating system and understand how it worked.&lt;/li&gt;&lt;li&gt;While I wasn’t skilled enough to contribute back then, knowing that I could learn from it or even modify it if needed was inspiring.&lt;/li&gt;&lt;li&gt;Most of the apps I used were open-source, from LibreOffice to GIMP, which helped me move away from pirated proprietary software. The open-source philosophy also made me appreciate how Linux thrives because of its community. Whether it was asking for help on forums, following FOSS advocates on YouTube, or contributing bug reports, I felt like I was part of something bigger.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Ostree&lt;/h2&gt;&lt;p&gt;Ostree based distros like kinoite and bazzite are my new preference. Have started with Ublue’s aurora and have loved immutable distributions. So installed kinoite on my laptop and have been using it for past 6 7 months. And it feels so complete as a distro and the way it handles updates and rollbacks is just amazing. I have rebased from kinoite base to my own &lt;a href=&quot;https://github.com/Pratyay360/blueee-os&quot; target=&quot;_blank&quot;&gt;recipe&lt;/a&gt;. Images are available at &lt;a href=&quot;https://quay.io/organization/pratyay360&quot; target=&quot;_blank&quot;&gt;quay.io&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;&lt;a href=&quot;https://containertoolbx.org/&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;Toolbox Containers&lt;/strong&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Toolbox containers are a special type of container in which the user’s   &lt;code&gt;$HOME&lt;/code&gt; Directory is shared between the container and the host. This is particularly advantageous when testing new or untrusted applications in an isolated environment. In fact, even trusted applications that don’t necessarily need access to the host’s &lt;code&gt;/usr/bin&lt;/code&gt; can be installed and run inside Toolbox.&lt;/p&gt;&lt;p&gt;Toolbox containers also share the host’s sockets like, SSH agent and the host’s authentication mechanisms. Since the   &lt;code&gt;$HOME&lt;/code&gt; Directory is shared, user configurations, themes, and other personal customization are seamlessly integrated, providing a consistent experience across the host and container.&lt;/p&gt;&lt;p&gt;I’ve often seen people recommend using Flatpak for GUI applications and Toolbox for command-line tools. However, Toolbox containers are perfectly capable of running GUI applications too. I’ve been installing and running GUI apps directly inside Toolbox for quiet some time, and honestly, I’ve never noticed any significant difference in the overall experience. Even I have installed all my web browsers inside toolbox containers.&lt;/p&gt;&lt;p&gt;Unlike Flatpak where users are limited to specific number of &lt;a href=&quot;https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/wikis/Freedesktop-SDK-Flatpak-repository&quot; target=&quot;_blank&quot;&gt;free desktop&lt;/a&gt; Run times, Users can use any in the case of toolbox, also the command &lt;code&gt;flatpak-spawn&lt;/code&gt; Available inside toolbox containers though it’s just a shell script, &lt;a href=&quot;https://github.com/Pratyay360/toolbox-export&quot; target=&quot;_blank&quot;&gt;I have even built a cli tool to accompany me while using toolbox containers.&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;Switching to Linux taught me more than just technical skills it gave me a new perspective&lt;br&gt;on &lt;strong&gt;freedom, creativity, and community&lt;/strong&gt;. The ability to customize my system,&lt;br&gt;Use free and open-source software, and break away from proprietary restrictions&lt;br&gt;Made my journey rewarding. Linux isn’t just an operating system; it’s a way to&lt;br&gt;Embrace technology with curiosity and empowerment.&lt;/p&gt;&lt;h2&gt;Continuation&lt;/h2&gt;&lt;p&gt;Using Linux or a Unix-like system is a continuous journey of discovery and learning. I will update this post as my workflow evolves.&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/16december2024/</link>
        <pubDate>Mon, 16 Dec 2024 14:55:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/16december2024/</guid>
      </item>
    
      <item>
        <title>Deploying nextjs app on cloudflare pages</title>
        <description>&lt;p&gt;Cloudflare Pages is a strong alternative to serverless platforms like Vercel or Netlify. Cloudflare Pages offers a generous free tier with unlimited bandwidth and requests, while other platforms set lower limits (for example, Vercel’s free tier has bandwidth limits and commercial-use restrictions).&lt;/p&gt;&lt;p&gt;You can compare the pricing of &lt;a href=&quot;https://vercel.com/pricing&quot; target=&quot;_blank&quot;&gt;Vercel&lt;/a&gt;, &lt;a href=&quot;https://www.netlify.com/pricing&quot; target=&quot;_blank&quot;&gt;Netlify&lt;/a&gt;, and &lt;a href=&quot;https://www.cloudflare.com/en-in/plans/developer-platform/&quot; target=&quot;_blank&quot;&gt;Cloudflare Pages&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Cloudflare Pages does not support server-side rendering (SSR) in the same way Vercel does. Pages are statically rendered or served from the edge, which is the main trade-off. For many side projects and content-heavy apps, unlimited bandwidth and requests on the free tier can be more practical than paying for SSR and platform-specific optimizations.&lt;/p&gt;&lt;p&gt;Now let’s see how to use cloudflare pages along with NEXT.JS,&lt;/p&gt;&lt;h2&gt;Create a &lt;a href=&quot;https://nextjs.org/docs&quot; target=&quot;_blank&quot;&gt;next&lt;/a&gt; project with&lt;/h2&gt;&lt;p&gt;&lt;code&gt;npx create-next-app@latest&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707913117934/664bb591-d118-4194-a2a3-ceace1a04c56.png&quot;&gt;
&lt;figcaption&gt;Terminal Next&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;upload project to &lt;a href=&quot;https://github.com/Pratyay360/test-app&quot; target=&quot;_blank&quot;&gt;github&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707913665642/98789bc9-d8ff-4a84-8a5a-5e3d8f92fc2b.png&quot;&gt;
&lt;figcaption&gt;github page&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Open &lt;a href=&quot;https://www.cloudflare.com/&quot; target=&quot;_blank&quot;&gt;cloudflare homepage&lt;/a&gt; login and in dashboard go to workers and pages&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707913912594/7f2ec47c-58cb-4eab-8f87-22388289dcfb.png&quot;&gt;
&lt;figcaption&gt;cloudflare dashoard&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;click on create application&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707914039120/52ed78aa-17a3-4d47-9a78-2abfd5e0d252.png&quot;&gt;
&lt;figcaption&gt;workers and pages&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;click on pages and on connect to git&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707914223044/0cd32b05-f5fc-496f-82ba-431edd6e8194.png&quot;&gt;
&lt;figcaption&gt;create application&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Link your git repository and begin setup and choose Next.Js in the framework section&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707914357980/be577f2e-5a2f-4c29-b6c2-7b498e1cb9e5.png&quot;&gt;
&lt;figcaption&gt;deploy options&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;leave everything as it is if you are not using environment variables. If you are using environment variables then click on the option and add your environment variables.&lt;/p&gt;&lt;p&gt;Hit the &lt;code&gt;Save and Deploy&lt;/code&gt; button.&lt;/p&gt;&lt;p&gt;There will be a error while opening the generated site like&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707914929214/73c90bb4-8ed5-4d77-8646-7c48a387cc35.png&quot;&gt;
&lt;figcaption&gt;Flag error&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;you have to copy the flag &lt;code&gt;nodejs_compat&lt;/code&gt; and go to settings of the deployment and open functions window in it.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707915246626/ba8527d6-4eef-48fa-a3c0-32b3f6877fa6.png&quot;&gt;
&lt;figcaption&gt;settings&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;In functions window there is a option to add compatibility flags add the copied text in both Production and Preview Options.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707915352071/1ef9d53d-a0c4-4cc8-97f5-a0addf38bd30.png&quot;&gt;
&lt;figcaption&gt;flags&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Also change the Compatibility date to the nearest one (if not configured automatically)&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707915435201/e5f8a643-8c37-46ac-ac5a-4a25c5b38423.png&quot;&gt;
&lt;figcaption&gt;compatibility date&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;After Doing everything thoroughly you have to re deploy the app by clicking on retry deployment.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707915677923/cc8eca20-0e03-42e3-849e-c04d975cf3d7.png&quot;&gt;
&lt;figcaption&gt;retry deployment&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;After doing all the steps correctly the Next.Js app will be deployed in Cloudflare Pages &lt;a href=&quot;https://test-app-kjx.pages.dev/&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;Result&lt;/h2&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1707916073390/77824d3d-b306-42f4-962c-6ef9474431ce.png&quot;&gt;
&lt;figcaption&gt;result&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;If you run into issues during deployment, check the Functions compatibility flags and retry the deployment after saving changes.&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/14thfeb2024/</link>
        <pubDate>Wed, 14 Feb 2024 14:55:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/14thfeb2024/</guid>
      </item>
    
      <item>
        <title>Using Google Sheets as a Database</title>
        <description>&lt;h2&gt;How to Use Google Sheets as a Database: A Complete Guide&lt;/h2&gt;&lt;h2&gt;Introduction :-&lt;/h2&gt;&lt;p&gt;Now you can use Google Sheets as a basic database to make your project work and prototype your project using google’s inbuilt free api &lt;code&gt;Apps Script&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Google’s spreadsheet can store text, number etc. and you can receive data in json format and use in your project in this blog I am going to show you how to store collected from customized form. One can follow this code with moderate level of coding knowledge in Javascript / React js.&lt;/p&gt;&lt;h2&gt;1st step to start the project is to create a spreadsheet in Google Sheet&lt;/h2&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1703787617966/09e8bb0a-a45e-4261-bf24-12222b6cc0b2.png&quot;&gt;
&lt;figcaption&gt;sheet home page&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Click on the &lt;code&gt;+&lt;/code&gt; icon and rename the spreadsheet name.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1703787737106/6104c007-db83-4c1e-b2dd-3dbc78fc89d1.png&quot;&gt;
&lt;figcaption&gt;sheet title&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;here I am naming the sheet as &lt;code&gt;form data&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1703787784897/59028129-8462-4a6e-b584-38a44bd35a9a.png&quot;&gt;
&lt;figcaption&gt;column name&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;I am creating 3 columns &lt;code&gt;Name&lt;/code&gt; , &lt;code&gt;Email&lt;/code&gt; and &lt;code&gt;Message&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1703787893999/b51df5a2-263f-4c86-abf9-ade9946e0163.png&quot;&gt;
&lt;figcaption&gt;sheet_id&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;I have given my sheet name as &lt;code&gt;data&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Now to generate a restful api for the given sheet we have to click on Extensions -&gt; Apps Script&lt;/p&gt;&lt;p&gt;If you are following me step by step then your sheet should be like&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1703788242840/8a4b4aee-e6e8-4838-9d8d-f09da611a82d.png&quot;&gt;
&lt;figcaption&gt;spread sheet&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;After opening &lt;strong&gt;Apps Script&lt;/strong&gt; you should change the code with&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;sheets&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;SpreadsheetApp&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;openByUrl&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;&amp;lt;Enter Spreadsheet url&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;like&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;comment&quot;&gt;// const sheets = SpreadsheetApp.openByUrl(&amp;quot;https://docs.google.com/spreadsheets/d/1RJNF_42I9p3MTBPBM8aEVe0ZWLRzccojNNoKxGT7EHw/edit#gid=0&amp;quot;);&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;sheet&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;sheets&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;getSheetByName&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;data&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable function&quot;&gt;doPost&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;parameter&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;sheet&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;appendRow&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;Name&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;Email&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;Message&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;ContentService&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;createTextOutput&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Message Sent!&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now click on deploy&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1703788395644/95fb98d0-01b9-4c7a-a167-88a548939f71.png&quot;&gt;
&lt;figcaption&gt;apps script page&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;New Deployment -&gt; Select Type (Web App) -&gt; Then click Deploy&lt;/p&gt;&lt;p&gt;Make Sure to change access to anyone.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1703788564454/28688698-170f-4296-8a95-da97e4fe89cf.png&quot;&gt;
&lt;figcaption&gt;deploy page&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Don’t forget to copy the web app link We will be using it as the&lt;/strong&gt;&lt;code&gt;api&lt;/code&gt;&lt;strong&gt;Now open your html project and add use the following syntax&lt;/strong&gt;&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;use client&amp;quot;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;React&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;react&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;hydrateRoot&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;react-dom/client&amp;apos;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;useState&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;react&amp;apos;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;FormEvent&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;apos;react&amp;apos;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;buildCustomRoute&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;next/dist/build&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable function&quot;&gt;Home&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;isClient&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;setIsClient&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable function&quot;&gt;useState&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constant_builtin&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable function&quot;&gt;Submit&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;e&lt;/span&gt;: &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;FormEvent&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;HTMLFormElement&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;preventDefault&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;formData&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;FormData&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;currentTarget&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;formData&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;formData&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Email&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;formData&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Message&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;constructor constant variable_builtin function_builtin variable function&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Please fill all the fields&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;res&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable function&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;
                &lt;span class=&quot;comment&quot;&gt;// Enter your link here&lt;/span&gt;
                &lt;span class=&quot;string&quot;&gt;&amp;quot;https://script.google.com/macros/s/S2$e@vgjgK5hpeS%6C7PS^LDJ8^6J9nV3nW7%ysPsPADhwYaA!kQMngE*EP%SZD*SbS3^g/exec&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt;
                &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;property&quot;&gt;method&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt;
                    &lt;span class=&quot;property&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;formData&lt;/span&gt;
                &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;
                &lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;status&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;===&lt;/span&gt; &lt;span class=&quot;number&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;formElement&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;form&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;HTMLFormElement&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;formElement&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
                            &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;formElement&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;reset&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
                        &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                    &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                    &lt;span class=&quot;keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
                        &lt;span class=&quot;constructor constant variable_builtin function_builtin variable function&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Something went wrong&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
                    &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;
                &lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;catch&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
                    &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Error:&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
                &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;constructor constant variable_builtin function_builtin variable function&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;constructor constant variable_builtin function_builtin variable function&quot;&gt;setIsClient&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constant_builtin&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;h1&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;text-center items-center justify-center p-5 mt-7 top-36 tracking-[20px] text-gray-500 text-2xl lg:text-4xl font-bold&amp;quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;Message Me&amp;lt;/&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;section&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;text-gray-300 body-font&amp;quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;container px-5 py-24 mx-auto&amp;quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;flex flex-wrap -m-10 justify-center whitespace-break-spaces&amp;quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;/* Form Start Here  */&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;isClient&lt;/span&gt; ? &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;
                            &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;form&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;form&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;flex flex-col space-y-5&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;onSubmit&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable function&quot;&gt;Submit&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                                &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;label&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;font-bold text-lg text-white &amp;quot;&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;Name&amp;lt;/&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                                &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Name&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;placeholder&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Enter Name&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;border rounded-lg py-3 px-3 mt-2 bg-black border-indigo-600 placeholder-white-500 text-white&amp;quot;&lt;/span&gt; /&amp;gt;
                                &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;label&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;font-bold text-lg text-white&amp;quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;Email&amp;lt;/&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                                &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;email&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Email&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;email&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;placeholder&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;example@email.com&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;border rounded-lg py-3 px-3 mt-2 bg-black border-indigo-600 placeholder-white-500 text-white&amp;quot;&lt;/span&gt; /&amp;gt;
                                &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;label&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;font-bold text-lg text-white &amp;quot;&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;Message&amp;lt;/&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                                &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;text&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Message&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;placeholder&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;Enter Your Message&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;border rounded-lg py-3 px-3 mt-2 bg-black border-indigo-600 placeholder-white-500 text-white&amp;quot;&lt;/span&gt; /&amp;gt;
                                &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;button&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;border border-indigo-600 hover:bg-indigo-600 bg-black text-white rounded-lg py-3 )font-semibold px-2&amp;quot;&lt;/span&gt; &lt;span class=&quot;property&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;submit&amp;quot;&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;Send Message&amp;lt;/&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;button&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                            &amp;lt;/&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;form&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; :
                            &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;
                                &lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;Form not working properly Please report to pratyaymustafi@outlook.com&amp;lt;/&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                            &lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                        &amp;lt;/&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;comment&quot;&gt;/* Form End */&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                    &amp;lt;/&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
                &amp;lt;/&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
            &amp;lt;/&lt;span class=&quot;constructor constant variable_builtin function_builtin variable&quot;&gt;section&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;

        &amp;lt;/&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Here I am using next.js you can use the same code with react&lt;/h3&gt;&lt;p&gt;Here is the output of the code&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1703788879735/dde905f9-ec9b-4a55-9ee7-4e58c23a1de9.png&quot;&gt;
&lt;figcaption&gt;message me page blank&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Here I am sending a dummy message just as an example&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1703789035408/6884dd91-c5c8-4e5f-a9a7-07bf23c007bf.png&quot;&gt;
&lt;figcaption&gt;message me page filled&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;As you can see the in the form is inserted into the spread sheet.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1703789052417/37c78462-af4d-48c7-8f71-2ef445f49002.png&quot;&gt;
&lt;figcaption&gt;recieved response&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;h2&gt;Cons of using spreadsheet as database&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Increased Dependency on google’s api&lt;/li&gt;&lt;li&gt;Less Scalability&lt;/li&gt;&lt;li&gt;Not so professional as it’s no so safe to store users data in just a spreadsheet.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Pros&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Easy prototyping&lt;/li&gt;&lt;li&gt;Can be used to make customized survey form&lt;/li&gt;&lt;li&gt;Cost Effective&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Have used codes of &lt;a href=&quot;https://www.youtube.com/watch?v=ZA6j2PhXSUg&quot; target=&quot;_blank&quot;&gt;Anatu Tech&lt;/a&gt; partly here.&lt;/p&gt;&lt;p&gt;If you adapt this for your own form, replace the Apps Script URL and column names to match your sheet.&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/december-29-2023/</link>
        <pubDate>Fri, 29 Dec 2023 14:55:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/december-29-2023/</guid>
      </item>
    
      <item>
        <title>A Guide to Using Hashnode API 2.0 for Showcasing Blogs on Your Website</title>
        <description>&lt;blockquote&gt;&lt;p&gt;🤖 &lt;strong&gt;Update:&lt;/strong&gt; This is an update of my previous blog on integrating Hashnode blogs into your personal website, which was based on Hashnode’s legacy API.&lt;/p&gt;&lt;p&gt;Hashnode will be closing the old API 1.0 in favor of the new GraphQL-based API 2.0.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;In this blog, I am going to show how to fetch blogs from Hashnode’s public API 2.0. You can create cards and showcase blogs written by you on your personal portfolio website.&lt;/p&gt;&lt;h2&gt;Why Use Hashnode API 2.0?&lt;/h2&gt;&lt;p&gt;Hashnode API 1.0, or their &lt;a href=&quot;https://api.hashnode.com/&quot; target=&quot;_blank&quot;&gt;legacy API&lt;/a&gt;, has been deprecated. Hashnode has released its new &lt;a href=&quot;https://gql.hashnode.com/&quot; target=&quot;_blank&quot;&gt;API 2.0&lt;/a&gt;.&lt;/p&gt;&lt;h2&gt;How to Query and Generate JSON Using API 2.0&lt;/h2&gt;&lt;p&gt;To query Hashnode’s API 2.0, follow the official &lt;a href=&quot;https://apidocs.hashnode.com/&quot; target=&quot;_blank&quot;&gt;API documentation&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;In this example, we use React hooks such as &lt;code&gt;useState&lt;/code&gt; and &lt;code&gt;useEffect&lt;/code&gt; to manage state and fetch data from the API.&lt;/p&gt;&lt;h2&gt;Example&lt;/h2&gt;&lt;h3&gt;Methodology&lt;/h3&gt;&lt;p&gt;I am going to use Next.js and query the cover image, title, brief content, and blog URL for my blog (archived)&lt;/p&gt;&lt;p&gt;You can query a maximum of 20 blogs using Hashnode’s new API.&lt;/p&gt;&lt;p&gt;Hashnode allows us to query blog data in JSON format using &lt;a href=&quot;https://gql.hashnode.com&quot; target=&quot;_blank&quot;&gt;https://gql.hashnode.com&lt;/a&gt;, which supports GraphQL queries. Here is a sample query:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;c&quot;&gt;&lt;span class=&quot;type&quot;&gt;query&lt;/span&gt; &lt;span class=&quot;constant variable&quot;&gt;Publication&lt;/span&gt; {
  &lt;span class=&quot;label&quot;&gt;publication&lt;/span&gt;(&lt;span class=&quot;type&quot;&gt;host&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;pratyaywrites.hashnode.dev&amp;quot;&lt;/span&gt;) {
    &lt;span class=&quot;label&quot;&gt;posts&lt;/span&gt;(&lt;span class=&quot;type&quot;&gt;first&lt;/span&gt;: &lt;span class=&quot;number&quot;&gt;20&lt;/span&gt;) {
      &lt;span class=&quot;type&quot;&gt;edges&lt;/span&gt; {
        &lt;span class=&quot;constant variable&quot;&gt;node&lt;/span&gt; {
          &lt;span class=&quot;type&quot;&gt;coverImage&lt;/span&gt; {
            &lt;span class=&quot;constant variable&quot;&gt;url&lt;/span&gt;
          }
          &lt;span class=&quot;type&quot;&gt;title&lt;/span&gt;
          &lt;span class=&quot;constant variable&quot;&gt;brief&lt;/span&gt;
          &lt;span class=&quot;constant variable&quot;&gt;url&lt;/span&gt;
        }
      }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The output after querying is:&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1704122802347/de323a73-e0fc-414b-ade2-383f4a5559bd.png&quot;&gt;
&lt;figcaption&gt;API response&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;I am now going to use this JSON data on my personal portfolio site: &lt;a href=&quot;https://pratyay.vercel.app/&quot; target=&quot;_blank&quot;&gt;https://pratyay.vercel.app/&lt;/a&gt;.&lt;/p&gt;&lt;h2&gt;How to Integrate This GraphQL API into Next.js or React.js&lt;/h2&gt;&lt;p&gt;I suggest following the same approach as mine:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;tsx&quot;&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;use client&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable type&quot;&gt;React&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable type&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable type&quot;&gt;useState&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;react&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable type&quot;&gt;Skeleton&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable type&quot;&gt;SkeletonTheme&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;react-loading-skeleton&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;react-loading-skeleton/dist/skeleton.css&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;constructor constant variable_builtin function_builtin variable type&quot;&gt;Image&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;next/image&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;keyword&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;type&quot;&gt;Post&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;property&quot;&gt;node&lt;/span&gt;: &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;property&quot;&gt;coverImage&lt;/span&gt;: &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;property&quot;&gt;url&lt;/span&gt;: &lt;span class=&quot;type_builtin&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;constant_builtin&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;property&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;type_builtin&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;constant_builtin&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;property&quot;&gt;brief&lt;/span&gt;: &lt;span class=&quot;type_builtin&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;constant_builtin&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;property&quot;&gt;url&lt;/span&gt;: &lt;span class=&quot;type_builtin&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;constant_builtin&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;keyword&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;default&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;variable function constructor constant variable_builtin function_builtin type&quot;&gt;Home&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;comment&quot;&gt;// Added the API query schema to get data from Hashnode.&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;posts&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;setPosts&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;variable function constructor constant variable_builtin function_builtin type&quot;&gt;useState&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;type&quot;&gt;Post&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;loading&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;setLoading&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;variable function constructor constant variable_builtin function_builtin type&quot;&gt;useState&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constant_builtin&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;comment&quot;&gt;// Change the host URL to your own publication URL.&lt;/span&gt;
  &lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;query&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;`
    query Publication {
      publication(host: &amp;quot;pratyaywrites.hashnode.dev&amp;quot;) {
        posts(first: 10) {
          edges {
            node {
              coverImage {
                url
              }
              title
              brief
              url
            }
          }
        }
      }
    }
  `&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;variable function constructor constant variable_builtin function_builtin type&quot;&gt;useEffect&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;variable function constructor constant variable_builtin function_builtin type&quot;&gt;fetchPosts&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;variable function constructor constant variable_builtin function_builtin type&quot;&gt;fetchPosts&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;async&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;variable function constructor constant variable_builtin function_builtin type&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;https://gql.hashnode.com&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;property&quot;&gt;method&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;POST&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;property&quot;&gt;headers&lt;/span&gt;: &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;string&quot;&gt;&amp;quot;Content-Type&amp;quot;&lt;/span&gt;: &lt;span class=&quot;string&quot;&gt;&amp;quot;application/json&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;property&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;stringify&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;query&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;fetchedPosts&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;publication&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;posts&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;edges&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;variable function constructor constant variable_builtin function_builtin type&quot;&gt;setPosts&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;fetchedPosts&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;variable function constructor constant variable_builtin function_builtin type&quot;&gt;setLoading&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;constant_builtin&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;SkeletonTheme&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;baseColor&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;#202020&amp;quot;&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;highlightColor&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;#444&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;h1&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;mt-10 p-10 text-center text-3xl font-bold tracking-[20px] text-gray-500 lg:text-4xl&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
        Blogs by Pratyay Mitra Mustafi
      &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;

      &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;loading&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;mt-10 p-10&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;Skeleton&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;number&quot;&gt;500&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;

      &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;section&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;body-font text-gray-300&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;container mx-auto px-5 py-24&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;flex flex-wrap justify-center whitespace-break-spaces&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;posts&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property function_method&quot;&gt;map&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;variable_parameter variable constructor constant variable_builtin function_builtin type&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;variable_parameter variable constructor constant variable_builtin function_builtin type&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;
              &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;p-4 md:w-1/3&amp;quot;&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;a&lt;/span&gt;
                  &lt;span class=&quot;property attribute&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                  &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;block&amp;quot;&lt;/span&gt;
                  &lt;span class=&quot;property attribute&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;_blank&amp;quot;&lt;/span&gt;
                  &lt;span class=&quot;property attribute&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;noreferrer&amp;quot;&lt;/span&gt;
                &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;h-full overflow-hidden rounded-lg border-2 border-gray-200 border-opacity-60 transition-all hover:scale-110&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;coverImage&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;url&lt;/span&gt; ? &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;
                      &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;Image&lt;/span&gt;
                        &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;h-48 w-full object-cover object-center md:h-36 lg:h-48&amp;quot;&lt;/span&gt;
                        &lt;span class=&quot;property attribute&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;coverImage&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;property attribute&quot;&gt;alt&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;property attribute&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;number&quot;&gt;350&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                        &lt;span class=&quot;property attribute&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;number&quot;&gt;250&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                      &lt;span class=&quot;punctuation_bracket&quot;&gt;/&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt; : &lt;span class=&quot;punctuation_bracket&quot;&gt;(&lt;/span&gt;
                      &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;Skeleton&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;number&quot;&gt;350&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;number&quot;&gt;250&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;punctuation_bracket&quot;&gt;/&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;

                    &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;p-6&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
                      &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;h2&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;title-font mb-3 text-lg font-medium text-gray-300&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                      &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;h2&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;

                      &lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;property attribute&quot;&gt;className&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;&amp;quot;mb-3 leading-tight text-gray-400 sm:leading-4&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class=&quot;punctuation_bracket&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;variable constructor constant variable_builtin function_builtin type&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;node&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;property&quot;&gt;brief&lt;/span&gt; &lt;span class=&quot;operator&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;string&quot;&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
                      &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
                  &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
              &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
          &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;section&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;punctuation_bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;variable tag constructor constant variable_builtin function_builtin type&quot;&gt;SkeletonTheme&lt;/span&gt;&lt;span class=&quot;punctuation_bracket operator&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;punctuation_bracket&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;punctuation_delimiter&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;punctuation_bracket&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That’s it. You can now easily display Hashnode data on your website.&lt;/p&gt;&lt;p&gt;You can view the output &lt;a href=&quot;https://pratyay.vercel.app/blogs&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1704123416621/415838c4-f519-4787-8d77-b7640ac3bfe6.png&quot;&gt;
&lt;figcaption&gt;Result blog&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Make sure to follow Hashnode’s &lt;a href=&quot;https://apidocs.hashnode.com/&quot; target=&quot;_blank&quot;&gt;official documentation&lt;/a&gt; to make changes according to your needs.&lt;/p&gt;&lt;p&gt;If you run into issues, check Hashnode’s &lt;a href=&quot;https://apidocs.hashnode.com/&quot; target=&quot;_blank&quot;&gt;API documentation&lt;/a&gt; for the latest schema and query options.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/13august2023/</link>
        <pubDate>Wed, 01 Mar 2023 11:11:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/13august2023/</guid>
      </item>
    
      <item>
        <title>Setting up a Free Self Hosted VPN Using only GitHub Education Pack for free</title>
        <description>&lt;h2&gt;Step by Step Guide to Setting Up a Free Self Hosted VPN Using GitHub Education Pack&lt;/h2&gt;&lt;h3&gt;Set up a Privacy-Friendly Free VPN We Need to Have a VPS Hosted on a Server or If You Have a Home Server You Can Forward the Ports You Get While Setting up OpenVPN in It but as Most Isp(Internet Service Providers) Uses CGNAT(Carrier-Grade NAT) It’s Hard to Get a Dedicated Public IP Address for You from the Isp They May Charge You Extra Money for Dedicated Public IP Too. So We Can Use a VPS Which Is Easy to Use and If You Take a VPS in a Foreign Nation You Can Bypass Censorship in Your Nation Too Which Is Something Extra than Self-Hosting in a Home Server.&lt;/h3&gt;&lt;p&gt;With the GitHub education pack you are getting a trial version of &lt;a href=&quot;http://aws.amazon.com&quot; target=&quot;_blank&quot;&gt;AWS&lt;/a&gt;, &lt;a href=&quot;http://azure.microsoft.com&quot; target=&quot;_blank&quot;&gt;azure&lt;/a&gt;, and &lt;a href=&quot;https://m.do.co/c/fc5d82bc2f25&quot; target=&quot;_blank&quot;&gt;digital ocean&lt;/a&gt; you must have to have a credit card or an international debit card to verify your payment method. here I am going to use the &lt;a href=&quot;https://m.do.co/c/fc5d82bc2f25&quot; target=&quot;_blank&quot;&gt;digital ocean&lt;/a&gt; in this tutorial you can use your preferred VPS providers.&lt;/p&gt;&lt;p&gt;steps of setting up a digital ocean for your privacy and an extra layer of security I suggest you set up a VPS with an ssh key directly don’t set it up with a password as hackers can take over your VPS by brute-forcing it.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;ssh-keygen&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;-t&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;rsa&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Type this command in your terminal to generate a public/private rsa key pair.&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;cat&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;.ssh/id_rsa.pub&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Type this command to see your public/private rsa key pair. now copy it and paste it here&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1670950407505/HJoUqM82s.png&quot;&gt;
&lt;figcaption&gt;gen ssh keys&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1670950349767/FYIlaVpZd.png&quot;&gt;
&lt;figcaption&gt;add ssh keys&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;now go to market place and search here “OPENVPN”&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1670950531573/cO02aZcP7.png&quot;&gt;
&lt;figcaption&gt;create droplets&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1670950588606/VQ-g7vKu_.png&quot;&gt;
&lt;figcaption&gt;openvpn access server&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Click here and select a server configuration for you as we are using it as VPN our traffic is going to be a bit high so we are choosing this with a high bandwidth(2TB)&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1670950729615/NLrmhfMC1.png&quot;&gt;
&lt;figcaption&gt;pricing page&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1670950858960/22xqbPwp6.png&quot;&gt;
&lt;figcaption&gt;country choose&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;choose your preferred location from here&lt;/p&gt;&lt;p&gt;Now we are all done and create your customised VPS by clicking here&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1670950960541/O7PYfrkup.png&quot;&gt;
&lt;figcaption&gt;deploy button&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Now you have to wait for some minutes to let your VPS provider here digital ocean create a VPS for you after everything done, go and log into your VPS with ssh like this&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;bash&quot;&gt;&lt;span class=&quot;constant function&quot;&gt;ssh&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;root@&lt;/span&gt;&lt;span class=&quot;operator&quot;&gt;&amp;lt;&lt;/span&gt;ipv4 address&lt;span class=&quot;operator&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;you will automatically get some prompt there create an OpenVPN user from there and set up a password for it after everything is done go to your browser and search&lt;/p&gt;&lt;p&gt;and log in there and configure your VPN according to you now log out from there and open your ipv4 address from there&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1670951509209/bNrYeEmTM.png&quot;&gt;
&lt;figcaption&gt;open vpn login page&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;now just log in and download your preferred client here everything will be pre-configured according to your server&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1670951658005/ai13LNUU2.png&quot;&gt;
&lt;figcaption&gt;download proffered version &lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Just download your client and enter your password in the app which you have. Generated during setup now you are all done if you already have the Open-VPN app on your phone or laptop you can simply download the profile file from here and import it into the Open-VPN app that’s it.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://cdn.hashnode.com/res/hashnode/image/upload/v1670951908765/9EyMfT-k6.png&quot;&gt;
&lt;figcaption&gt;already configured version&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;&lt;p&gt;Here is how you are going to download your profile only.&lt;/p&gt;&lt;p&gt;Running your own VPN on a VPS gives you more control over the server configuration and the data stored on it than using a third-party VPN provider. It does not remove every privacy risk, since your VPS provider and network path still matter, but it can be a useful setup if you understand the trade-offs.&lt;/p&gt;&lt;p&gt;If you want to support this blog, you can use my DigitalOcean referral link below.&lt;/p&gt;&lt;p&gt;&lt;figure&gt;&lt;img src=&quot;https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%201.svg&quot;&gt;
&lt;figcaption&gt;DigitalOcean Referral Badge&lt;/figcaption&gt;&lt;/figure&gt;&lt;/p&gt;</description>
        <link>https://www.pratyay.online/blog/13december2022/</link>
        <pubDate>Tue, 13 Dec 2022 00:00:00 +0000</pubDate>
        <guid>https://www.pratyay.online/blog/13december2022/</guid>
      </item>
    
    
      <item>
        <title>QCADesigner-E is now available on appimagehub</title>
        <description>&lt;h2&gt;QCADesigner-E appimage&lt;/h2&gt;&lt;p&gt;QCADesigner-E is an extension of &lt;strong&gt;QCADesigner 2.0.3&lt;/strong&gt;, developed at the University of Bremen. It adds power-dissipation estimation for &lt;strong&gt;Quantum-dot Cellular Automata (QCA)&lt;/strong&gt; Circuits, based on the theoretical work of Timler, Lent, and others. The extension was presented in &lt;a href=&quot;https://doi.org/10.1109/TCAD.2018.2789782&quot; target=&quot;_blank&quot;&gt;2&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The power-estimation functionality is integrated as an additional simulation module based on the &lt;strong&gt;Coherence Vector Simulation Engine (CVSE)&lt;/strong&gt;. QCADesigner-E remains fully compatible with QCA designs created using QCADesigner 2.0.3.&lt;/p&gt;&lt;p&gt;QCADesigner is widely used by researchers working on QCA architectures for designing, simulating, and verifying cellular automata circuits. Its standardized environment makes it possible to model QCA logic gates and interconnects while performing timing analysis. QCADesigner-E extends this workflow by allowing researchers to estimate power dissipation and evaluate the energy characteristics of their designs.&lt;/p&gt;&lt;h3&gt;Linux AppImage&lt;/h3&gt;&lt;p&gt;I have repackaged &lt;strong&gt;QCADesigner-E as an AppImage&lt;/strong&gt;, making it possible to run the application on a wide range of Linux distributions without requiring users to manually install its dependencies or build the software from source.&lt;/p&gt;&lt;p&gt;The resulting AppImage is portable and distribution-independent, providing a straightforward way to run QCADesigner-E on modern Linux systems.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/CdHy7k1/Screenshot-20260928-002154-png.png&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/6c74w09k/download-appimage-banner-svg.jpg&quot; alt=&quot;https://appimage.github.io/QCADesigner-E/&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://i.ibb.co/Gvrw30yb/Screenshot-2026-09-28-at-02-05-51-QCADesigner-E-App-Images-png.png&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://appimage.github.io/QCADesigner-E/&quot; target=&quot;_blank&quot;&gt;https://appimage.github.io/QCADesigner-E/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://portable-linux-apps.github.io/en/app/qcadesigner-e.html&quot; target=&quot;_blank&quot;&gt;https://portable-linux-apps.github.io/en/app/qcadesigner-e.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Thanks to the original authors of the application &lt;a href=&quot;http://fsillt.github.io/QCADesigner-E&quot; target=&quot;_blank&quot;&gt;fsillt.github.io/QCADesigner-E&lt;/a&gt;&lt;/p&gt;&lt;p&gt;cross post: &lt;a href=&quot;https://pratyay360.github.io/qcadesigner-qca-simulator-power-estimation-linux/&quot; target=&quot;_blank&quot;&gt;https://pratyay360.github.io/qcadesigner-qca-simulator-power-estimation-linux/&lt;/a&gt;&lt;/p&gt;</description>
        <link>https://www.pratyay.online/notes/1787483406/</link>
        <pubDate>Sun, 23 Aug 2026 11:10:00 +0000</pubDate>
        <guid>https://www.pratyay.online/notes/1787483406/</guid>
      </item>
    
  </channel>
</rss>
