PHPackages                             rebelcode/atlas - 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. [Database &amp; ORM](/categories/database)
4. /
5. rebelcode/atlas

ActiveLibrary[Database &amp; ORM](/categories/database)

rebelcode/atlas
===============

A lightweight SQL generation library.

0.2-alpha1(2y ago)1737[1 PRs](https://github.com/RebelCode/atlas/pulls)GPL-3.0PHPPHP &gt;=7.4

Since May 12Pushed 1y ago3 watchersCompare

[ Source](https://github.com/RebelCode/atlas)[ Packagist](https://packagist.org/packages/rebelcode/atlas)[ RSS](/packages/rebelcode-atlas/feed)WikiDiscussions main Synced 1mo ago

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

Atlas
=====

[](#atlas)

A lightweight SQL builder library that does not require a database connection.

[![GitHub Workflow Status](https://camo.githubusercontent.com/17ed5ed8fa394f1d6c5e00316a04b253a4468a753a1c85e6ddf08e31f217e7a8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f726562656c636f64652f61746c61732f636f6e74696e756f75732d696e746567726174696f6e2e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265)](https://github.com/RebelCode/atlas/actions/workflows/continuous-integration.yml)[![Packagist PHP Version Support](https://camo.githubusercontent.com/c9a97319b5aafe6b6b734ee85297c54031f6cc816f85c7e9878d6adb237fd0b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f726562656c636f64652f61746c61733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rebelcode/atlas)[![Packagist Version](https://camo.githubusercontent.com/7a175a2b394a40c1f31ddd39d3102ca41c281135d6becc0ae97dca1424cc7dac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726562656c636f64652f61746c61733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rebelcode/atlas)[![Packagist License](https://camo.githubusercontent.com/323de83df256faef15bc4ac05ec94dfbab0ee00c1231b2d22ed47accf1c80a03/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f726562656c636f64652f61746c61733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rebelcode/atlas)

About
-----

[](#about)

The primary goal for Atlas is to replace SQL strings in your codebase with immutable objects that can be safely shared between different parts of your application. Atlas is **NOT** an ORM! But queries can be executed by implementing a thin database adapter interface.

Atlas' design philosophy is simple: to mirror SQL syntax as closely as possible. This means that the library will do its best to not throw any exceptions or errors if your SQL queries are invalid. It is up to you to write valid queries, just as you would with SQL strings. It is your database's job to report errors in SQL.

This keeps Atlas's runtime footprint at a minimum, allowing you to focus on writing short, readable queries.

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

[](#installation)

Install with [Composer](https://getcomposer.org/):

```
composer require rebelcode/atlas

```

Quick Start
-----------

[](#quick-start)

Create an `Atlas` instance.

```
use RebelCode\Atlas\Atlas;

$atlas = new Atlas();
```

Get a table using the `table()` method:

```
$users = $atlas->table('users');
```

Create queries from tables:

```
$query = $users->select(/* ... */);
$query = $users->insert(/* ... */);
$query = $users->update(/* ... */);
$query = $users->delete(/* ... */);
$query = $users->create(/* ... */);
$query = $users->drop(/* ... */);
```

Modify queries, if necessary:

```
use function RebelCode\Atlas\asc;

$query = $query->where($users->role->eq('admin'))
               ->orderBy(asc($users->name))
               ->limit(20)
               ->offset(10);
```

Render the query into SQL or execute it:

```
$sql = $query->render();
$result = $query->exec();
```

Finally, RTFM! Check out the [documentation](https://github.com/rebelcode/atlas/wiki) to learn what more you can with Atlas.

Why "Atlas"?
------------

[](#why-atlas)

[Atlas](https://en.wikipedia.org/wiki/Atlas_(mythology)) is the Greek god that holds up the heavens on his shoulders.

Initially, we picked the codename ironically. The package is intended to be lightweight, though it's unclear at what threshold a package becomes "light" or "heavy". We figured that the heavens must be pretty heavy, even for a god. So we used the codename "Atlas".

We decide to keep the name officially, because it's a good fit. Consider how unwieldy SQL strings can be in code, and how important databases are for our applications. So, you can think of Atlas (this package) as shouldering the burden of carrying our database, keeping SQL strings away from our code in the same way that Atlas (the god) keeps the heavens from falling to Earth.

License
-------

[](#license)

GPL-3.0 © [RebelCode](https://rebelcode.com/)

Read the full license [here](LICENSE).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 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

Every ~73 days

Recently: every ~108 days

Total

7

Last Release

1027d ago

PHP version history (2 changes)v0.1-alphaPHP ^7.1 | ^8.0

0.2-alphaPHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8036caaa483e3f8a21d0083284bd508f5ada08ad45b790b5075ecff49f09b6b?d=identicon)[rebelcode](/maintainers/rebelcode)

---

Top Contributors

[![mecha](https://avatars.githubusercontent.com/u/5425482?v=4)](https://github.com/mecha "mecha (125 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rebelcode-atlas/health.svg)

```
[![Health](https://phpackages.com/badges/rebelcode-atlas/health.svg)](https://phpackages.com/packages/rebelcode-atlas)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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