PHPackages                             melkmeshi/laravel-go-tools - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. melkmeshi/laravel-go-tools

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

melkmeshi/laravel-go-tools
==========================

Go-powered high-performance tools for Laravel: H3 geospatial and fast set operations

v0.1.0(4mo ago)278MITPHPPHP ^8.2CI failing

Since Feb 20Pushed 2mo agoCompare

[ Source](https://github.com/MElkmeshi/laravel-go-tools)[ Packagist](https://packagist.org/packages/melkmeshi/laravel-go-tools)[ RSS](/packages/melkmeshi-laravel-go-tools/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Laravel Go Tools
================

[](#laravel-go-tools)

Go-powered high-performance tools for Laravel. Offloads CPU-intensive operations to compiled Go binaries for significant speed improvements over pure PHP.

Features
--------

[](#features)

- **H3** — Uber's H3 geospatial indexing (lat/lng to cell, k-ring, distance, polyfill)
- **Sets** — Fast set operations on large collections (intersect, union, diff)
- **DbCompare** — Cross-database table comparison (MySQL &amp; PostgreSQL)

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11.x or 12.x

Installation
------------

[](#installation)

```
composer require melkmeshi/laravel-go-tools
```

Download the Go binary for your platform:

```
php artisan go-tools:install
```

Optionally publish the config:

```
php artisan vendor:publish --tag=go-tools-config
```

Check installation status:

```
php artisan go-tools:status
```

Usage
-----

[](#usage)

### H3 Geospatial Indexing

[](#h3-geospatial-indexing)

```
use Melkmeshi\GoTools\Facades\H3;

// Convert coordinates to H3 cell
$cell = H3::latLngToCell(37.7749, -122.4194, 10);
echo $cell->index; // e.g. "8a283082800ffff"

// Get neighboring cells within k steps
$neighbors = H3::kRing($cell->index, 1);

// Grid distance between two cells
$cellB = H3::latLngToCell(37.7750, -122.4180, 10);
$distance = H3::gridDistance($cell->index, $cellB->index);

// Fill a polygon with H3 cells
$cells = H3::polygonToCells([
    [37.7749, -122.4194],
    [37.3382, -121.8863],
    [37.9, -122.5],
], 8);
```

### Set Operations

[](#set-operations)

```
use Melkmeshi\GoTools\Facades\Sets;

Sets::intersect([1, 2, 3, 4], [3, 4, 5, 6]); // [3, 4]
Sets::union([1, 2, 3], [3, 4, 5]);            // [1, 2, 3, 4, 5]
Sets::diff([1, 2, 3, 4], [3, 4, 5, 6]);       // [1, 2]
```

### Database Compare

[](#database-compare)

Compare ID sets across two database connections:

```
use Melkmeshi\GoTools\Facades\DbCompare;

// Using Laravel connection names
$result = DbCompare::compareConnections(
    'mysql',
    'SELECT id FROM orders',
    'pgsql',
    'SELECT id FROM sale_order',
    storage_path('app/compare-results'),
);

echo $result->countA;     // total IDs in source A
echo $result->countB;     // total IDs in source B
echo $result->onlyACount; // IDs only in A
echo $result->onlyBCount; // IDs only in B
echo $result->bothCount;  // IDs in both
echo $result->onlyAFile;  // CSV file path
echo $result->onlyBFile;  // CSV file path

// Or using raw database config arrays
$result = DbCompare::compare(
    config('database.connections.mysql'),
    'SELECT id FROM orders',
    config('database.connections.pgsql'),
    'SELECT id FROM sale_order',
);
```

Configuration
-------------

[](#configuration)

Environment variables:

VariableDefaultDescription`GO_TOOLS_BINARY_PATH`auto-detectedCustom path to the Go binary`GO_TOOLS_TIMEOUT``30`Default command timeout (seconds)`GO_TOOLS_DB_COMPARE_TIMEOUT``300`DB compare timeout (seconds)Supported Platforms
-------------------

[](#supported-platforms)

PlatformArchitecturemacOSApple Silicon (arm64)Linuxx86\_64 (amd64)Development
-----------

[](#development)

### Building binaries

[](#building-binaries)

```
./scripts/build.sh
```

Builds Go binaries for all supported platforms into `dist/`. Requires [zig](https://ziglang.org/) for cross-compilation.

### Creating a release

[](#creating-a-release)

```
./scripts/release.sh v0.2.0
```

Builds all binaries and creates a GitHub release with the assets attached.

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance81

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

133d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/95718825?v=4)[Mohamed Elkmeshi](/maintainers/melkmeshi)[@MElkmeshi](https://github.com/MElkmeshi)

---

Top Contributors

[![MElkmeshi](https://avatars.githubusercontent.com/u/95718825?v=4)](https://github.com/MElkmeshi "MElkmeshi (9 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/melkmeshi-laravel-go-tools/health.svg)

```
[![Health](https://phpackages.com/badges/melkmeshi-laravel-go-tools/health.svg)](https://phpackages.com/packages/melkmeshi-laravel-go-tools)
```

###  Alternatives

[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M306](/packages/laravel-horizon)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[illuminate/console

The Illuminate Console package.

13046.0M6.5k](/packages/illuminate-console)[illuminate/process

The Illuminate Process package.

44869.2k98](/packages/illuminate-process)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
