Skip to main content

Appnest Development Engine - Commands

Quick reference for appnest-development-engine CLI actions. All app commands are invoked as:

appnest-development-engine app <action>

Run these from your app project directory (where app-backend / app-frontend live) unless noted. The engine resolves paths from process.cwd() and passes ORIGINAL_CWD to the proxy and Vite builds.


Command summary​

ActionPurpose
initScaffold or refresh the standard Appnest app layout in the current folder (base code from GitHub). Use once or when you need a fresh template.
precheckVerify Node.js ≥ 22 and that every engine + app path the CLI knows about exists on disk. Fails fast with guidance if something is missing.
install-packagesRun npm install inside each engine package: appnest-backend, appnest-frontend, appnest-install-frontend, appnest-proxy. Use after cloning the engine or changing engine dependencies.
startStart the proxy only; the proxy then starts the backend wrapper, main Vite app, and (if present) the installation Vite app. This is the main local dev entry point (single port, unified routing).
bundle-frontendProduction build for both engine frontends (npm run build in appnest-frontend and appnest-install-frontend). Output is written into your app-frontend/dist and app-install-frontend/dist via ORIGINAL_CWD.
packRuns bundle-frontend, adjusts app-frontend/dist/index.html paths where needed, copies app-frontend, app-backend, app-install-frontend, manifest.json, and optionally extra folders/files from .env (PACK_FOLDER_PATHS, PACK_FILE_PATHS) into appnest-app-pack/, then zips to app-pack-zip/app-pack-<timestamp>.zip.
validateRun linting (and related validation) on app-backend and app-frontend, and validate manifest.json.
ai-contextDownload AI context from GitHub into appnest-ai-context/ at project root. Replaces existing folder if present.

Other invocations​

InvocationPurpose
appnest-development-engine --versionShow engine version from root package.json.
appnest-development-engine helpPrint the built-in short list of app actions.
appnest-development-engine app (no param)Same as above - lists all app actions.
appnest-development-engine app helpSame as above.
appnest-development-engine app -hSame as above (Commander built-in help).

Notes​

  • install-packages does not run npm install in the user's app-backend / app-frontend; those are your app's own dependencies-install them in those folders as usual.
  • app-install-frontend is optional; if the folder is missing, install UI is skipped and zip may warn for that path.
  • Engine folder appnest-install-frontend serves the user folder app-install-frontend (names differ on purpose).
  • pack reads .env for optional PACK_FOLDER_PATHS and PACK_FILE_PATHS (JSON arrays or comma-separated). If set, those folders and files are copied into the pack.

Setup App​

  1. In the app project directory: appnest-development-engine app init (if needed).
  2. appnest-development-engine app precheck (optional).
  3. appnest-development-engine app install-packages (after cloning or updating the engine).
  4. From the app project directory: appnest-development-engine app start → proxy on port 3456, e.g. http://localhost:3456/app-frontend/, API at http://localhost:3456/app-backend/.

Start App​

  1. CLI starts appnest-proxy with ORIGINAL_CWD = current working directory.
  2. Proxy reads .env, allocates ports, then:
    • Starts appnest-backend (user's app-backend/server.js).
    • Starts appnest-frontend (Vite for app-frontend).
    • If app-install-frontend exists, starts appnest-install-frontend.
  3. Routes (defaults; ports from .env where applicable):
    • /app-backend → backend
    • /app-frontend → main frontend
    • /app-install-frontend → installation UI
  4. Watching: app-backend changes restart the backend; vite.config.js / .env changes can restart frontends; ordinary source edits use Vite HMR.

Pack App​

  • pack runs bundle-frontend, may rewrite paths in app-frontend/dist/index.html, copies app-frontend, app-backend, app-install-frontend, manifest.json, and optionally extra folders/files from .env (PACK_FOLDER_PATHS, PACK_FILE_PATHS) into appnest-app-pack/, then creates app-pack-zip/app-pack-<timestamp>.zip.