The cartbase app commands

All of them need cartbase login first: the login is bound to one store and every command acts on that store.

Command What it does
cartbase app create <key> [--name] [--description] Writes the app folder: cartbase.app.json, AGENTS.md, README.md. Inside a storefront project the folder is apps/<key>/.
cartbase app validate [dir] Posts the manifest to the platform and prints its verdict: valid, with the screens it would show, or one line per problem.
cartbase app deploy [dir] Compiles the manifest's functions (each entry file into one module under .cartbase/functions/), then creates or updates the app on the store, sending the whole folder with the manifest: the platform keeps it as the version's files, the copy the index installs and cartbase app pull writes back (at most 3 MB of source; media belongs in the store's Files). Prints the records, screens, fields, functions with what runs them, access and the app's admin address. The first deploy prints the app key once and writes it to the project's .env.local.
cartbase app run <function> [--input '<json>' | --input-file <path>] [--app <key>] Runs one of the app's functions now on the platform and prints the outcome: the state, the time, the log, the result or the error. Inside the app folder the app is the manifest's; elsewhere --app names it. Exits 1 when the run failed.
cartbase app runs [--limit <n>] [--function <key>] [--app <key>] The latest runs of the app's functions off the store's execution ledger, newest first: when, the state, the function, what started it, the time, the error.
cartbase app publish [dir] [--private] Puts the app in the index, the list every store's Apps page shows, as author/key: the author is your store's handle, set at the first publish. Needs the current version to carry its files (a deploy from the CLI does). Every later deploy is offered to the stores that installed it as an update they apply themselves. --private takes it out again; installs keep what they have.
cartbase app index [--q <text>] The index: every public app, ranked by installs then freshness, each as author/key with its version, installs, and whether it is a fork or already on your store. --q searches name, description, author and key.
cartbase app install <author/key | owner/name | url> [--dir] Installs an app: author/key from the index (the origin's newest version deployed into your store as a new app that records where it came from), or a public repository read once (a fork with nothing upstream). Writes the files under apps/<key>/, prints the key once. A bare owner/name that is not in the index is tried as a repository.
cartbase app update <key> [--apply] [--dir] The newer version the app's author published, as a diff: the manifest's changed paths and the files added, changed and removed against what your store runs (a copy edited here is compared with its own changes). Nothing is applied until --apply, which deploys the new version into your store under the deploy's own rules and writes its files.
cartbase app pull <key> [--dir] Writes the files your store runs, the newest version's, into the app folder.
cartbase app propose [dir] --note "<text>" From an app installed from the index: offers this folder back to its author as a proposal, with the note. The author sees the diff on their app's home and accepts (it becomes the app's next version, offered to every install) or refuses.
cartbase app share [dir] Mirrors the folder as a public repository under the Cartbase organisation, README and MIT licence added. Sharing again refreshes the same repository.
cartbase app uninstall <key> [--remove-files] Deletes the app from the store: its record types and records, its settings and secrets, its key, at once. Run cartbase apps export <key> first if you want the data. The local folder stays unless --remove-files.

The app rows are also plain resources of the admin API, so the generated commands work too:

cartbase apps list
cartbase apps get store-locator
cartbase apps settings store-locator
cartbase apps update-settings store-locator --data '{"default_zoom": 9}'
cartbase apps keys store-locator
cartbase apps rotate-key store-locator
cartbase apps disable store-locator
cartbase apps enable store-locator
cartbase apps export store-locator

A rotated key is printed once, in that answer; every older key stops working the moment it is issued.