Skip to main content
AdonisJS is to TypeScript what Laravel is to PHP: a complete, typed framework with a container, providers, an ORM (Lucid), encryption, a command line (Ace) and a test runner (Japa) built in. The @fetchski/attract-cms-adonis package fits the SDK into it: one node ace configure and the client is in the container.

@fetchski/attract-cms-adonis for AdonisJS 7

The same SDK as the TypeScript tab · Node 26.12.1+ · Lucid, Ace and Japa

Why AdonisJS

One command to set up

node ace configure asks for the URL and key, then writes the config, .env and provider.

One client, injected

The package puts SiteClient in the container; @inject() hands it to controllers, services and jobs.

Keys kept secret

Env.schema.secret() prints as [redacted]; with --database, the key is sealed under your APP_KEY.

Ace commands

attract:check, attract:sweep, attract:store-key, and a REPL with the client loaded.

Background work

Queue jobs, schedules and a cache that keeps serving when the site is down.

Japa fakes

fakeAttract() fakes every call the app makes, restored after each test.

The guides

Installation

The package from your own site, then node ace configure. Install →

Configuration

config/attract.ts, the default site, and more sites. Configure →

Key in the database

The key sealed in a table, stored with one Ace command. Store it →

Calling the API

Controllers, routes, validation, uploads and errors. Make calls →

Testing, Ace and background work

Everything the SDK itself does (models, paging, retries, error classes, keeping keys secret) is the same as in plain TypeScript, and the TypeScript tab explains it in full. The package adds the AdonisJS parts: the config file, the container, the Ace commands and the fakes. Not using AdonisJS? The TypeScript tab works in any Node or Bun app.