@everysk/apps-cli
(C) Copyright 2026 EVERYSK TECHNOLOGIES
everysk-apps: scaffold an Everysk app, add or remove a module, upgrade its packages, check it
for drift. Declared as a
devDependency.
One of three, and the one to start with:
@everysk/apps-sdk is the runtime an app
bundles and @everysk/apps-devkit the
build presets it extends. This one writes an app that uses both, correctly.
new — scaffold an app
No install needed for a new app:
npx @everysk/apps-cli new
Asks the app's name, which modules it will use, which theme it mounts, which language it speaks
to its users and which users it is deployed to, writes the app already
wired for those answers, and runs npm install. new adds the CLI to the app's
devDependencies on the way, so add and doctor are there afterwards as everysk-apps.
Four of its decisions are ones that fail quietly when made by hand, which is the argument for
using it even when wiring an app yourself looks straightforward:
|
goes wrong how |
| The folder layout |
the dev server reads config.json one level above its root, so a flat layout boots an app with no configuration and says nothing |
| Which optional peers a module needs |
they are optional peers of the SDK, so npm does not install them and never complains; the app fails at build with a resolution error naming a file, not a decision |
| Which subpath to import them from |
a bundler resolves a module before it can tree-shake it, so the wrong import breaks the build of an app that never wanted the module |
| Configs that extend the presets |
copying one instead of extending it is what stops a fix in @everysk/apps-devkit ever reaching the app |
Each is something this project learned by getting it wrong first.
The app also comes out formatted with @everysk/apps-devkit/prettier, and keeps to it:
npm run format and format:check run Prettier on its code, .prettierignore leaves JSON,
YAML and Markdown alone (so package.json keeps npm's 2 spaces), and .editorconfig gives an
editor without Prettier the same 4 spaces.
It also writes the .env the dev server reads, so the first npm run dev does not stop at
"EVERYSK_API_URL must be set." with nothing saying what to set:
EVERYSK_API_URL=https://api.everysk.com/v2 and the OAuth2 client's EVERYSK_API_CLIENT_ID and
EVERYSK_API_CLIENT_SECRET to fill (and VITE_AG_GRID_LICENSE_KEY with AG Grid). It goes where the
devkit's preset reads it — the repository root when the app is inside PROJECT_ROOT, the app's project/
otherwise — and .env is added to the .gitignore there, since it holds the client secret. An
existing .env is never rewritten: only the keys it lacks are appended. everysk-apps env does the
same for an app that already exists.
For an app that already exists:
npm install --save-dev @everysk/apps-cli
Its only dependencies are semver and prompts.
<name>/
config.json build metadata the deploy reads
project/ the Vite app — Vite's root
The folder is the slug of the typed name, so "CVM 050" scaffolds cvm-050, while config.json
keeps the name as typed for anything a human reads. Its target_users maps each user ID given to
null, an app not created yet: the deploy creates one for each and writes its uapp_ id back. With
none, the deploy creates the app for nobody, so new says so when the answer is empty. The split between the two is load-bearing:
the dev server reads config.json one level above its root, so a flat layout leaves an app
booting with no configuration and says nothing.
everysk-apps new "Trade Allocation" --dir apps --modules agGrid,agGridEnterprise --theme "Everysk Dark" --locale pt-br --no-install
| Flag |
|
--dir <path> |
create the app folder under path instead of here |
--modules a,b |
skip the module question |
--theme "<name>" |
skip the theme question. An unknown name is rejected, because getTheme would silently fall back |
--locale <name> |
skip the language question: en (the SDK's default) or pt-br. An unknown one is rejected, because the SDK would silently fall back to English |
--target-users a,b |
skip the question of who it deploys to. Anything but a numeric user ID is rejected |
--no-install |
write the app, do not run npm install |
add — bring a module into an existing app
everysk-apps add socket
everysk-apps add # asks, or prints the catalogue when there is no terminal
Writes the module's packages into the app's dependencies and installs them. Running it twice
reports "already declared" rather than rewriting the manifest, and a version the app already
pinned is never overwritten.
It then prints what to add to src/providers.ts, the file new writes the app's providers in
for App.tsx and its tests alike: the import, any declaration, and the provider for the
providers list. The socket's provider stays out of testProviders, since a real connection
would open in every test.
This step exists because those packages are optional peers of the SDK: npm does not install
them on its own, by design, so something has to put them in the manifest. It finds the manifest
in the directory given or in its project/, so it works from either side of the app layout.
Only four modules cost anything, and the CLI only asks about those: agGrid, the community
grid; agGridEnterprise, which brings ag-grid-enterprise and mounts the license provider with
VITE_AG_GRID_LICENSE_KEY; socket; and dates, which brings dayjs and mounts
dateLocalization() for MUI's date pickers. A grid also needs its AG Grid modules registered —
without them it shows its rows and nothing else: no locale texts, filters or row API — so new writes
ModuleRegistry.registerModules([AllCommunityModule]) (or AllEnterpriseModule, with Enterprise)
into src/providers.ts, and add prints the same lines. That file is loaded by App.tsx and by
the tests' render helpers alike, so the tests run on the app's own registration. new also
installs msw, the peer of @everysk/apps-sdk/test/msw, for the app's tests. The
entity slices, the UI components and the theme are there the moment the SDK is a dependency —
add portfolio writes nothing, and the catalogue says so rather than leaving them out, which
would suggest they need installing.
remove — take a module back out
everysk-apps remove socket
Takes the module's packages out of the manifest and runs npm install. It does not edit the
code: it lists the files still importing the module's subpath, and the provider to take out of
providers, since the build fails until they go. An app's App.tsx has
usually moved on from the one new wrote, and a rewrite that misreads it would break the app
more quietly than a list of files to fix.
upgrade — move the three packages together
everysk-apps upgrade # to the latest release
everysk-apps upgrade 0.3.0
Writes ^<version> for each Everysk package the app declares, in the section it is declared
in, and runs npm install; then doctor checks the rest of the app against the new SDK. A
file: or link: specifier is left alone and named, since replacing it would quietly switch
the app back to the registry. The latest release is read with npm view, so the person's own
registry settings apply.
doctor — the part that keeps an app correct
everysk-apps doctor
Scaffolding is a point-in-time act; on day thirty someone edits a version by hand. Run from CI,
drift fails the build whether or not anyone used this CLI. It exits non-zero only on errors,
so warnings never block a merge.
It is weighted towards what npm cannot see:
@everysk/apps-devkit in dependencies, where npm ci --omit=dev would ship the toolchain
into the deploy image
- a subpath imported without its optional peer — npm will not install those, so nothing else
catches it
- a peer carried with nothing importing it, which for
ag-grid-enterprise means carrying the
license perimeter for free
- an AG Grid rendered with no modules registered outside the tests (a warning): tests that
register their own pass, and in the browser the grid's row API answers
undefined
react pinned without react-dom: the unpinned half resolves to a newer version whose own
peer demands a newer react, and the install dies with ERESOLVE
- the packages drifting out of lockstep
- an API key empty in both the
.env and the environment, which stops npm run dev; an empty
AG Grid key, which leaves the watermark
- no
config.json beside project/, where the dev server and the deploy read it; a
target_users with nobody in it, which deploys the app for nobody; and an
env_vars.workspace left empty, which the SDK's hooks refuse
- a
vite, vitest, eslint, Prettier or tsconfig.app.json config that does not extend its
devkit preset — under whichever name the app keeps it — so a fix to the preset never reaches
the app; a package.json without "type": "module"; no .prettierignore
Non-interactive use
Every prompt returns nothing without a terminal, so the same commands run unattended in CI or
under an agent when the flags answer them. Aborting a prompt exits 130 having written nothing,
rather than proceeding on the defaults someone was in the middle of declining.
everysk-apps --version
everysk-apps help
Requirements
Node 22 or newer, npm 12 or newer.
License
MIT — see LICENSE.