.dev

Feeef CLI

@feeef.dev/cli — sign in with OAuth, scaffold storefront templates, live-preview drafts on your real store, and publish to the marketplace.

The CLI is the tool for template authors: scaffold a theme, preview it on a live store without customers seeing anything, then publish to the marketplace. It is itself a public OAuth client with PKCE — a working reference for CLI-style integrations.

npm install -g @feeef.dev/cli
feeef --help
Package@feeef.dev/cli
Binaryfeeef
Config~/.config/feeef/config.json (0600 permissions)
RequiresNode 18+; no private repos needed to build or preview

Quick start

npm install -g @feeef.dev/cli
feeef signin                          # browser OAuth (no client secret)
feeef template init my-template --blank
cd my-template
feeef use                             # pick a store you own
npm run build
npm run dev                           # draft preview URL opens in browser
npm run publish -- --apply            # go live (explicit)

Authentication

feeef signin opens the browser to the Feeef consent screen and completes an authorization-code + PKCE flow — no client secret ever touches your machine:

DetailValue
Client typePublic (token_endpoint_auth_method: none)
Redirecthttp://localhost.feeef.org:7777/oauth/callback, bound to 127.0.0.1
Scopesauth store store.settings store_templates store_templates.read — never *
feeef signin                    # browser OAuth → token saved to config
feeef signin --password-auth    # interactive email/password fallback
feeef whoami
feeef signout
feeef config show
feeef config set apiUrl https://api.feeef.org/v1

Environment overrides: FEEEF_OAUTH_CLIENT_ID, FEEEF_ACCOUNTS_URL, FEEEF_API_BASE_URL (and FEEEF_OAUTH_CLIENT_SECRET only for confidential local overrides).

Template workflow

Templates are plain Node.js packages; the npm scripts wrap the global feeef binary.

feeef template init my-template       # blank scaffold, marketplace copy, or --git
cd my-template
feeef use <store-slug>                # binds template ↔ store via .feeefrc

feeef template add page products
feeef template add component products grid --title "Product grid"

npm run build                         # → dist/data.json (+ dist/schema.json, locales)
npm run check                         # validate
npm run dev                           # remote draft preview
npm run publish -- --apply            # marketplace upload + install on store

Source layout of the blank kit:

schema.ts                 # template-owned editor schema
pages/<page>/components/  # flat TSX sections → published sections.main
shared/ | library/        # reusable custom components
locales/*.json            # translations
feeef.template.json       # template manifest
dist/data.json            # TemplateData build output
dist/schema.json          # merged editor schema

Components are flat TSX files: export const meta plus a function App(). The full authoring contract is in Storefront templates.

Draft preview — how dev works

feeef template dev does not run a local storefront. It watches your sources, rebuilds dist/data.json, and uploads it as a draft to your real hosted shop:

Draft previewLive shop
Written byfeeef template devpublish --apply / merchant editor
Stored instore.metadata.templatePreviewstore.metadata.templateData
Visible toYou (preview link / cookie)Customers

The preview URL sets an httpOnly feeef_preview cookie, so you can navigate the whole shop — home, product lists, product pages, checkout — under the draft theme while the catalog stays real. A banner shows "Previewing draft template — Exit"; exit via the banner, /?preview=0, stopping the CLI, or the ~24 h token TTL.

dev never overwrites live templateData. But your CLI apiUrl must match the API the shop uses — a hosted *.feeef.store shop loads drafts from production, so feeef config set apiUrl https://api.feeef.org/v1 before feeef template dev.

Publish

# Free public listing + release
feeef template publish --public --apply

# Paid listing (you set the price; Feeef takes a platform cut)
feeef template publish --public --price 5000 --version 1.0.0 \
  --changelog "Initial marketplace release" --apply

One publish writes several resources:

TargetContent
store_templatesMarketplace listing + head schema/data + price
store_template_releasesImmutable semver snapshot + changelog
template_componentsYour shared/ + library/ components
store_template_localesdist/locales/*.json
Install (with --apply)Pins the store to the release → live templateData

Without --apply, the listing and release update but installed stores keep their current version until the merchant installs/updates. Merchants who buy a paid template own it forever on that store; paid templates cannot be forked into a new catalog row.

Command reference

CommandPurpose
feeef signin / signout / whoamiSession management (OAuth or --password-auth)
feeef use [store]Bind the current template to a store (.feeefrc)
feeef template initScaffold: blank, from git, or from a marketplace template
feeef template add|remove page|componentScaffold edits
feeef template build / check / watchCompile and validate to dist/
feeef template devRemote draft preview (--local exists for storefront developers)
feeef template publish [--public] [--price N] [--apply]Upload to marketplace, optionally install
feeef config show|setGlobal config (apiUrl, accountsUrl, …)

On this page