Download AltSql
AltSql comes with two command-line shells: altsql for a device’s database and altsql-db for a gateway’s. Each archive below holds both, with the license files and the README. The links always point to the latest release.
| System | Download |
|---|---|
| Linux, x86-64 | altsql_linux_amd64.tar.gz |
| Linux, ARM64 | altsql_linux_arm64.tar.gz |
| macOS, Apple silicon | altsql_darwin_arm64.tar.gz |
| macOS, Intel | altsql_darwin_amd64.tar.gz |
Checksums are in SHA256SUMS. Every release is listed on GitHub.
Install
On Linux or macOS:
tar -xzf altsql_linux_amd64.tar.gz
sudo mv altsql altsql-db /usr/local/bin/
altsql-db --version
The Linux binaries are static, so they run on any distribution. The macOS binaries aren’t signed by Apple, so macOS may block the first run; allow it in System Settings under Privacy & Security, or run xattr -d com.apple.quarantine on each. There’s no Windows build: AltSql’s file layer is written for Linux and macOS.
Each binary is built by the release workflow on GitHub. Before a release goes out, every build the runners can execute carries records from a device file to a gateway file with both shells and checks every answer.
Try It
altsql new dev.db
altsql dev.db "CREATE TABLE temps (time TIME, machine INT, temp FLOAT)"
altsql dev.db "INSERT INTO temps VALUES (1700000001, 1, 21.5), (1700000002, 2, 22.25)"
altsql dev.db ".sync 0 batch.bin"
altsql-db gw.db ".sync 7 0 batch.bin" "SELECT * FROM temps WHERE machine = 2;"
The device writes two readings and a sync batch. The gateway applies the batch and answers in SQL.
Build It Yourself
You need a C99 compiler and make, on Linux or macOS. The engine is one C file, core/dist/altsql.h, and the database is another, engines/db/altsql_db.h.
git clone https://github.com/AltSql/altsql
cd altsql/core && make test
cd ../engines/db && make test && make shell
Status
AltSql is an alpha. Everything has run on a PC in simulation, and nothing has run on a microcontroller or a gateway yet. File formats may still change, so it isn’t for production. The roadmap says what comes next.
License
AltSql is open source under the Apache License 2.0. The static Linux binaries also contain musl libc, which is under the MIT license.