Appearance
CLI reference
Every foliwake command. Most are thin wrappers over one foliwake-core operation; preview and publish outside a linked project folder still call the engine directly until they move onto core (in a linked folder they are project preview and project publish, on core), and the server processes are listed in their own section. The command sections below are generated (pnpm cli:reference); do not edit them by hand.
How every command works
Configuration file. A command that acts on a site locally reads a project configuration, in this order: --config <file>, then FOLIWAKE_CONFIG, then foliwake.config.json in the current folder (not its parents). A file found in the folder that names credentials, storage or remote addresses is used only after you trust it on this computer with foliwake config trust; any change to the file makes it untrusted again. A minimal project file (code and local content only) needs no trust; it serves dev and page check, and work on a bucket refuses it with SITE_HAS_NO_STORAGE. Without a configuration the command stops with CONFIG_REQUIRED. To create one, run foliwake create, or foliwake admin --config foliwake.config.json --create, or follow the quickstart. See configuration and storage.
Server. Commands with a --server flag can run against a Foliwake server instead. They go to --server, else to the local configuration named by --config, else to the one named by FOLIWAKE_CONFIG, else to the server of the folder's .foliwake/connection.json, else to FOLIWAKE_SERVER, else to foliwake.config.json in the current folder, else to the server of your last foliwake login. From the next @foliwake/cli release (the engine pins 0.7.0 until it moves to it) an explicit FOLIWAKE_SERVER comes before FOLIWAKE_CONFIG, so a server named in CI or inside the Docker image (which sets FOLIWAKE_CONFIG for its own commands) is reached. In CI, set FOLIWAKE_SERVER and FOLIWAKE_TOKEN. See accounts, roles and sign-in.
--site <id>. The site, from the configuration. It can be left out when the file lists one site.
--json. Prints the operation's answer as JSON instead of text. An error is JSON too: {"error": {"code", "message", "category", "retryable"}}.
--input '<json>'. The whole input of the operation, for what flags cannot express; it replaces the other input flags. The operation's own schema checks it, and an unknown key is refused.
bash
foliwake site status --input '{"site":"mysite"}' --json--debug. Prints on stderr what an answer leaves out: the underlying error with its paths, and why a plugin failed. This text can hold paths and secrets; do not paste it into a ticket unread.
Exit codes.
| Code | Meaning |
|---|---|
| 0 | Done |
| 1 | The operation failed, page check found errors, or source plugins found problems |
| 2 | The command line is wrong: an unknown flag, a missing argument, or a write without what it expects |
| 3 | A write to live committed, but its cache refresh was still pending when the wait ended (release rollback, code release, code rollback, code prepare making release 1, page unpublish, migration commit, operation recover --wait); operation recover --wait finishes it |
| 130 | Cancelled with Ctrl+C (create) |
What a write expects. A command that changes what visitors or reviewers see names what it saw, and is refused when that changed meanwhile: the live release (--expect sr_…, or --latest-live to read it once now), the reviewed preview (migration commit --expect sr_…@cd_…), or a branch's selection (--expect sel_…, none for no preview, --latest-selection, or a deployment's --sequence). Writes that change neither take none: code prepare (a new immutable code release; on a site without a live release it is the exception that changes live, since it makes release 1), source sync, branch bootstrap (only creates the default branch), site adopt and source adopt-pages (bind or assign only what is unowned).
Long operations. Writes answer the operation (--json prints it: its kind, state, steps, delivery, result and error); the command follows it to its end. operation get|list|recover look at it later.
Commands
foliwake account bootstrap
Create the first account of this server (admin of the default organisation) and print its sign-in link
text
foliwake account bootstrap [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--email <value> | e-mail address of the owner |
--json | Format output as json. |
--public-origin <value> | where browsers reach this server (default: $FOLIWAKE_PUBLIC_ORIGIN) |
bash
foliwake account bootstrap --email owner@example.com --public-origin https://foliwake.examplefoliwake account invite
Invite an e-mail address into an organisation with a role (accepted when it signs in, within 7 days)
text
foliwake account invite [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--email <value> | e-mail address to invite |
--json | Format output as json. |
--live | a developer may also release to live |
--org <value> | organisation |
--public-origin <value> | where browsers reach this server (default: $FOLIWAKE_PUBLIC_ORIGIN) |
--role <value> | role in the organisation |
--site <value> | only this site of the organisation (repeat for several; default: all of them) |
bash
foliwake account invite --email author@example.com --role author
foliwake account invite --email dev@example.com --role developer --live --org acme --site acme-docsfoliwake account keys create
Make a CI key: it may only deploy code and update branch previews of the named sites (role ci); shown once, kept as a hash (core account.keys.create)
text
foliwake account keys create [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--json | Format output as json. |
--label <value> | what the key is for, e.g. the pipeline (shown in account keys list) |
--org <value> | the organisation of the sites (default: the only one you administer) |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | a site the key may release code of (repeat for several) |
bash
foliwake account keys create --site my-site --label "GitHub Actions" --server https://admin.example.comfoliwake account keys list
Your signed-in computers and the CI keys of the organisations you administer; never a key itself (core account.keys.list and account.keys.ci)
text
foliwake account keys list [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
bash
foliwake account keys list
foliwake account keys list --jsonfoliwake account keys revoke
Revoke a key at once: a CI key of an organisation you administer (ci_…), or one of your signed-in computers (key_…) (core account.keys.revoke)
text
foliwake account keys revoke [KEY] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
bash
foliwake account keys revoke ci_0123456789abcdeffoliwake account link
Print a one-time sign-in link for an existing account (a server without mail)
text
foliwake account link [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--email <value> | e-mail address of the account |
--json | Format output as json. |
--public-origin <value> | where browsers reach this server (default: $FOLIWAKE_PUBLIC_ORIGIN) |
--return-to <value> | path to open after signing in |
bash
foliwake account link --email author@example.comfoliwake art pull
Copy the Drive art folder of a git-markdown source into a local folder (only changed files)
For a git-markdown source with "driveImages" (lesson text in Git, images in a Google Drive folder): copies the pictures a sync would read into your working copy, so foliwake dev, page check and Markdown editors show them. Run it in the source's pages folder of your Git working copy (or name it with --root): - art keys (): every variant of every key of the art manifests (the shared library in the Drive art folder and the repository's own manifest in --root) goes to "<root>/_art/<variant>/<key>.<ext>", where the engine resolves a key by the page's country, else "default"; --country limits it to the default pictures and those countries; - relative paths below the prefix: the whole Drive art folder goes to "<root>/<prefix>" (e.g. ./art), or --to. Both folders belong in .gitignore. It uses the source's settings and credentials from the project configuration (the credential variables must be set in this environment) with the read-only Drive scope, and checks every download against Drive's checksum or the manifest's. A second run downloads only files whose Drive ID or checksum changed; the record of what it wrote is ".foliwake-art.json" in each folder. A file that is no longer in Drive is removed only when this command wrote it and it is unchanged on disk; nothing outside the two folders is touched, and a file changed locally is kept and reported. Shortcuts, Google files, other file types, hidden or unsafe names, duplicate names and keys that cannot be resolved are skipped and listed, as a sync would refuse them. Exit status 1 when a file could not be downloaded.
text
foliwake art pull [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--country <value> | art keys: only the default pictures and this country's overrides (repeatable; default: all) |
--debug | print the underlying error, paths included, on stderr |
--json | Format output as json. |
--root <value> | the source's pages folder in your working copy (default: this folder) |
--site <value> | site id from the project configuration (required when it lists several sites) |
--source <value> | the git-markdown source with "driveImages" |
--to <value> | the folder of the path mirror (default: <root>/<prefix>, e.g. ./art) |
bash
foliwake art pull --source lessons
foliwake art pull --source lessons --root ../site-lessons --country gefoliwake blocks new
Create a block: components/<name>/ with its definition, stylesheet and optionally JavaScript and examples
Writes components/<name>/<name>.json (a title and text, with labels and $schema), <name>.css (in @layer blocks, scoped to [data-component="<name>"], using the site's CSS variables) and, with --js or --react, <name>.js using block-kit (import { defineBlock, html } from '@foliwake/block-kit', served by the engine; --js also adds its labels ui and its events to the definition, --react adds scripts/react-view.js when the project has none). --example adds <name>.example.md with two examples. Existing files are never replaced. The new files are checked with the same rules as page check and code prepare before they are written. Also writes the JSON Schema for editors to .foliwake/schemas/ and the blocks' types to .foliwake/types/.
text
foliwake blocks new [NAME] [flags]| Flag | Description |
|---|---|
--code <value> | the code folder with components/ (default: the current folder) |
--example | add <name>.example.md (block examples) |
--help | Show CLI help. |
--js | add <name>.js using block-kit |
--react | add <name>.js that renders with React (block-kit ctx.mount and scripts/react-view.js): the shell's host.react, else the vendored scripts/vendor/react.js when the project has it (create --react) |
bash
foliwake blocks new callout
foliwake blocks new quiz --js --example
foliwake blocks new rating --react --code ../sitefoliwake blocks render
Render the block examples into HTML fragments and story files (for Storybook)
Every example of components/<name>/<name>.example.md goes through the page pipeline, as on /_dev/blocks. Written to --out: <block>/<example>.html (the engine's HTML), <block>/<example>.json (block, example, the stylesheets and scripts it needs), <block>.stories.js (a story module for @storybook/html-vite that mounts the fragments and calls each block's init(root, host, meta)), _foliwake/block-kit.js and _foliwake/lit-html.js (a copy of block-kit, the module @foliwake/block-kit that blocks import: alias @foliwake/block-kit to it, as the configuration of create --storybook does) and manifest.json (the index). Paths are relative to the code folder; image URLs are /components/…. Foliwake owns the output folder: every run builds it afresh and swaps it in, so do not put your own files in it. A non-empty folder that this command did not write (no .foliwake-blocks-render marker), a malformed manifest.json or a linked folder is refused, and nothing is changed. Exit status 1 when an example has errors (it is left out).
text
foliwake blocks render [flags]| Flag | Description |
|---|---|
--code <value> | the code folder with components/ and styles/ (default: the current folder) |
--help | Show CLI help. |
--lang <value> | language of the block labels used as story titles (default: en) |
--out <value> | output folder, relative to the code folder (default: .foliwake/stories) |
--watch | render again after every change of components/, scripts/ or styles/ (Ctrl+C to stop) |
bash
foliwake blocks render
foliwake blocks render --watch
foliwake blocks render --out build/stories --code ../sitefoliwake blocks schema
Write the JSON Schema of block definitions for editors, or print it
Writes the schema of components/<name>/<name>.json to .foliwake/schemas/block-1.schema.json in the code folder, the file the $schema of each definition names (git-ignored; run again after updating the engine). With --print it goes to standard output instead. foliwake dev serves it at /_foliwake/block-1.schema.json.
text
foliwake blocks schema [flags]| Flag | Description |
|---|---|
--code <value> | the code folder (default: the current folder) |
--help | Show CLI help. |
--print | print the schema instead of writing it |
bash
foliwake blocks schema
foliwake blocks schema --print > block.schema.jsonfoliwake branch bootstrap
Once: seed the default branch preview from live code; a no-op when it exists (core branches.bootstrap)
text
foliwake branch bootstrap [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake branch bootstrap
foliwake branch bootstrap --site a --jsonfoliwake branch delete
Stop serving a branch preview (its hosts answer 404); its code and selection history stay (core branches.remove)
text
foliwake branch delete [BRANCH] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
| `--expect <sel_… | none>` |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--latest-selection | expect the branch's selection as it is now (read once, before the request) |
--sequence <value> | deployment ordering (a positive integer such as the CI run id), instead of --expect: refused as superseded when a request with a higher sequence already updated or deleted this branch |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake branch delete feature/hero --expect sel_…
foliwake branch delete feature/hero --latest-selection
foliwake branch delete feature/hero --sequence <ci run id> --jsonfoliwake branch history
Selection history of one branch (core branches.history)
text
foliwake branch history [BRANCH] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake branch history main
foliwake branch history feature/hero --site a --jsonfoliwake branch list
Branches, their code and preview URLs (core branches.list)
text
foliwake branch list [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake branch list
foliwake branch list --site a --jsonfoliwake branch update
Prepare code from a commit (or use --code) and show it in that branch preview; live is unchanged (core branches.update)
text
foliwake branch update [BRANCH] [flags]| Flag | Description |
|---|---|
--code <value> | an already prepared code release (cd_…) instead of preparing one |
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
| `--expect <sel_… | none>` |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--latest-selection | expect the branch's selection as it is now (read once, before the request) |
--rev <value> | the commit to prepare the code from, a branch, tag or full SHA (default HEAD) |
--sequence <value> | deployment ordering (a positive integer such as the CI run id), instead of --expect: refused as superseded when a request with a higher sequence already updated or deleted this branch |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake branch update feature/hero --rev feature/hero --latest-selection
foliwake branch update feature/hero --code cd_… --expect sel_…
foliwake branch update feature/hero --rev <sha> --sequence <ci run id> --jsonfoliwake code deploy
Deploy a commit of the site's frontend: prepare it, rebuild every page against it in preview and, with codeRelease auto, release exactly that pair when its checks pass (core code.deploy). Its progress goes to stderr while it runs (one JSON event per line with --json); operation list shows it too
text
foliwake code deploy [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--rev <value> | the full commit SHA to deploy |
--sequence <value> | deployment ordering, e.g. a CI run id; an older one than live code is not released |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake code deploy --rev <40-hex sha> --sequence <ci run id> --jsonfoliwake code prepare
Copy JS/CSS from a clean commit into an immutable code release; on a site with a live release, live and preview are unchanged. On a site without one it changes live: it makes release 1, this code and no pages, and waits for its cache refresh (core code.prepare)
text
foliwake code prepare [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--rev <value> | the Git revision to copy, a branch, tag or full SHA (default HEAD); the checkout must be clean |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--wait-timeout <value> | limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s); still pending then: exit 3, operation recover finishes it |
bash
foliwake code prepare
foliwake code prepare --rev feature/hero
foliwake code prepare --rev <sha> --jsonfoliwake code release
Make a prepared code release live code; pages stay as they are; refused when live is not the release you expected (core code.release)
text
foliwake code release [CODE] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--expect <value> | the live site release you saw (sr_…, as site status shows it); refused when live is another one |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--latest-live | expect the live release as it is now (read once, before the request) |
--rev <value> | the commit the code was prepared from (full SHA), when it was prepared from several |
--sequence <value> | deployment ordering, e.g. a CI run id: refused as superseded when live code was released with a higher one |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--wait-timeout <value> | limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s); still pending then: exit 3, operation recover finishes it |
bash
foliwake branch list # code ids per branch
foliwake code release cd_… --expect sr_…
foliwake code release cd_… --latest-live --rev <sha> --sequence <ci run id> --jsonfoliwake code rollback
Make earlier live code live again; pages stay as they are; refused when live is not the release you expected (core code.rollback)
text
foliwake code rollback [TO] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--expect <value> | the live site release you saw (sr_…, as site status shows it); refused when live is another one |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--latest-live | expect the live release as it is now (read once, before the request) |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--wait-timeout <value> | limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s); still pending then: exit 3, operation recover finishes it |
bash
foliwake site status --json # earlier code ids are listed under history
foliwake code rollback cd_… --expect sr_…
foliwake code rollback cd_… --latest-livefoliwake config trust
Trust a project configuration on this computer, so commands run in its folder may use it without --config
text
foliwake config trust [FILE] [flags]bash
foliwake config trust
foliwake config trust ../my-site/foliwake.config.jsonfoliwake connect
Link this project folder to a site on your Foliwake server: a new one or an existing one
In a terminal: asks which server (signing in first when needed), then whether to create a new site (as foliwake site create, the folder name as its id) or link one you may develop (as foliwake site link). Without a terminal, or with --no-interactive: --create <id> or --link <id>. A folder linked already is refused; --force replaces its link, foliwake site unlink removes it.
text
foliwake connect [flags]| Flag | Description |
|---|---|
--create <value> | create this new site and link the folder to it |
--force | replace the link of a folder that is linked already |
--interactive | ask for what the flags leave open (default: only when stdin and stdout are a terminal) |
--json | Format output as json. |
--link <value> | link the folder to this existing site |
--server <value> | the Foliwake server (origin or host; default: $FOLIWAKE_SERVER, else asked or the only one) |
bash
foliwake connect
foliwake connect --create mysite --server https://foliwake.example
foliwake connect --link docs-en --jsonfoliwake create
Create a new site frontend: blocks, styles, local pages, checks and workflows
Runs create-foliwake (npm create foliwake): asks in a terminal only for what the flags leave open; without a terminal (or with --no-interactive) it uses the defaults: folder foliwake-site, template minimal, no site id, no React, no Storybook, Git repository with a first commit. The project is checked with @foliwake/site-check before anything is written. A non-empty folder is refused unless you choose --overwrite or --keep-existing; .git is never touched. At the end it can create or link the site on your Foliwake server (--create-site, --link-site, or a question).
text
foliwake create [FOLDER] [flags]| Flag | Description |
|---|---|
--connect | --no-connect: never ask «Connect to a Foliwake server?» (default: asked at the end in a terminal) |
--create-site | at the end, create the site (id: --site, else the folder name) on your server, as site create |
--git | create a Git repository (branch main) and commit the project with your Git identity (default: yes); skipped inside an existing repository |
--help | Show CLI help. |
--install | install Storybook's npm packages; default: asked in a terminal after Storybook, else no |
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
--keep-existing | the folder is not empty: add the project next to its files (refused if one would be replaced) |
--link-site <value> | at the end, link the project to this existing site on your Foliwake server, as site link |
--overwrite | the folder is not empty: remove its files first (.git is kept) |
--react | add React support: React and ReactDOM vendored in scripts/vendor/ and the React example block poll; default: asked in a terminal, else no |
--relink | with --create-site or --link-site in a folder already linked elsewhere: replace that link |
--server <value> | the Foliwake server to connect to (origin, host, or cloud; default: $FOLIWAKE_SERVER, else asked in a terminal; without one, the only server you are signed in to — several are refused) |
--site <value> | the site id on your Foliwake server, if you know it (the README uses it); empty: none |
--storybook | add Storybook for the blocks: .storybook/ and npm scripts; default: asked in a terminal, else no |
--template <value> | minimal: one page and one block (default); examples: two pages and three blocks, one with JavaScript |
bash
foliwake create
foliwake create my-site
foliwake create my-site --template examples --site my-site --no-interactive
foliwake create my-site --react --storybook
foliwake create . --overwrite --no-git
foliwake create mytest --no-interactive --server http://localhost:8080 --create-sitefoliwake credential list
Credentials the content sources use: set or not, from the environment or stored; never the value (core credentials.list)
text
foliwake credential list [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | only the credentials this site's sources use (default: every site you administer) |
bash
foliwake credential list
foliwake credential list --site my-site --jsonfoliwake credential rm
Removes a stored credential (the installation's owner); refused while a source uses it (core credentials.remove)
text
foliwake credential rm [NAME] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
bash
foliwake credential rm OLD_DRIVE_KEYfoliwake credential set
Stores a credential value on the server (the installation's owner): a source names it in credentials; the next sync uses it without a restart. The value is read from a file or stdin, never from the command line (core credentials.set)
text
foliwake credential set [NAME] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--from-file <value> | read the value from this file (a Google service-account JSON key is checked) |
--from-stdin | read the value from standard input |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
bash
foliwake credential set FOLIWAKE_GOOGLE_SA_KEY --from-file key.json
printf %s "$TOKEN" | foliwake credential set FOLIWAKE_GIT_TOKEN_DOCS --from-stdinfoliwake data backup
Back up the data folder of foliwake server into one .tar.gz: consistent copies of its databases, its other files, no caches. It holds the server's secrets: keep it private (foliwake docker backup runs this)
text
foliwake data backup [flags]| Flag | Description |
|---|---|
--data <value> | the data folder (default: $FOLIWAKE_DATA_DIR, else /data) |
--json | Format output as json. |
--out <value> | the archive to write (.tar.gz) |
bash
foliwake data backup --data /data --out /backup/foliwake.tar.gzfoliwake data refresh-caches
Drop all cached HTML of every site of this server from its caches (Varnish, Cloudflare), as after an engine update; publishes nothing (foliwake docker update runs this)
text
foliwake data refresh-caches [flags]| Flag | Description |
|---|---|
--data <value> | the data folder (default: $FOLIWAKE_DATA_DIR, else /data) |
--json | Format output as json. |
bash
foliwake data refresh-caches --data /datafoliwake data restore
Restore a data backup archive into an empty data folder (or replace its data), the server stopped (foliwake docker restore runs this)
text
foliwake data restore [flags]| Flag | Description |
|---|---|
--data <value> | the data folder, empty (default: $FOLIWAKE_DATA_DIR, else /data) |
--from <value> | the archive data backup wrote |
--json | Format output as json. |
--replace | delete what the data folder holds first (cannot be undone) |
bash
foliwake data restore --data /data --from /backup/foliwake.tar.gzfoliwake docker backup
Back up an instance's data volume to one .tar.gz on this computer: consistent copies of its databases, its other files, no caches. The server may keep running. The archive holds the server's secrets (0600).
text
foliwake docker backup [NAME] [flags]| Flag | Description |
|---|---|
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
--out <value> | the archive to write (default: ~/.config/foliwake/docker/<name>/backups/<name>-<time>.tar.gz) |
bash
foliwake docker backup
foliwake docker backup staging --out ./staging.tar.gzfoliwake docker configure
Change settings of an instance, then recreate it (the data volume stays). Only the given flags change; other lines of its .env are kept. It has no storage flags yet: the storage of new sites follows FOLIWAKE_STORAGE_* of the instance at each start (the Docker guide says how).
text
foliwake docker configure [NAME] [flags]| Flag | Description |
|---|---|
--bind <value> | address the port is published on (127.0.0.1 or 0.0.0.0) |
--cache <value> | a Varnish in front of the live sites, on a port of its own (none: remove it) |
--cache-port <value> | with --cache varnish: its port (default: the first free one from 8090) |
--domain <value> | sites at <site>.live.<domain> and <site>.preview.<domain> |
--image <value> | the image (tag or digest) |
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
--jaeger-port <value> | with --traces jaeger: the UI port on 127.0.0.1 |
--jaeger-store <value> | with --traces jaeger: in memory (default) or on disk for a week |
--otlp-endpoint <value> | with --traces external: the OTLP/HTTP endpoint (headers from $OTEL_EXPORTER_OTLP_HEADERS or asked hidden) |
--port <value> | port on this computer (the public address follows when it was the default http://localhost:<port>) |
--public-origin <value> | where browsers and foliwake login reach the server |
--trace-url-template <value> | with traces to your own collector: its trace page with {traceId} (FOLIWAKE_TRACE_URL_TEMPLATE; "" removes it). With Jaeger the CLI sets it |
--traces <value> | traces: none, Jaeger beside the server, or your own OTLP collector |
bash
foliwake docker configure --traces jaeger
foliwake docker configure --cache varnish --cache-port 8090
foliwake docker configure staging --port 8082
foliwake docker configure --traces external --otlp-endpoint https://otlp.example.comfoliwake docker exec
Run the foliwake CLI inside an instance's server container (it reads the container's settings): docker exec [name] -- <args>
text
foliwake docker exec [flags]| Flag | Description |
|---|---|
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
bash
foliwake docker exec -- account invite --email author@example.com
foliwake docker exec staging -- source plugins listfoliwake docker install
Install a Foliwake instance in Docker: questions, then pull, start, and the owner's sign-in link
An instance is a Compose project on the current Docker engine (docker context / DOCKER_HOST), found again by its dev.foliwake.* labels; no command looks at the current folder. In a terminal it asks for what the flags leave open; without one it uses the defaults and refuses where there is none (the owner e-mail at a first start). Its settings go to ~/.config/foliwake/docker/<name>/ (compose.yaml, and .env with mode 0600). Secrets are never flags: the S3 key is asked hidden, or read from FOLIWAKE_STORAGE_ACCESS_KEY_ID and FOLIWAKE_STORAGE_SECRET_ACCESS_KEY in this command's environment; OTLP headers likewise from OTEL_EXPORTER_OTLP_HEADERS. Needs Docker Compose 2.24 or later. A private image needs docker login ghcr.io first.
text
foliwake docker install [NAME] [flags]| Flag | Description |
|---|---|
--bind <value> | address the port is published on: 127.0.0.1 (this computer only, default) or 0.0.0.0 (everywhere; put HTTPS in front; FOLIWAKE_TRUST_PROXY is then not set) |
--cache <value> | a Varnish in front of the live sites, on a port of its own (default: none) |
--cache-port <value> | with --cache varnish: its port (default: the first free one from 8090) |
--domain <value> | sites at <site>.live.<domain> and <site>.preview.<domain> (default: the public origin's host) |
--image <value> | the image (default ghcr.io/foliwake/foliwake:main) |
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
--jaeger-port <value> | with --traces jaeger: the UI port on 127.0.0.1 (default: the first free one from 16686) |
--jaeger-store <value> | with --traces jaeger: keep traces in memory (default) or on disk for a week |
--open | open the owner's sign-in link in the browser (default: asked in a terminal, else no) |
--otlp-endpoint <value> | with --traces external: the OTLP/HTTP endpoint (headers from $OTEL_EXPORTER_OTLP_HEADERS or asked hidden) |
--owner-email <value> | the owner account made at the first start (no mail is sent); not needed when the data volume is reused |
--port <value> | port on this computer (default: the first free one from 8080; a taken port is refused, never swapped silently) |
--public-origin <value> | where browsers and foliwake login reach the server (default: http://localhost:<port>) |
--pull <value> | always (default): pull the image, a failed pull stops the install; missing: use the image if it is on this engine already (a local build), pull only otherwise |
--storage <value> | where sites are kept: the data volume (default) or S3-compatible storage; fixed at the first start |
--storage-bucket <value> | with --storage s3: the bucket name of each site (default foliwake-{org}-{site}) |
--storage-create-buckets | with --storage s3: the key may create buckets (default yes) |
--storage-endpoint <value> | with --storage s3: the S3 endpoint (https://…) |
--storage-region <value> | with --storage s3: the region (default us-east-1; auto on R2) |
--trace-url-template <value> | with --traces external: your collector's trace page with {traceId} (FOLIWAKE_TRACE_URL_TEMPLATE), for links from the dashboard and operation get |
--traces <value> | traces: none (default), Jaeger beside the server (UI on 127.0.0.1), or your own OTLP collector |
--yes | do not ask «Install?» at the end of the questions |
bash
foliwake docker install
foliwake docker install staging --port 8081 --owner-email you@example.com --no-interactive
foliwake docker install --traces jaeger --jaeger-store badger
foliwake docker install --cache varnish
FOLIWAKE_STORAGE_ACCESS_KEY_ID=… FOLIWAKE_STORAGE_SECRET_ACCESS_KEY=… foliwake docker install prod --public-origin https://foliwake.example.com --domain example.com --owner-email you@example.com --storage s3 --storage-endpoint https://s3.example.com --no-interactivefoliwake docker link
A new one-time sign-in link (15 minutes) for the owner or another account of an instance
text
foliwake docker link [NAME] [flags]| Flag | Description |
|---|---|
--email <value> | the account's e-mail address (default: the owner of the instance) |
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
bash
foliwake docker link
foliwake docker link staging --email author@example.comfoliwake docker list
Foliwake instances on this Docker engine, found by their labels (removed ones whose data was kept: "data only")
text
foliwake docker list [flags]| Flag | Description |
|---|---|
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
--json | Format output as json. |
bash
foliwake docker list
foliwake docker list --jsonfoliwake docker logs
The log of an instance's server (or its Jaeger); it holds one-time sign-in links, so keep it private
text
foliwake docker logs [NAME] [flags]| Flag | Description |
|---|---|
--follow | keep printing new lines |
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
--service <value> | which service (default foliwake) |
--since <value> | only lines since a time or duration (e.g. 10m, 2026-11-13T10:00:00) |
--tail <value> | only the last N lines |
bash
foliwake docker logs
foliwake docker logs staging -f --since 10m
foliwake docker logs --service jaegerfoliwake docker remove
Stop and remove an instance's containers and network, and its settings on this computer. The data volume is kept unless --delete-data (then the name is typed to confirm, or --yes without a terminal). A kept volume shows in docker list as "data only"; docker install <name> offers to reuse it.
text
foliwake docker remove [NAME] [flags]| Flag | Description |
|---|---|
--delete-data | also delete its volumes: sites, accounts, storage (cannot be undone) |
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
--yes | do not ask; required without a terminal |
bash
foliwake docker remove staging
foliwake docker remove staging --yes
foliwake docker remove staging --delete-data --yesfoliwake docker restart
Restart the containers of an instance
text
foliwake docker restart [NAME] [flags]| Flag | Description |
|---|---|
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
bash
foliwake docker restart
foliwake docker restart stagingfoliwake docker restore
Restore a docker backup archive into an instance's data volume. The instance must be stopped. An empty volume takes it as it is; one with data needs --replace (its data is deleted first: the name is typed to confirm, or --yes without a terminal).
text
foliwake docker restore [NAME] [flags]| Flag | Description |
|---|---|
--from <value> | the archive docker backup wrote |
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
--replace | delete the data the volume holds first (cannot be undone) |
--yes | do not ask before --replace; required without a terminal |
bash
foliwake docker restore staging --from ./staging.tar.gz
foliwake docker restore staging --from ./staging.tar.gz --replace --yesfoliwake docker start
Start the containers of a stopped instance
text
foliwake docker start [NAME] [flags]| Flag | Description |
|---|---|
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
bash
foliwake docker start
foliwake docker start stagingfoliwake docker status
State, health, image, ports, address, traces and data of an instance; secrets only as "set"
text
foliwake docker status [NAME] [flags]| Flag | Description |
|---|---|
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
--json | Format output as json. |
bash
foliwake docker status
foliwake docker status staging --jsonfoliwake docker stop
Stop the containers of an instance (data and settings stay)
text
foliwake docker stop [NAME] [flags]| Flag | Description |
|---|---|
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
bash
foliwake docker stop
foliwake docker stop stagingfoliwake docker update
Pull the instance's image; when it changed, back up the data volume (docker backup), recreate the server and drop every site's cached HTML. The data volume stays. Prints the command that rolls back. Needs the instance's settings on this computer (~/.config/foliwake/docker/<name>/).
text
foliwake docker update [NAME] [flags]| Flag | Description |
|---|---|
--backup | back up the data volume before the switch (default; --no-backup skips it) |
--image <value> | pin another image (tag, digest, or the id of a local build), kept in the settings |
--interactive | ask for missing values (default: only when stdin and stdout are a terminal) |
--pull <value> | always (default): pull, a failed pull stops the update; missing: use the image if it is on this engine already (e.g. the id of a local build to roll back to) |
bash
foliwake docker update
foliwake docker update staging --image ghcr.io/foliwake/foliwake:sha-1a2b3c4
foliwake docker update --image sha256:3f1a… --pull missingfoliwake drive check
Check one Google Docs lesson as a sync would; with a saved snapshot, show what changed
Reads one Google Docs document (--doc, with your OAuth client as the other drive commands; or --input, a documents.get JSON saved elsewhere) and checks it the way a sync's Google Drive reader does: the same reader code (@foliwake/google-drive-markdown), the site's blocks from --code, then the page pipeline, the Markdown compiled unchanged through the mapping a sync gives it. Every diagnostic is printed as a sync names it, code and message; any error rejects the whole sync, and the exit status is then 1. What it cannot check is printed as "not checked": the source's credentials (a sync refuses a page whose text holds one) and, without --images, the images (each gets stand-in bytes; --images downloads them as a sync does, with its host, type and size checks). With --mappings and --source-path the page gets the source's rule values (path, fields), and an ignore rule skips it; without them it gets a stand-in path and no fields, so a rule's values and a page's required fields are not checked. The page is compiled alone: links to other pages, path conflicts and ownership are not checked. As in a sync's listing, a document with a hidden name on its path (one that starts with ".") is skipped, and the Drive path, with the source's subfolder (--subfolder, else "settings.subfolder" of a source in --mappings) before it, may be at most 1000 characters. --save <file> writes the document as a snapshot (every temporary image URL removed): the «before» of an edit. --diff-against <file> checks that snapshot too and prints a unified line diff of the lesson Markdown, before → now, each hunk headed by its slide and block (images named by their Docs object ID), and what changed in the compiled page (title, description, fields, body), when both versions compile without errors. --doc uses FOLIWAKE_GOOGLE_OAUTH_CLIENT_ID and FOLIWAKE_GOOGLE_OAUTH_CLIENT_SECRET (scope drive.file: only documents your OAuth client created, such as those drive to-docs uploaded), after a consent in the browser. Exit status 1 when an error was found, 2 for a wrong command line.
text
foliwake drive check [flags]| Flag | Description |
|---|---|
--code <value> | the site's code folder (the one with components/) |
--diff-against <value> | a snapshot (--save) to compare with: prints the line diff |
--doc <value> | the document to read now (its Drive file ID) |
--help | Show CLI help. |
--images | download the document's images now and check them as a sync does |
--input <value> | check a documents.get JSON (or a --save snapshot) from this file instead of reading Drive |
--json | print the result as JSON |
--mappings <value> | a JSON file with the source's mappings rules (a list, or the source) |
--save <value> | write the document read as a snapshot to this file (the «before») |
--site-url <value> | the site's address: a link to it is kept as a root path, as in sync |
--source-id <value> | the source's ID in messages (default: the "id" of a source object in --mappings) |
--source-path <value> | the document's path in the source folder, as a sync shows it ("Georgia/topic/lesson/ru") |
--subfolder <value> | the source's subfolder (default: "settings.subfolder" of a source object in --mappings) |
bash
foliwake drive check --doc <document ID> --code ../site/build
foliwake drive check --doc <document ID> --code ../site/build --save before.json
foliwake drive check --doc <document ID> --code ../site/build --diff-against before.json
foliwake drive check --input now.json --code ../site/build --diff-against before.json --jsonfoliwake drive stamp-ids
Make the {#id} of Google Docs lessons invisible (named ranges), checked to keep each page the same
For each Google Docs lesson that drive to-docs uploaded before the IDs became invisible (2026-11-20): every {#id} it shows — at the end of a slide heading, in the ID cell of an answer row — becomes a named range on that heading or answer (the reader takes the ID from it), the visible text is deleted, and the emptied ID column of each block form is deleted (--keep-id-column: left empty). Each document is first changed on a copy and compiled with the site's blocks from --code: when its page would change, nothing is written and the run stops. Without --apply nothing is written at all (a dry run): each document's counts are printed. With --apply each document is changed by one batchUpdate at the revision just read (a document someone edited meanwhile is refused and left as it is; run again), then read back and compiled again. The documents: those a to-docs manifest records as done (--manifest), every document under a Drive folder (--folder), or one (--doc). Your OAuth client must be the one the documents were uploaded with (FOLIWAKE_GOOGLE_OAUTH_CLIENT_ID, FOLIWAKE_GOOGLE_OAUTH_CLIENT_SECRET; scope drive.file: the tool reaches only the files it created). A rerun is safe: a document without visible IDs has nothing to do. Run --apply only once the server reads invisible IDs (the engine with the Google Docs reader of 2026-11-20): an older reader gives such slides Google's heading IDs. Exit status 1 when a page would change or changed, or a document could not be read or changed.
text
foliwake drive stamp-ids [flags]| Flag | Description |
|---|---|
--apply | write the changes (without it: a dry run) |
--code <value> | the site's code folder (the one with components/) |
--doc <value> | one document (its Drive file ID) |
--folder <value> | every Google Docs document under this Drive folder ID (subfolders too) |
--help | Show CLI help. |
--keep-id-column | empty the ID cells of answer rows but keep the column |
--manifest <value> | the manifest of a drive to-docs --tree … --upload run: its done documents |
bash
foliwake drive stamp-ids --doc <document ID> --code ../site/build
foliwake drive stamp-ids --manifest ./to-docs/manifest.json --code ../site/build
foliwake drive stamp-ids --manifest ./to-docs/manifest.json --code ../site/build --applyfoliwake drive strip-ids
Remove the visible {#id} of Google Docs lessons; slides get the slug of their heading, checked
For each Google Docs lesson that drive to-docs uploaded before 2026-11-20: the {#id} at the end of every slide heading and the ID column of every block form are deleted (a form that holds a picture keeps the column, emptied and narrowed: deleting it would make Google re-create the picture). A slide then gets the slug of its heading text as its ID (like Adobe EDS: «Рука поднята» → ruka-podnyata), so links to its old ID stop working; each change is listed old → new. An answer whose text or place would not give it the same ID (answer IDs carry meaning) keeps it, typed at the end of its text: Налево {#left}. Each document is first changed on a copy and compiled with the site's blocks from --code: when its page would change in anything but those slide IDs, nothing is written and the run stops. Without --apply nothing is written at all (a dry run). With --apply the same requests first run on a Drive copy of the document (in a folder "Foliwake strip-ids checks (safe to delete)" in My Drive; the copy is deleted afterwards), which is read back and checked: when Google changed the copy's page otherwise than expected, the document is not written and the run stops, naming the first line that changed and a diagnostic file (strip-ids-diagnostics/<document ID>-<time>.json beside the ledger: the requests sent and the element that differs, as Google and as the local check have it; document content only). Then each document is changed by one batchUpdate at the revision just read (a document someone edited meanwhile is refused and left as it is; run again), then read back and compiled again, and recorded in the ledger (--ledger), so a rerun skips it and never deletes an {#id} an author types later. The documents: those a to-docs manifest records as done (--manifest), every document under a Drive folder (--folder), or one (--doc). Your OAuth client must be the one the documents were uploaded with (FOLIWAKE_GOOGLE_OAUTH_CLIENT_ID, FOLIWAKE_GOOGLE_OAUTH_CLIENT_SECRET; scope drive.file). Run --apply only once the server reads slugs (the Google Docs reader of 2026-11-21): an older one gives such slides Google's heading IDs. Exit status 1 when a page would change or changed, or a document could not be read or changed.
text
foliwake drive strip-ids [flags]| Flag | Description |
|---|---|
--apply | write the changes (without it: a dry run) |
--code <value> | the site's code folder (the one with components/) |
--doc <value> | one document (its Drive file ID) |
--folder <value> | every Google Docs document under this Drive folder ID (subfolders too) |
--help | Show CLI help. |
--ledger <value> | the file that records the stripped documents (default: strip-ids.json beside --manifest, else in the current folder) |
--manifest <value> | the manifest of a drive to-docs --tree … --upload run: its done documents |
bash
foliwake drive strip-ids --doc <document ID> --code ../site/build
foliwake drive strip-ids --manifest ./to-docs/manifest.json --code ../site/build
foliwake drive strip-ids --manifest ./to-docs/manifest.json --code ../site/build --applyfoliwake drive to-docs
Move a Markdown lesson of a Drive folder to a Google Docs document (same page), checked first
Writes the lesson in the block-table convention of Google Docs lessons and checks that the document compiles to the same page (body, title, description) as the Markdown file, with the site's blocks from --code. Without --upload nothing leaves this computer: the Word file is written to --out for inspection (a dry run). --upload --folder <ID> uploads it into the lesson's Drive folder as a Google Docs document named like the file ("ru"), with your OAuth client (FOLIWAKE_GOOGLE_OAUTH_CLIENT_ID, FOLIWAKE_GOOGLE_OAUTH_CLIENT_SECRET; a "Desktop app" client; scope drive.file: the tool sees only the files it creates), reads it back and checks it again. --tree <dir> moves every page of a folder in one language (--lang) into a NEW Drive folder tree: the files the source's rules (--mappings) publish in that language are written as Word files under --out, mirroring the folders, and checked; with --upload --to <ID of the new root> the folders are mirrored there (a folder named like --tree, then the same folder names) and each document is uploaded, read back and checked again. A manifest (--manifest, default <out>/manifest.json) records each lesson, so a rerun skips what is done and retries the rest. The source tree is never changed; there is no --commit in this mode. --path-prefix /v2 makes the new tree a second source beside the old one: its rules put every page under /v2, and <out>/<source-id>.source.json and .mappings.json are written with the commands that add it (the old source and its pages stay as they are). --commit --archive <dir> then moves the Markdown file out of the source folder, so the next sync lets the document take over the page (SOURCE_PAGE_REPLACED: same page ID, address and history). A slide's ID is the slug of its heading text in the document (a heading whose ID changes is only noted); an answer whose text or place would not give it its ID gets it typed at the end of its text ({#left}); --stamp-ids writes no ID and keeps the lesson's IDs as invisible named ranges instead, as before 2026-11-21. Every difference is listed; pictures Google re-encoded are compared by their pixels (the same picture is a note, not a difference; --save-images <dir> writes the document's pictures to look at). A difference stops the run unless --accept-diff. Exit status 1 when the lesson cannot move or the pages differ.
text
foliwake drive to-docs [flags]| Flag | Description |
|---|---|
--accept-diff | go on although the pages differ (the differences are listed) |
--archive <value> | with --commit: a folder outside the source folder for the Markdown file |
--code <value> | the site's code folder (the one with components/) |
--commit | after a passed check, move the Markdown file to --archive |
--doc <value> | check a document this tool uploaded before (its Drive file ID) instead of uploading again |
--file <value> | the Markdown lesson in the local Drive folder (…/lesson/ru.md) |
--folder <value> | with --upload: the Drive folder ID of the lesson's lesson/ folder |
--help | Show CLI help. |
--include <value> | with --tree: the kinds that move, comma-separated (the rules' "kind"; a page without one is "lesson"); default: all |
--lang <value> | with --tree: the language whose pages move (the rules' "lang" value) |
--manifest <value> | with --tree --upload: the manifest file (default: <out>/manifest.json) |
--mappings <value> | with --tree: a JSON file with the source's mappings rules (a list, or the source object) |
--out <value> | where the Word file is written (default: ./<name>.docx); with --tree, the folder for the Word files (default: ./to-docs) |
--path-prefix <value> | with --tree: the new tree is a second source with every page path under this prefix (e.g. /v2); its source and rules are written to --out |
--save-images <value> | with --upload or --doc: write the document's pictures, as Google serves them, to this folder |
--site-url <value> | the site's address (e.g. https://lessons.example.org): a link to a page of the site (/lessons/x) is written under it and read back as /lessons/x |
--source-id <value> | with --path-prefix: the second source's ID (default: lessons-docs) |
--stamp-ids | keep the lesson's slide and answer IDs as invisible named ranges (default: slides get the slug of their heading, answers that need it a typed {#id}) |
--subfolder <value> | with --tree --upload: the folder created under --to that mirrors --tree (default: the name of --tree; "" for --to itself) |
--to <value> | with --tree --upload: the Drive folder ID of the new root |
--tree <value> | every page of this local Drive folder (the source's folder, e.g. …/Lessons/Georgia) in --lang |
--upload | upload the Word file as a Google Docs document and check the real document |
bash
foliwake drive to-docs --file "<Drive>/Lessons/<topic>/<lesson>/lesson/ru.md" --code ../site/build
foliwake drive to-docs --file …/lesson/ru.md --code ../site/build --upload --folder <lesson/ folder ID>
foliwake drive to-docs --file …/lesson/ru.md --code ../site/build --doc <document ID> --commit --archive "<Drive>/Lessons/archive/<lesson>/lesson"
foliwake drive to-docs --tree "<Drive>/Lessons/Georgia" --mappings rules.json --code ../site/build --lang ru --out ./to-docs --path-prefix /v2 --site-url https://lessons.example.org
foliwake drive to-docs --tree "<Drive>/Lessons/Georgia" --mappings rules.json --code ../site/build --lang ru --out ./to-docs --path-prefix /v2 --site-url https://lessons.example.org --upload --to <new root folder ID>foliwake login
Sign this computer in to a Foliwake server through the browser (device code)
text
foliwake login [SERVER] [flags]| Flag | Description |
|---|---|
--browser | open the approval page in the browser (--no-browser only prints its address) |
--default | make this server the default of other commands (the first sign-in always is) |
--insecure-storage | keep the token in a 0600 file when there is no system keychain |
--json | Format output as json. |
bash
foliwake login https://foliwake.example
foliwake login http://localhost:8080 --default
foliwake login 127.0.0.1:8098 --no-browserfoliwake logout
Revoke this computer’s sign-in to a Foliwake server and forget its token
text
foliwake logout [SERVER] [flags]| Flag | Description |
|---|---|
--forget-only | forget the token here even when the server cannot revoke it (it then stays valid there until it expires) |
--json | Format output as json. |
bash
foliwake logout
foliwake logout https://foliwake.example
foliwake logout cloudfoliwake migration commit
Release the reviewed preview of new code: code and pages go live as one site release (core migration.commit)
text
foliwake migration commit [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--expect <value> | the reviewed preview and its code, sr_…@cd_… (site status prints them) |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--sequence <value> | deployment ordering, e.g. a CI run id; an older one than live code is refused |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake migration commit --expect sr_…@cd_…
foliwake migration commit --expect sr_…@cd_… --sequence <ci run id> --jsonfoliwake migration prepare
Rebuild every live page against prepared code as the preview; live is unchanged (core migration.prepare)
text
foliwake migration prepare [CODE] [flags]| Flag | Description |
|---|---|
--add <value> | pages that are not live and join the site with it (comma-separated IDs) |
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--content <value> | this folder instead of the site's content sources; refused when they need the page ledger |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--remove <value> | live pages that leave the site with it (comma-separated IDs) |
--rev <value> | the commit the code was prepared from, recorded with the preview |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake migration prepare cd_…
foliwake migration prepare cd_… --rev <sha> --json
foliwake migration prepare cd_… --remove old-page --add new-pagefoliwake operation cancel
Ask a long operation to stop: a queued one stops at once, a running one when it can (core operations.cancel)
text
foliwake operation cancel [ID] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake operation cancel co_…foliwake operation get
One long operation: its state, stage, delivery and result (core operations.get)
text
foliwake operation get [ID] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake operation get co_… --jsonfoliwake operation list
The latest long operations of a site, newest first (core operations.list)
text
foliwake operation list [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--limit <value> | how many (default 50) |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake operation list
foliwake operation list --limit 5 --jsonfoliwake operation recover
Find out what happened to interrupted operations, finish the engine’s interrupted work and pending cache refreshes; never runs an operation again (core operations.recover)
text
foliwake operation recover [flags]| Flag | Description |
|---|---|
--break-lock | first remove a state lock left by a process that is gone (for example on another host name) |
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--timings | report phase timings, request counts and transferred bytes on stderr (one JSON line with --json); also FOLIWAKE_TIMINGS=1 or FOLIWAKE_TIMINGS_FILE=<file> |
--wait | also wait (bounded) for pending cache refreshes; those still pending then stay recorded and the exit status is 3 |
--wait-timeout <value> | limit of --wait in seconds (default: settle delay + 90 s) |
bash
foliwake operation recover --wait
foliwake operation recover --break-lock --wait # only when the process named by STATE_LOCKED is gonefoliwake page changes
Compare working pages (text and images) with the live site (core content.changes)
text
foliwake page changes [flags]| Flag | Description |
|---|---|
--changed | list only pages that differ from the live site |
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--content <value> | this folder instead of the site's content sources; refused when they need the page ledger |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake page changes
foliwake page changes --changed --jsonfoliwake page check
Validate all pages and components/components.json (core content.validate)
text
foliwake page check [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--content <value> | this folder instead of the site's content sources; refused when they need the page ledger |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake page check
foliwake page check --site a --content ./sample-contentfoliwake page replace
Let another item of its source feed a published page (e.g. a Drive file deleted and uploaded again): the page keeps its ID, address, live version and history. Shows the plan and asks first; preview and live are unchanged until the next sync and preview/publish (core sources.replacePage)
text
foliwake page replace [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--json | Format output as json. |
--path <value> | the path of the page that is live or in preview |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--with <value> | the native ID of the source item that should feed it (a Drive file ID; source sync --json lists the items' native_id) |
--yes | apply the plan without asking (required when not in a terminal) |
bash
foliwake page replace --path /lessons/signs/ru --with 1AbCdEfGhIjK
foliwake page replace --site my-site --path /lessons/signs/ru --with 1AbCdEfGhIjK --yesfoliwake page unpreview
Remove a page from the preview, live untouched: a page that is not live leaves the preview, a live page shows its live version there again. Refused when the preview is not the one you expected (core channels.unpreview)
text
foliwake page unpreview [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--expect <value> | the preview site release you saw (sr_…, as site status shows it); refused when the preview is another one |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--latest-preview | expect the preview as it is now (read once, before the request) |
--path <value> | the path of the page in the preview |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--wait-timeout <value> | limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s); still pending then: exit 3, operation recover finishes it |
bash
foliwake page unpreview --path /lessons/signs/ru --expect sr_… # the preview release `site status` shows
foliwake page unpreview --path /old-draft --latest-previewfoliwake page unpublish
Remove pages from the live site; refused when live is not the release you expected (core channels.unpublish)
text
foliwake page unpublish [PAGES] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--expect <value> | the live site release you saw (sr_…, as site status shows it); refused when live is another one |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--latest-live | expect the live release as it is now (read once, before the request) |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--wait-timeout <value> | limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s); still pending then: exit 3, operation recover finishes it |
bash
foliwake page unpublish help --expect sr_… # the live release `site status` shows
foliwake page unpublish old-page other --latest-livefoliwake preview
Save drafts to the protected preview (default: all valid pages)
Not on core yet: it calls the engine directly until it moves onto core (channels.preview).
text
foliwake preview [flags]| Flag | Description |
|---|---|
--code <value> | an already prepared code release to compile against instead of live code |
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--content <value> | this folder instead of the site's content sources; refused when they need the page ledger |
--debug | print the underlying error, paths included, on stderr |
--json | machine-readable output |
--site <value> | site id from the project configuration (required when it lists several sites) |
--sync | first sync the named pages from their sources (only their files are read again; other changed files are read too, unchanged ones kept), then preview only them |
--timings | report phase timings, request counts and transferred bytes on stderr (one JSON line with --json; never URLs, keys or content); also FOLIWAKE_TIMINGS=1 or FOLIWAKE_TIMINGS_FILE=<file> |
--use-selected <source-id,…> | publish/preview the previously accepted snapshot of these sources although their latest sync was not accepted |
--verbose | also print codes and the engine's technical text of each problem (for support) |
bash
foliwake preview
foliwake preview help
foliwake preview --code cd_… # compile against prepared code
foliwake preview lesson-1 --sync # sync and preview this page onlyfoliwake project preview
Preview this project's pages on its site's server (a folder linked with site create / site link)
Sends the pages and images of content/ (committed or not) and the code of the last commit (components/, scripts/ and styles/ must be committed) to the site this folder is linked to, rebuilds the site's preview there and prints its address. In a linked folder, foliwake preview runs this command. Remembers the preview in .foliwake/last-preview.json.
text
foliwake project preview [flags]| Flag | Description |
|---|---|
--json | Format output as json. |
bash
foliwake preview
foliwake project preview --jsonfoliwake project publish
Publish the pages your last preview changed (or the pages of the given files and folders) to live
In a folder linked to a site: with no paths, the pages the last foliwake preview of this folder changed, refused when the preview changed since; with paths (files or folders under content/), their pages. Lists them and asks in a terminal; --yes for scripts. --expect sr_… publishes a preview you reviewed elsewhere. In a linked folder, foliwake publish runs this command.
text
foliwake project publish [PATHS] [flags]| Flag | Description |
|---|---|
--expect <value> | the preview release you reviewed (sr_…); default: the one the last foliwake preview here made |
--json | Format output as json. |
--yes | do not ask (scripts) |
bash
foliwake publish
foliwake publish content/index.md
foliwake publish content/lessons/ --yesfoliwake project unpublish
Take the pages of the given files and folders off live
In a folder linked to a site: the pages of the given files or folders under content/ go off live, if live is still the release read just before (or --expect). Lists them and asks in a terminal; --yes for scripts.
text
foliwake project unpublish [PATHS] [flags]| Flag | Description |
|---|---|
--expect <value> | the live release you saw (sr_…); default: live as it is now |
--json | Format output as json. |
--yes | do not ask (scripts) |
bash
foliwake project unpublish content/old.mdfoliwake publish
Publish selected pages to the live site
Not on core yet: it calls the engine directly until it moves onto core (channels.publish).
text
foliwake publish [PAGES] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--content <value> | this folder instead of the site's content sources; refused when they need the page ledger |
--debug | print the underlying error, paths included, on stderr |
--expect <preview-release> | publish only if the reviewed preview (its sr_… release ID, printed by preview and site status; on a branch host, the X-Publish-Expect value sr_…@cd_…), its source snapshots and the live code are unchanged and are the pair you saw; required on sites with snapshot sources |
--json | machine-readable output |
--site <value> | site id from the project configuration (required when it lists several sites) |
--timings | report phase timings, request counts and transferred bytes on stderr (one JSON line with --json; never URLs, keys or content); also FOLIWAKE_TIMINGS=1 or FOLIWAKE_TIMINGS_FILE=<file> |
--use-selected <source-id,…> | publish/preview the previously accepted snapshot of these sources although their latest sync was not accepted |
--verbose | also print codes and the engine's technical text of each problem (for support) |
--wait | wait (bounded, see --wait-timeout) for the cache refresh; if it is still pending then, that is reported: exit 0 once the change is committed (only this operation's refresh is awaited); the pending refreshes stay recorded for operation recover |
--wait-timeout <seconds> | limit of --wait in seconds (default: settle delay + 30 s) |
bash
foliwake publish help
foliwake publish home questions --wait
foliwake publish help --expect sr_0123456789abcdef0123456789abcdeffoliwake release rollback
Make an earlier site release live again, code and pages as they were, as a new release; refused when live is not the release you expected (core channels.rollback)
text
foliwake release rollback [TO] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--expect <value> | the live site release you saw (sr_…, as site status shows it); refused when live is another one |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--latest-live | expect the live release as it is now (read once, before the request) |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--wait-timeout <value> | limit of the wait for this write's cache refresh, in seconds (default: settle delay + 30 s); still pending then: exit 3, operation recover finishes it |
bash
foliwake release rollback sr_… --expect sr_…
foliwake site status --json # codeRollout.rollbackTo is one step back
foliwake release rollback sr_… --latest-livefoliwake servers
List the Foliwake servers this computer is signed in to; * marks the default
text
foliwake servers [flags]| Flag | Description |
|---|---|
--json | Format output as json. |
bash
foliwake servers
foliwake servers --jsonfoliwake servers use
Make a signed-in server the default of commands that name no server
text
foliwake servers use [SERVER] [flags]| Flag | Description |
|---|---|
--json | Format output as json. |
bash
foliwake servers use https://foliwake.examplefoliwake site adopt
Bind an existing bucket and its state to a configured site; publishes nothing (core sites.adopt)
text
foliwake site adopt [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake site adopt --config foliwake.config.json --site my-sitefoliwake site create
Create this project's site on your Foliwake server (core sites.create; admin)
In a project folder (as foliwake create makes it), signed in with foliwake login to any Foliwake server: creates the site in your organisation (you must be its admin), with release 1 from the folder's last commit (its code and pages, sent as a Git bundle), links the folder to it and prints what to set up next (GitHub, workflows, content sources). Nothing on GitHub is changed. To use a site that exists already: foliwake site link <id>.
text
foliwake site create [ID] [flags]| Flag | Description |
|---|---|
--code | send the last commit for release 1 (--no-code: release 1 waits for the first code prepare) |
--json | Format output as json. |
--org <value> | the organisation (default: your only one where you are admin) |
--relink | replace the link of this folder (.foliwake/connection.json) to another server or site without asking |
--repository <value> | where the code will live, e.g. https://github.com/acme/mytest (the server checkout's origin) |
--server <value> | the Foliwake server (origin, host, or cloud for Foliwake Cloud; default: $FOLIWAKE_SERVER, else the only server you are signed in to; several: asked in a terminal, refused without one) |
bash
foliwake site create mytest
foliwake site create mytest --repository https://github.com/acme/mytest
foliwake site create mytest --server foliwake.example --no-codefoliwake site edit
Edit a stored site's settings in $VISUAL or $EDITOR; saved only if nobody changed the site meanwhile (core sites.update)
text
foliwake site edit [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--expect <value> | the revision you saw (site show); default: the one opened in the editor |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake site edit --site my-sitefoliwake site history
Who changed a stored site's settings, when, and which settings (core sites.history)
text
foliwake site history [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--json | Format output as json. |
--limit <value> | how many changes, newest first (default 20) |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake site history --site my-site
foliwake site history --site my-site --limit 50 --jsonfoliwake site link
Link this project folder to an existing site on your Foliwake server (developer or admin)
Signed in with foliwake login to any Foliwake server: checks that the site exists and that you are a developer or admin of its organisation, and writes .foliwake/connection.json in this folder. Nothing changes on the server. A second developer who cloned the repository only links.
text
foliwake site link [ID] [flags]| Flag | Description |
|---|---|
--json | Format output as json. |
--relink | replace the link of this folder (.foliwake/connection.json) to another server or site without asking |
--server <value> | the Foliwake server (origin, host, or cloud for Foliwake Cloud; default: $FOLIWAKE_SERVER, else the only server you are signed in to; several: asked in a terminal, refused without one) |
bash
foliwake site link mytest
foliwake site link mytest --server foliwake.examplefoliwake site list
Configured sites with hosts, repositories and bindings (core sites.list)
text
foliwake site list [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
bash
foliwake site list --config foliwake.config.json
foliwake site list --jsonfoliwake site reset-storage
Recreate a site's storage in one action: archive its state, delete its objects in its own bucket, bind both again, prepare its code (release 1) and sync its sources. Publishes nothing: live is EMPTY (no pages) until you publish again. Prints the plan first and asks for the site id (the installation's owner only; core sites.resetStorage)
text
foliwake site reset-storage [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--confirm <value> | the site id, typed again: confirms the reset without a question (needed without a terminal) |
--debug | print the underlying error on stderr |
--dry-run | print the plan (what is lost, what is done) and change nothing |
--json | Format output as json. |
--rev <value> | the commit to prepare again (default: the commit live code came from, else HEAD) |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake site reset-storage --site my-site --dry-run
foliwake site reset-storage --site my-site
foliwake site reset-storage --site my-site --confirm my-site --jsonfoliwake site set
Change one setting of a stored site, only if nobody changed the site since it was read (core sites.update)
text
foliwake site set [PATH] [VALUE] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--expect <value> | the revision you saw (site show); default: the one read just before the change |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--unset | remove the setting instead of setting it |
bash
foliwake site set --site my-site media.resize engine
foliwake site set --site my-site branchHostDomain preview.foliwake.example --expect 3
foliwake site set --site my-site liveAliases --unsetfoliwake site show
A site's stored settings and their revision, on a server that keeps its sites in a database (core sites.get)
text
foliwake site show [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake site show --site my-site
foliwake site show --site my-site --jsonfoliwake site status
Live, preview, code and pending work at a glance (core sites.status)
text
foliwake site status [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake site status
foliwake site status --site my-site --jsonfoliwake site unlink
Remove this project folder's link to its site (.foliwake/connection.json); the server is not changed
Removes .foliwake/connection.json from this folder, so foliwake preview and publish no longer go to that site. Nothing is sent to the server: the site, its releases and its pages stay there. Prints the server and site it unlinked. A folder that is not linked is not an error: it says so and exits 0. A connection file this version cannot read is left as it is unless --force. To move a project to another server: foliwake site unlink, then foliwake site create <id> --server <server> (or site link <id> --server <server>).
text
foliwake site unlink [flags]| Flag | Description |
|---|---|
--force | also remove a .foliwake/connection.json this version cannot read |
--json | Format output as json. |
bash
foliwake site unlink
foliwake site unlink --json
foliwake site unlink --forcefoliwake source add
Adds a content source to a site: checks it first (settings, credentials, connection, files and their addresses), then saves it after a confirmation; nothing is fetched (core sources.probe, sources.add)
text
foliwake source add [flags]| Flag | Description |
|---|---|
--base-url <value> | Drupal: the site address |
--basic-password <value> | Drupal: the credential name of its password |
--basic-user <value> | Drupal: the credential name of a read-only user name (HTTP Basic) |
--branch <value> | Git: the branch (default main) |
--check-only | check and print, save nothing |
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--display-name <value> | the name the dashboard shows |
--folder <value> | Google Drive: the folder link or ID |
--id <value> | the new source id (lower case, digits, "-") |
--identity <value> | Google Drive: file-id (default; renames keep the page) or front-matter |
--json | Format output as json. |
--key <value> | Google Drive: the credential name of the service-account key (default FOLIWAKE_GOOGLE_SA_KEY) |
--language <value> | Drupal: a language code, the default first (repeatable) |
--mappings <value> | a JSON file with path mapping rules (default: each file names its address) |
--owns <value> | a path the source owns, such as /lessons or "=/" (repeatable) |
--plugin <value> | the connector |
--repository <value> | Git: the https address of the repository |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--subfolder <value> | Google Drive or Git: the folder inside that holds the pages |
--token <value> | Git: the credential name of a read-only token (private repository) |
--yes | save without asking (scripts) |
bash
foliwake source add --site my-site --id lessons --owns /lessons --folder https://drive.google.com/drive/folders/1AbC…
foliwake source add --site docs --plugin git-markdown --id docs --owns /docs --repository https://github.com/acme/docs
foliwake source add --site news --plugin drupal --id news --owns /articles --base-url https://cms.example.org --language enfoliwake source adopt-pages
Let a source take over published pages that no source owns yet (published by an earlier configuration: one folder), at paths it owns; preview and live are unchanged (core sources.adoptPages)
text
foliwake source adopt-pages [SOURCE] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake source adopt-pages git
foliwake source adopt-pages git --site a --jsonfoliwake source check
Checks content sources without changing anything: settings, credentials, the connection and, with --listing, the files and the page addresses they would get (core sources.probe)
text
foliwake source check [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--listing | also list the files and their page addresses (slower: reads the whole source) |
--max <value> | at most this many files in the listing (default 500) |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--source <value> | one source of the site (default: every enabled source) |
bash
foliwake source check --site my-site
foliwake source check --site my-site --source lessons --listing
foliwake source check --site my-site --input '{"site":"my-site","candidate":{…}}'foliwake source gc
Remove local source snapshots nothing needs any more, and the bytes only they held (a dry run unless --apply)
Keeps, per source: the selected snapshot, every snapshot a preview or publication (or its history) names, the last 3 used ones and those used in the last 7 days. The same runs after every accepted sync. Never touches the store.
text
foliwake source gc [flags]| Flag | Description |
|---|---|
--apply | remove them (default: only list what would be removed) |
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error, paths included, on stderr |
--json | Format output as json. |
--site <value> | site id from the project configuration (required when it lists several sites) |
bash
foliwake source gc
foliwake source gc --applyfoliwake source list
The site's content sources: plugin, owned paths and selected snapshot (core sources.list)
text
foliwake source list [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
bash
foliwake source list
foliwake source list --site a --jsonfoliwake source mappings check
Dry run of a source's path mappings over the documents it already has (the selected snapshot, or a working folder's files): each document's page path now and with the rules, unmatched files and problems; reads no upstream and changes nothing (core sources.mappingsCheck)
text
foliwake source mappings check [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--file <value> | check the rules in this JSON file (a list of rules) instead of the configured ones; needs --source |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--source <value> | only this source (default: every source with path mappings) |
bash
foliwake source mappings check
foliwake source mappings check --site my-site --source docs-en
foliwake source mappings check --source docs-en --file mappings.jsonfoliwake source pending
Edits waiting in the content sources that the selected snapshots do not have: a read-only check, nothing is fetched into a snapshot or stored (core sources.pending)
text
foliwake source pending [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--source <value> | content source id of the site (see source list; default: every source) |
bash
foliwake source pending
foliwake source pending --source lessons --jsonfoliwake source plugins
Registered content-source plugins, their versions and the planned catalog (core sources.plugins)
text
foliwake source plugins [flags]| Flag | Description |
|---|---|
--debug | print the underlying error on stderr |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
bash
foliwake source plugins
foliwake source plugins --debug # why a plugin failed, on stderrfoliwake source sync
Read content sources into private snapshots and select them; preview and live are unchanged (core sources.sync)
text
foliwake source sync [flags]| Flag | Description |
|---|---|
--code <value> | the prepared code of a migration: read and check the sources against it instead of live code |
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error on stderr |
--full | read every item of the source again (no incremental sync: unchanged items are not kept from the selected snapshot) |
--input <value> | raw JSON for the full operation input; overrides the other input flags |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
--site <value> | site id (default: the site this folder is linked to, else the only site of the configuration or server) |
--source <value> | content source id of the site (see source list; default: every enabled source) |
--timings | report phase timings, request counts and transferred bytes on stderr (one JSON line with --json); also FOLIWAKE_TIMINGS=1 or FOLIWAKE_TIMINGS_FILE=<file> |
--verbose | also print codes, snapshots, attempts and the engine's technical text (for support) |
bash
foliwake source sync
foliwake source sync --source content --json
foliwake source sync --source lessons --full
foliwake source sync --code cd_… # before `migration prepare cd_…`foliwake whoami
Show the server, who this command acts as and what it may do (core whoami)
text
foliwake whoami [flags]| Flag | Description |
|---|---|
--debug | print the underlying error on stderr |
--json | Format output as json. |
--server <value> | call this Foliwake server (origin or host) instead of the local configuration (default: the folder's .foliwake/connection.json, then $FOLIWAKE_SERVER, then the last login) |
bash
foliwake whoami
foliwake whoami --server cloud
foliwake whoami --jsonServer processes
These start a server and keep running until Ctrl+C (or SIGTERM). They are not core operations: they take no --json, --input or --server, and the servers they start call core themselves where they change a site.
foliwake admin
Local configuration dashboard on 127.0.0.1 (default port 8099)
A server process, not a core operation: the dashboard for one configuration file, on loopback only, with sign-in by account, until Ctrl+C. The dashboard itself calls core.
text
foliwake admin [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--create | allow a configuration file that does not exist yet (the first saved site creates it) |
--debug | print the underlying error, paths included, on stderr |
--drafts-dir <value> | where unfinished "Add site" setups are kept (default $FOLIWAKE_ADMIN_DRAFTS_DIR, else .<config file name>.admin-drafts next to the configuration; created 0700) |
--history-domain <value> | local override of the history host domain (default addresses.historyDomain, else history.localhost) |
--history-port <value> | loopback port of the read-only website history listener (default 8097; 0 picks a free one) |
--port <value> | port to listen on (default 8099; 0 picks a free one) |
bash
foliwake admin --config foliwake.config.json
foliwake admin --config new.config.json --create --port 0foliwake api serve
Serve core over HTTP with account sign-in and CLI login (device code), on 127.0.0.1
text
foliwake api serve [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder); sign-in state is kept beside it |
--debug | print failures with their paths on stderr |
--port <value> | loopback port (default 8098; 0 picks a free one) |
--public-origin <value> | where browsers and the CLI reach this listener, e.g. https://foliwake.example behind a gateway (default: $FOLIWAKE_PUBLIC_ORIGIN, else http://127.0.0.1:<port>) |
--trust-proxy | behind a gateway: rate limits use the last X-Forwarded-For entry as the client address |
bash
foliwake api serve --config foliwake.config.json
foliwake api serve --config /site/foliwake.config.json --public-origin https://foliwake.example --trust-proxyfoliwake dev
Serve working files with live diagnostics (http://127.0.0.1:3000)
A server process, not a core operation: serves the working files (or the selected snapshot of the site's source) with diagnostics, until Ctrl+C. With --remote: content from the deployed preview (default) or live site, code from this checkout.
text
foliwake dev [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--content <value> | this folder instead of the site's content sources; refused when they need the page ledger |
--port <value> | port to listen on (default 3000) |
| `--remote <[preview | live]>` |
--remote-auth-env <NAME> | with --remote-url: NAME of the environment variable holding the HTTP Basic password (never the password itself) |
--remote-auth-user <value> | with --remote-auth-env: the HTTP Basic user name |
--remote-config <value> | with --remote: another endpoints file than ./foliwake.remote.json (same format, secret-free) |
--remote-url <value> | remote mode with this site origin instead of foliwake.remote.json (https; http only for loopback) |
--site <value> | site id from the project configuration (required when it lists several sites) |
--watch | watch local components/, scripts/, styles/ and Markdown content and reload open browser pages after changes (one reload per burst of saves; problems are shown in the page until fixed). Without it, refresh by hand |
--watch-polling | with --watch: detect code changes by polling file stats (default on macOS); --no-watch-polling: native file-system events (default elsewhere). Precedence: this flag, then FOLIWAKE_WATCH_POLLING=1|0, then CHOKIDAR_USEPOLLING, then the platform default |
bash
foliwake dev
foliwake dev --watch
foliwake dev --port 3001
foliwake dev --config foliwake.config.json --site a
foliwake dev --remote --watch # in the frontend checkout: preview content, local code
foliwake dev --remote live --port 3001
foliwake dev --remote-url https://preview.foliwake.example --remote-auth-user owner --remote-auth-env PREVIEW_PASSWORDfoliwake integration serve
Editor integration API and review route (Drupal editor; 127.0.0.1:8095 by default)
A server process, not a core operation: the editor integration API and its review route, until Ctrl+C. It calls core as the integration service.
text
foliwake integration serve [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--connections <value> | editor integration connections file (environment variable NAMES only) |
--debug | print the underlying error, paths included, on stderr |
--port <value> | port to listen on (default 8095; 0 picks a free one) |
bash
foliwake integration serve --config foliwake.config.json --connections integration.json
foliwake integration serve --config foliwake.config.json --connections integration.json --port 0foliwake serve
Serve published content: live (8080), preview (8081) or all
A server process, not a core operation: every configured site on the shared live and preview listeners, read from their stores, until Ctrl+C. Preview needs the preview token; beyond loopback it needs TLS.
text
foliwake serve [TARGET] [flags]| Flag | Description |
|---|---|
--config <value> | project configuration (default: $FOLIWAKE_CONFIG, else ./foliwake.config.json in this folder) |
--debug | print the underlying error, paths included, on stderr |
--live-port <value> | live port for serve all (default 8080) |
--port <value> | port to listen on (serve live or serve preview) |
--preview-host <value> | bind preview beyond loopback (requires --tls-cert, --tls-key and a preview token) |
--preview-port <value> | preview port for serve all (default 8081) |
--tls-cert <value> | PEM certificate for HTTPS preview |
--tls-key <value> | PEM private key for HTTPS preview |
bash
foliwake serve live
foliwake serve preview
foliwake serve all
foliwake serve all --live-port 9080 --preview-port 9081foliwake server
Run the whole server on one port: dashboard, API and CLI login, live and preview sites (the Docker image runs this)
text
foliwake server [flags]| Flag | Description |
|---|---|
--data <value> | data folder: configuration, accounts, secrets, storage (default: $FOLIWAKE_DATA_DIR, else /data) |
--debug | print failures with their paths on stderr |
--port <value> | the one port (default: $FOLIWAKE_PORT, else 8080) |
bash
foliwake server # data in /data, http://localhost:8080/
foliwake server --data ./data --port 8090