@tty-pt/axil-hyle logo

@tty-pt/axil-hyle

npm version License: BSD-2-Clause TypeScript Ready Node.js Native REST Engine

Schema-driven REST CRUD connector, partition route registrar, and isomorphic HTTP dataset client bridging @tty-pt/axil, @tty-pt/hyle, and @tty-pt/hyle-source. Canonical C header: <ttypt/axil-hyle.h>.

📖 Full C & Systems Documentation: See the main axil-hyle GitHub README for the complete C route wiring, REST endpoint grammar, and libhyle-source driver integration.


1. Overview & Domain Concepts

axil-hyle (libaxil-hyle.so / @tty-pt/axil-hyle) turns registered Hyle dataset schemas into paginated, searchable REST APIs with automatic validation and ordered child-collection management:

  1. Automatic Dataset REST Endpoints:
  1. Accent-Sensitive Search & Structured Filtering:
  1. Ordered Partition & Child Collection Routes:
  1. Isomorphic TypeScript Client (AxilHyleClient):

2. Installation

npm config set @tty-pt:registry https://tty.pt/npm/
npm install @tty-pt/axil-hyle

Native OS & Mobile Packages (tty.pt): Prebuilt native C packages (axil-hyle) for Linux (apt, apk, pacman, dnf), macOS (brew), Windows (winget, MSYS2), and OpenBSD (pkg_add), plus static mobile sysroots for Android (https://tty.pt/android/) and iOS (https://tty.pt/ios/ — libaxil-hyle.xcframework) are available via the tty.pt package repositories.


3. Quickstart

Launch axil with axil-hyle Loaded

npx axil -d -p 8080 -m auth:hyle

Query & Mutate Datasets with createAxilHyleClient

import {
  createAxilHyleClient,
  buildDatasetUrl,
  getModulePath
} from "@tty-pt/axil-hyle";

const client = createAxilHyleClient({ baseUrl: "http://127.0.0.1:8080" });

// 1. Paginated full-text search & filtering
const songs = await client.list("song", {
  q: "fado",
  sort: "title",
  order: "asc",
  limit: 20,
  page: 1
});

// 2. Fetch, create, update, and delete a record
const song = await client.get("song", "song_1");
await client.create("song", { id: "song_2", title: "Canção do Mar" });
await client.update("song", "song_2", { title: "Canção do Mar (Live)" });
await client.delete("song", "song_2");

// 3. Manage ordered child collections (e.g. gig setlist items)
await client.appendOrdered("gig", "gig_2026", { song: "song_1", key: "Am" });
const setlist = await client.listOrdered("gig", "gig_2026");

// 4. Construct canonical dataset URLs directly
const url = buildDatasetUrl("song", { query: { q: "pão", limit: 10 } });
console.log("Dataset URL:", url, "Module path:", getModulePath());

4. JavaScript / TypeScript API Reference

createAxilHyleClient(options?: AxilHyleClientOptions): AxilHyleClient

Creates an isomorphic HTTP client for axil-hyle dataset endpoints:

URL & Native Route Registration


5. C Development Headers & Native Integration

CFLAGS += -I./node_modules/@tty-pt/axil-hyle/include
LDLIBS += -laxil-hyle

License

BSD-2-Clause — Copyright (c) 2026, Paulo Quirino <quirinpa@gmail.com>. See LICENSE.

Documentation