Nuvaka › Developer docs › CLI (nuvaka-ext)

CLI: nuvaka-ext

nuvaka-ext creates, checks, packs, signs and publishes extensions. It is not published on npm: it ships with the SDK, types and examples in Nuvaka's signed developer kit (a single zip). It needs Node.js 20+. Its major version is the API version it supports (1.x = API v1).

Install: the developer kit

  1. Download: in the app, open Apps › Store; the first card is Nuvaka Apps developer kit › Download. Before saving the file, the app verifies its SHA-256 digest and the server's Ed25519 signature. The card shows the current version.
  2. Extract: unzip nuvaka-apps-sdk-<version>.zip; it contains a nuvaka-apps-sdk/ folder. Nothing else to install: the CLI's single dependency (fflate) is bundled in the kit.
node nuvaka-apps-sdk/extension-cli/bin/nuvaka-ext.js --version

What's in the kit

PathContents
README.mdshort guide
extension-sdk/SDK: types, error classes, a mock nuvaka for tests (built, dist/)
extension-cli/CLI: bin/nuvaka-ext.js
create-extension/thin wrapper around init: bin/create-extension.js
examples/hello, notes-summary, clipboard-history, github-watcher, local-editor (Examples)

Running it

The CLI runs directly with Node:

node /path/nuvaka-apps-sdk/extension-cli/bin/nuvaka-ext.js <command>

Optional: for a shorter command, run npm link once inside extension-cli (this creates a global nuvaka-ext command) or define an alias:

# bash/zsh (~/.bashrc or ~/.zshrc)
alias nuvaka-ext='node /path/nuvaka-apps-sdk/extension-cli/bin/nuvaka-ext.js'
# PowerShell ($PROFILE)
function nuvaka-ext { node C:\path\nuvaka-apps-sdk\extension-cli\bin\nuvaka-ext.js @args }

These docs write the commands simply as nuvaka-ext.

nuvaka-ext --help
nuvaka-ext <command> --help

New project and npm scripts

node nuvaka-apps-sdk/extension-cli/bin/nuvaka-ext.js init hello --username your-username
cd hello
npm install
npm run lint
npm test
npm run pack
npm run publish -- --changelog "First version"

Create the project next to the kit. init writes file: dependencies into package.json that point at the kit's CLI and SDK ("@nuvaka/extension-cli": "file:../nuvaka-apps-sdk/extension-cli", "@nuvaka/extension-sdk": "file:../nuvaka-apps-sdk/extension-sdk"); npm install only downloads vitest from the registry. The lint, test, pack and publish scripts then work without an alias or npm link. SDK imports stay @nuvaka/extension-sdk and @nuvaka/extension-sdk/testing.

Updating

The Store card shows the current version. Download the newer zip from the app, extract it over the old nuvaka-apps-sdk/ folder, then run npm install in your projects (the file: dependencies pick up the new kit).

Manual download and verification

You can also download the kit without the app (no authentication needed):

EndpointReturns
GET https://generalappapi.nuvaka.com/api/ext/v1/sdkJSON: latest.version, sha256, size, downloadUrl, record, signature
GET https://generalappapi.nuvaka.com/api/ext/v1/sdk/download/{version}the zip file
curl -fsS https://generalappapi.nuvaka.com/api/ext/v1/sdk
curl -fsS -o nuvaka-apps-sdk-1.0.0.zip https://generalappapi.nuvaka.com/api/ext/v1/sdk/download/1.0.0
sha256sum nuvaka-apps-sdk-1.0.0.zip    # must equal latest.sha256

To verify the signature yourself: record is the object {name, version, sha256, size, publishedAt}; signature (base64) is an Ed25519 signature over the object's canonical JSON bytes (UTF-8), made with the same key that signs extension release records: keyId 7a224ecac96bac0d, public key Pl+H1UeDJoq26r5KU9Gqm+tHhcKE3d1YRFmLGLEn/Ao= (also served by GET https://generalappapi.nuvaka.com/api/ext/v1/signing-key). Canonical JSON: keys at every level sorted by UTF-16 code units, no whitespace, arrays kept in order, integers only; non-ASCII characters and / are not escaped, only ", \ and 0x00–0x1F are (\" \\ \b \f \n \r \t, others as lower-case hex \u00xx). If the signature is valid, record.sha256 must equal the digest of the zip you downloaded. When you download from the app, the app does all of this for you.

Global options: -h, --help, -v, --version, --json (machine-readable output; for CI). Commands that take a folder accept it as a positional argument or with --dir; the default is the current folder. The CLI's own messages are in Turkish.

Commands

CommandWhat it does
init <name>new extension scaffold
lint [folder|.nvx]checks with the same rules as the server
pack [folder]builds the <id>-<version>.nvx package
keys create [name] · keys listcreates / lists Ed25519 signing keys
sign <file.nvx>signs a package and prints the base64 signature
login --token nvd_…saves your developer token
logoutremoves the saved token
whoamiverifies the token and shows the account
publishpacks, signs and uploads
listing <id>shows / changes the Store card style and tagline
media list|upload|delete <id>manages Store media (banner, video, screenshots)
deps [<id>@<version>|folder]resolves and prints the dependency tree against published versions
abandon <id>abandons a package (it stays at its last version, no new versions)
dev [folder]prints the development-mode command and runs lint on changes
test [folder]runs the extension's tests (vitest)

init

nuvaka-ext init <name> [--dir <folder>] [--username <user>] [--ui] [--background] [--force]
  • <name>: 2–40 characters, lower-case letters, digits, -; must start with a letter or digit. The ID becomes <username>.<name>.
  • --dir: target folder (default ./<name>). --force: write into a non-empty folder.
  • --username: your publisher username; if omitted it comes from login, otherwise you are asked.
  • --ui / --background: template; with neither you get both.

The kit's node nuvaka-apps-sdk/create-extension/bin/create-extension.js <name> [options] runs the same command.

lint

nuvaka-ext lint [folder|file.nvx] [--dir <folder>] [--remote] [--key <name>] [--api <url>]

Manifest schema, file types and sizes, forbidden patterns, and whether nuvaka.<name> uses match permissions. Exit code 1 on errors. Checklist: Security rules.

The newer fields follow the same rules and error texts as the server:

  • dependencies: at most 10; each item { id, version, optional? }; version must be a valid version range (no prereleases, no ||); self-dependency and duplicate IDs are errors. Store presence, cycles, depth (≤ 5) and total packages (≤ 10) are checked at publish time; lint reminds you with a warning (look with nuvaka-ext deps).
  • contributes: only storage.fileAction and storage.openWith; 1–10 items per point; page must be in pages; entry.ui required; each item needs extensions or mimeTypes; mode is read/readwrite; item ids unique across the extension. With contributes you get an "every version goes to review" warning.
  • --remote: sends the package to the server for checking without publishing (needs a token).
  • --key: signing key for --remote (needed if your account has a key registered).
$ nuvaka-ext lint examples/apps/github-watcher
tarikgkhsn.github-watcher 0.1.0 — 7 dosya, açılmış 16.1 KB, paket 8.1 KB
Tamam: 0 uyarı

pack

nuvaka-ext pack [folder] [--dir <folder>] [--out <file|folder>]

Builds a deterministic .nvx (sorted entries, fixed timestamps) and prints its SHA-256 and size. No package is built if lint finds errors. Left out of the package: .git, node_modules, test/tests/__tests__/__mocks__/coverage folders, *.test.*/*.spec.*, dot files, *.nvx, a root package.json, lock files, tsconfig.json/jsconfig.json, vitest.config.*/vite.config.*.

keys and sign

nuvaka-ext keys create [name] [--force]    # default name: default
nuvaka-ext keys list
nuvaka-ext sign <file.nvx> [--key <name|path>]

The private key is written to ~/.config/nuvaka/keys/<name>.key, readable only by you (0600); the first key becomes the default. Add the public key to your account in the app under Profile › Developer › Publisher signing keys (this needs an app session; it cannot be done with a developer token). sign signs the raw 32-byte SHA-256 digest of the package with Ed25519.

login, logout, whoami

nuvaka-ext login --token nvd_… [--api <url>] [--username <name>] [--no-verify]
nuvaka-ext logout
nuvaka-ext whoami [--api <url>]

Create the token in the app under Profile › Developer › Developer tokens; it starts with nvd_, is shown once, is valid for 1 year, only works on publisher endpoints and can be revoked at any time. login verifies the token with the server and saves it to ~/.config/nuvaka/credentials.json (0600). --no-verify saves without verifying. whoami prints your username and extensions.

publish

nuvaka-ext publish [folder] [--dir <folder>] [--changelog "…"] [--changelog-en "…"] [--key <name|path>] [--no-sign] [--api <url>]

Packs (stops on lint errors), signs if a key is available, and uploads. The result:

  • published — live;
  • review — waiting for review (a publisher's first extension, a version asking for critical permissions, a new version of a verified extension, or a version with contributes; see Review & publishing rules);
  • rejected — scan findings are printed, exit code 1.

Key selection: --key › NUVAKA_KEY › default key › the only key. --changelog (Turkish) and --changelog-en (English) up to 2000 characters each. --no-sign uploads unsigned (rejected if your account has a key registered). Packages are limited to 20 MB.

publish, listing (changes), media upload and abandon require a verified email. Otherwise the server returns 403 email_not_verified and the CLI tells you what to do: in the app, use Send verification code under Profile › Developer, enter the code from your email and run the command again. lint --remote works without it.

listing and media

The Store listing is separate from the package and changes without a new version. Rules: Store listing.

nuvaka-ext listing <id> [--style compact|wide] [--tagline-tr "…"] [--tagline-en "…"] [--api <url>]
nuvaka-ext media list <id>
nuvaka-ext media upload <id> --kind banner|video|screenshot <file>
nuvaka-ext media delete <id> <mediaId>
  • listing without options shows the current listing. --style: compact (small card) or wide (wide card; the banner/video is featured). --tagline-tr/--tagline-en: at most 90 characters; "" removes that language, and a language you don't pass keeps its value.
  • media upload: the type is read from the content, not the file name. banner png/jpeg/webp ≤ 2 MB, width ≥ 640 px, aspect 1.6–2.2; video mp4/webm ≤ 20 MB; screenshot png/jpeg/webp ≤ 2 MB, at most 8. There is one banner and one video; a new one replaces the old one.
  • media list lists the card style, tagline and media (ID, kind, size, hidden reason); media delete deletes the media item with the given ID.

deps

nuvaka-ext deps [<id>@<version> | <id> | folder] [--api <url>] [--json]

Resolves the dependency tree against published versions in the Store (GET /api/ext/v1/store/{id}/dependencies; no login needed). For each dependency it prints the highest published version satisfying the range, the depth, who requires it, whether it is optional or abandoned, and errors. Exit code 1 if a required dependency cannot be resolved.

  • <id>@<version>: a specific version in the Store; <id> without a version means the latest.
  • folder (default .): the local nuvaka.json. If that version is not published, each direct dependency is resolved separately in the Store (showing whether its latest version satisfies the range); at publish time the server resolves the tree again together with the root.
$ nuvaka-ext deps [email protected]
tarikgkhsn.invoices 1.3.0
  ✓ tarikgkhsn.rates-service 1.4.2  (^1.2.0)
    ✓ ali.http-helper 2.0.1  (2.x) ← tarikgkhsn.rates-service
  ✗ ali.charts -  (~3.0) [isteğe bağlı, eksik] — ali.charts için ~3.0 aralığını karşılayan yayında sürüm yok
Toplam paket (kök dahil): 4 / 10
Kurulabilir

Rules and install flow: Dependencies.

abandon

nuvaka-ext abandon <id> [--hide-name] [--yes] [--api <url>]

Abandons a package (POST /api/ext/v1/dev/extensions/{id}/abandon): it stays in the Store at its last version and people who installed it keep using it; you can no longer upload new versions. Developers of dependent extensions and users who installed it are notified. Another developer can request to adopt it; if Nuvaka approves, the package moves to them with the same ID. You cannot undo this yourself.

  • --hide-name: hide your name; the card and detail page say "former developer" (the ID prefix, i.e. your username, does not change).
  • --yes: don't ask for confirmation (CI). In an interactive terminal you are asked to type the ID again.

A package other extensions depend on cannot be deleted (has_dependents); abandoning is the way out. The same is available in the app under Profile › Developer › My apps. Rules: Abandoned packages and ownership.

dev

nuvaka-ext dev [folder] [--dir <folder>]

Watches the folder and runs lint on every change (exit with Ctrl+C). For those running the app from source it also prints the command that loads the folder at startup:

# in the generalappclient folder (only debug builds load it)
NUVAKA_EXT_DEV_DIR='/path/hello' npm run tauri dev
# PowerShell
$env:NUVAKA_EXT_DEV_DIR="C:\path\hello"; npm run tauri dev

Several folders are separated with the operating system's path separator (: on Linux/macOS, ; on Windows). Folders are loaded when the session starts; reload in the app after a change. In the released app, Apps › Manage apps › Load from folder does the same (with developer mode on in the Profile tab).

test

nuvaka-ext test [folder] [--dir <folder>] [-- vitest options]

Runs npx vitest run in the extension folder; anything after -- goes to vitest. Tests use the mock nuvaka from @nuvaka/extension-sdk/testing (SDK).

Environment variables

VariableMeaning
NUVAKA_TOKENdeveloper token (CI); takes precedence over the saved token
NUVAKA_APIAPI URL (default https://generalappapi.nuvaka.com)
NUVAKA_KEYsigning key name or file path
NUVAKA_CONFIG_DIRconfig folder (default ~/.config/nuvaka)

CI example

# Secrets: NUVAKA_TOKEN (nvd_…) and the signing key file
# Pin the kit version and digest in your CI settings (SDK_VERSION, SDK_SHA256)
curl -fsS -o sdk.zip "https://generalappapi.nuvaka.com/api/ext/v1/sdk/download/$SDK_VERSION"
echo "$SDK_SHA256  sdk.zip" | sha256sum -c -
unzip -q sdk.zip -d "$RUNNER_TEMP"
NX="node $RUNNER_TEMP/nuvaka-apps-sdk/extension-cli/bin/nuvaka-ext.js"
$NX lint
NUVAKA_KEY=./ci.key $NX publish --json --changelog "$CHANGELOG"

Nuvaka Apps API v1 · last updated 2026-10-17