Sophia Stack X

Command reference

Run sophia with nothing after it to start and open the setup page. sophia <command> --help explains any command in full.

Running

CommandWhat it does
sophiaStart with data beside the program and open the browser.
sophia serveRun the server only. The admin is at /admin.
sophia demoCreate a demo site with pages, articles, menus and modules.
sophia backup / restoreBack up everything, or unpack a backup into an empty folder.

Sites and people

CommandWhat it does
site-create <slug> <name> <template>Create a site, with --hosts and --ext.
site-set <slug>Change its domain names (--hosts) or public address (--public-url).
publish <site>Publish a site.
routes <site>List every public address of a site.
user-create <email> <name>Create a person. --super makes them a super user.
grant <email> <site> <group>Put a person in one of a site's groups.
import <file or folder>Import WordPress, Joomla or Markdown.
import-stack2 <folder>Import a Sophia Stack 2 site.

Building

CommandWhat it does
new app|block|component|template <name>Scaffold a working extension.
check <folder>Validate an extension. --json for agents.
build [folders]Build extensions into their dist folders.
schemaPrint the JSON Schema for extension.json.
docsPrint the full reference.
mcpRun the MCP server for AI agents.
keygen, pack, trust, installMake keys, sign packages, trust a publisher, install a package.

Servers

CommandWhat it does
server-installOn a Linux server, as root: install as a service.
update --latestUpdate to the newest signed release.
update <file>Update from a program or bundle file.
deploy <user@host>Install or update a server over ssh.
bundlePack the Linux program with the built extensions.
release --key <key>Write a signed download folder.
ping <url>Check that a server answers.

Options for every command

OptionWhat it does
--root <folder>The folder holding data and extensions.
--data <folder>The data folder (database, sites, installed packages).
--bind <host:port>The address to serve on, such as 127.0.0.1:8806.

Settings can also come from the environment: SOPHIA_DATA, SOPHIA_BIND, SOPHIA_SECURE_COOKIES=1 behind HTTPS, SOPHIA_AI_URL and SOPHIA_AI_MODEL for a local model.