@olenbetong/appframe-cli
v4.4.5
Published
Utility functions for AppframeWeb
Readme
Appframe CLI
Utility commands for deploying and maintaining Appframe Web applications.
Installation
pnpm install --save-dev @olenbetong/appframe-cliCommands
Use af <command> --help for full usage with options.
Core
af update: Installs latest@olenbetong/appframe-cliglobally. If in a workspace, also updates local dev dependency when present.af launch:- Opens the updater web app. Options:
--server <host>(defaultdev.obet.no),--all,--browser <chrome|firefox|msedge>.
- Opens the updater web app. Options:
af auth [env]:- Logs in to
dev|stage|prod(or a hostname) and stores session cookies in~/.af. Options:--username <user>.
- Logs in to
af auth-cookie [env]:- Prints the auth cookie string for scripting.
envas above.
- Prints the auth cookie string for scripting.
Change Management
af namespace-to-prod [namespace](aliasntp):- From dev → stage → prod: generate + deploy on dev, download+apply+deploy on stage, and download on prod.
- Options:
--skip-generate(dev),--apply(apply on prod after download),--hold(put transactions on hold on prod/test).
af generate [namespace]:- Generates transactions on a server and lists them. Options:
--server <host>(defaultdev.obet.no).
- Generates transactions on a server and lists them. Options:
af list [namespace]:- Lists transactions to apply or deploy. Options:
--server <host>--type <apply|deploy>(interactive prompt if TTY; defaults toapplyin non‑TTY)--group(show count per namespace)
- Lists transactions to apply or deploy. Options:
af apply [namespace]:- Applies updates. Interactive confirmation by default. Options:
--server <host>(defaulttest.obet.no)--preapprove <name>(repeatable; names to apply without prompt)
- Applies updates. Interactive confirmation by default. Options:
af deploy [namespace]:- Deploys transactions. Options:
--server <host>.
- Deploys transactions. Options:
af check-updates:- Shows how many updates are available to download per namespace. Options:
--server <host>.
- Shows how many updates are available to download per namespace. Options:
af download [namespace]:- Downloads transactions. Options:
--server <host>.
- Downloads transactions. Options:
Data Resources (Data API)
af resources list [search]:- Lists available resources (table/view/procedure). Options:
--server <host>.
- Lists available resources (table/view/procedure). Options:
af resources view [resource]:- Prints the resource definition. Options:
--server <host>.
- Prints the resource definition. Options:
af resources generate <resource>:- Generates a data object or procedure client snippet. Common options:
--id <id>(defaultdsDataObject)--global(useaf.dataglobals)--types(include generated TS types)--fields [f1,f2](limit fields; supports interactive selection with--fields)--permissions <IUD>(Insert/Update/Delete flags)--max-records <n>(default50for data objects)--sort-order <field:Asc|Desc|AscNullsLast|DescNullsFirst,...>--master <Name[:path]>and--link-fields <this:master,...>--expose [id](expose onaf.article.dataObjects)--dynamic,--unique <table>--overrides "Field:Type,Param:Type"--group-by <a,b>,--aggregates <Field:SUM,...>,--distinct,--where <clause>
- Generates a data object or procedure client snippet. Common options:
af resources add <id>: Adds a data resource by DB object id. Options:--server <host>,--name [name].af resources delete <id>: Deletes a data resource by id or name. Options:--server <host>.
Bundles
af bundle create: Scaffold a new bundle project.af bundle upload [package]:- Packs and uploads an npm package as a bundle. Options:
--bundle <name>to override default.
- Packs and uploads an npm package as a bundle. Options:
af bundle publish [package]:- Publishes the latest bundle version and deploys it (dev→stage→prod download). Uses current package if none provided.
Website Assets
af assets deploy:- Uploads site scripts, styles, and templates based on
package.json.appframe.assets. - Options:
--server <host>(defaultdev.obet.no),--no-test,--production,--hostname <host>(limit to one site).
- Uploads site scripts, styles, and templates based on
af assets publish:- Publishes uploaded assets with a description
v<version> (<git sha>). - Options:
--server <host>,--hostname <host>.
- Publishes uploaded assets with a description
