Skip to content

Command line ​

The quantum command. Every command takes -h / --help. The Guide explains the everyday ones: CLI commands.

OptionMeaning
--versionThe installed version.
-h, --helpThe commands and their options.

quantum run ​

Execute a .q file, or run an application in one of its versions (--on).

ArgumentMeaningDefaultValues
file.q file to execute, or with --on the application (its folder)
--onThe application's version: web (the browser), desktop (a window of its own), tui (a text screen drawn by Godot) or terminal (UI-18)web, desktop, tui, terminal
--pageWith --on desktop or terminal: the page to open (default: /)/
--portWith --on web: the port (overrides the config)
--debugDebug mode
--configConfig filequantum.config.yaml
--targetUI target (for type="ui" apps): html or textual (layout only)htmlhtml, textual
--outFor a hive or a screen: write what it compiles to here (projects/<id>/hive or projects/<id>/screen by default)
--checkFor a game: after the build, open the Godot project headless and fail on any script error (needs Godot; python scripts/godot.py install)
--watchFor a game: play it in Godot, and each time the .q (or a file beside it) is saved, build again and go on where the game was, under the new build

Specified by: IA-7 · CFG-1 · UI-0 · UI-2 · UI-8 · UI-18 · UI-20

quantum start ​

Start web server.

ArgumentMeaningDefaultValues
--portPort (overrides config)
--configConfig filequantum.config.yaml
--debugPrint the traceback when the server fails to start (debug mode is server.debug in the config)
--hot-reloadReload the open pages when a component or static file changes
--hot-reload-portWebSocket port for --hot-reload (default 35729)

Specified by: ROUTE-1 · CFG-1 · APP-1 · UI-18 · DEV-1 · DEV-4 · TEST-1

quantum stop ​

Stop running web server.

Specified by: RUN-3

quantum console ​

Open the application's pages in the terminal.

ArgumentMeaningDefaultValues
[path]Page to open (default: /)/
--configConfig filequantum.config.yaml

Specified by: UI-3 · UI-15 · UI-18

quantum pixel ​

Open the application's pages on the Hive's screen (the machine's console).

ArgumentMeaningDefaultValues
[path]Page to open (default: /)/
--configConfig filequantum.config.yaml
--sockethive-screen's pixel socket (default: /run/hive-screen/pixel.sock)/run/hive-screen/pixel.sock

Specified by: UI-15

quantum check ​

Check pages, SQL and query fields against the database.

ArgumentMeaningDefaultValues
--configConfig filequantum.config.yaml
--openapiAlso write the API's OpenAPI document (what /api/openapi.json serves) to FILE

Specified by: ROUTE-4 · API-7 · UI-10 · DEV-3

quantum test ​

Run the app's *.test.q tests.

ArgumentMeaningDefaultValues
[paths]Test files or folders to search for *.test.q (default: .).

Specified by: APP-2 · TEST-1

quantum desktop ​

Open the application's pages in a desktop window.

ArgumentMeaningDefaultValues
[path]Page to open (default: /)/
--configConfig filequantum.config.yaml
--widthWindow width (default: 1024)1024
--heightWindow height (default: 720)720

Specified by: UI-4 · UI-8 · UI-18 · UI-22

quantum package ​

Make one file to hand someone: the application's TUI and its server, for a system.

ArgumentMeaningDefaultValues
appthe application's folder (its quantum.config.yaml)
--onits program: the TUI (default), or a window of its own (Windows, macOS)tuitui, desktop
--targetthe system it runs on (default: linux); any can be made on any; web: the TUI in the browser, in the application's static/tui/, which its server serves; android, ios: a phone, with --serverlinuxlinux, windows, macos, web, android, ios
--outwhere the file goes (default: the application's dist/; for web, its static/tui/)
--servera client of the application hosted at URL (https://...): its program alone, no server or Python of its own beside a TUI
--with-datacarry its SQLite databases as they are (left out by default: its migrations make them when it starts)

Specified by: UI-8 · UI-22

quantum play ​

Play a game step by step (or serve it to an agent, --mcp).

ArgumentMeaningDefaultValues
[game]a game of projects/ (rpg, chess...) or a .q
--mcpserve the play tools over MCP (stdio)
--framesdraw on a virtual display, for "frame"
--livethe game runs at its own speed, not request by request
--hosthost a networked game on this port (live)
--joinjoin a networked game, a person's or another agent's (live)
--seatwith --join: the seat to sit in (else the lowest free)
--langthe language of the game's texts, when it has it (pt, es...)
--transportthe network's transport (websocket: the one a browser joins)enet, websocket

quantum gameserver ​

Run a world: a q:application type="gameserver" (PLAN_GAME_SERVER.md).

quantum gameserver run ​

Run a world (a q:application type="gameserver").

ArgumentMeaningDefaultValues
filethe world's .q
--host127.0.0.1
--port7700
--stepa test world: it ticks only when a client says "step"
--datawhere the world keeps its snapshot and log (.quantum/gameserver/<name>)
--snapshot-every300.0
--statssay the numbers (the ticks' time, what went out) every so often
--no-mindsthe NPCs say the lines of their fallback, and no model is asked
--enginewhat runs the world: python; rust (native/world, PLAN_WORLD_ENGINE.md: the views and the network on every core); or native (the world itself too: its state, its tick and its rules, E3); else QUANTUM_WORLD_ENGINE, else native where the engine is built here (pip install ./native/world), else pythonpython, rust, native
--ruleswhat runs its blocks: python (the interpreter), or machine (the Rust engine's, as bytecode: PLAN_WORLD_ENGINE.md, E2); else QUANTUM_WORLD_RULES, else pythonpython, machine
--digest-everywrite the world's digest into its log every so often, for conform to check a replay against (a digest copies the whole world: a pause of its own)

quantum gameserver conform ​

Run a world's log again on an engine, against the record or another engine, and say the first tick where they differ (PLAN_WORLD_ENGINE.md).

ArgumentMeaningDefaultValues
filethe world's .q
--dataits snapshot and log (.quantum/gameserver/<name>)
--enginethe engine to run it on (python; rust: its frames; machine: its rules as bytecode; native: its state and tick)python
--againsta second engine: the two compared tick by tick, frames and all
--digest-everycompare the two worlds' digests every so many ticks (0: only at the end)1

quantum gameserver bytecode ​

Each expression of a world as the Rust engine's machine runs it, or each block with --blocks (PLAN_WORLD_ENGINE.md, E2).

ArgumentMeaningDefaultValues
filethe world's .q
--expressionthis expression alone (its braces off)
--blockseach block instead: its q:commands, q:functions and rules, statement by statement
--summaryonly how many compiled

quantum gameserver check ​

Read a world against its schema, and say what is wrong.

ArgumentMeaningDefaultValues
file

quantum gameserver ticket ​

A ticket into a world of a site's accounts (accounts="site"), signed with QUANTUM_WORLD_SECRET from the environment.

ArgumentMeaningDefaultValues
--accountthe site's id of the account (its hero: hero:<it>)
--namethe name its hero shows (else the account)
--secondshow long it lasts (a minute)60.0

quantum relay ​

Where browsers meet to play a networked game (rooms over WebSocket).

ArgumentMeaningDefaultValues
--portthe port players join (default 8765)8765
--bindthe address to listen on (default all)0.0.0.0
--certa TLS certificate (PEM): the relay is then wss://, as a page on HTTPS needs
--keythe certificate's private key (PEM)
--projectsthe folder of games (default: projects/)
--max-roomsrooms open at once (default 50)50
--buildsa folder that keeps the compiled games between runs
--prebuildcompile every networked game before serving
--prebuild-onlycompile them, then stop (a container image)

quantum playtest ​

An agent tries to finish each game (projects/games.json goals).

ArgumentMeaningDefaultValues
[games]games of projects/ with a goal (all, by default)
--outwhere the report and the tapes go (default ./playtest)playtest
--modelthe Claude model that playsclaude-opus-5-5
--efforthow hard the model thinks before each callmediumlow, medium, high, xhigh, max

quantum admin ​

Start the Quantum Admin.

ArgumentMeaningDefaultValues
--portPort (default 8090)8090
--dataFolder for the admin database and settings (default ./.quantum-admin).quantum-admin
--rootFolder the project paths are relative to (default: current folder).

quantum pkg ​

Package management commands.

quantum pkg init ​

Initialize a new package.

ArgumentMeaningDefaultValues
[path]Directory to initialize (default: current directory).
-n, --namePackage name (default: directory name)
-d, --descriptionPackage description
-a, --authorPackage author
-l, --licenseLicense identifier (default: MIT)MIT

quantum pkg publish ​

Create publishable package archive.

ArgumentMeaningDefaultValues
[path]Package directory (default: current directory).

quantum pkg install ​

Install a package.

ArgumentMeaningDefaultValues
sourcePackage source (local path or git URL)
-v, --versionSpecific version to install
--no-depsSkip dependency resolution

quantum pkg remove ​

Remove an installed package.

ArgumentMeaningDefaultValues
namePackage name to remove
-v, --versionSpecific version to remove (default: all versions)

quantum pkg list ​

List installed packages.

Search installed packages.

ArgumentMeaningDefaultValues
querySearch query

quantum pkg info ​

Show package details.

ArgumentMeaningDefaultValues
namePackage name
-v, --versionSpecific version

quantum jobs ​

Manage scheduled jobs and job queues.

quantum jobs list ​

List all scheduled jobs.

ArgumentMeaningDefaultValues
--statusFilter by statusallall, active, paused, pending, running, failed
--queueFilter by queue name
--formatOutput formattabletable, json

quantum jobs status ​

Get detailed job status.

ArgumentMeaningDefaultValues
nameJob name
--formatOutput formattabletable, json

quantum jobs run ​

Run a job manually.

ArgumentMeaningDefaultValues
nameJob name
--syncWait for job to complete
--paramsJSON parameters for the job

quantum jobs pause ​

Pause a scheduled job.

ArgumentMeaningDefaultValues
nameJob name

quantum jobs resume ​

Resume a paused job.

ArgumentMeaningDefaultValues
nameJob name

quantum jobs cancel ​

Cancel a running or pending job.

ArgumentMeaningDefaultValues
nameJob name or job ID

quantum jobs history ​

View job execution history.

ArgumentMeaningDefaultValues
[name]Job name (optional, shows all if not specified)
--limitNumber of entries to show10
--statusallall, success, failed
--formatOutput formattabletable, json

quantum jobs worker ​

Start a job worker process.

quantum jobs worker start ​

Start worker.

ArgumentMeaningDefaultValues
--queueQueue(s) to process (comma-separated)default
--concurrencyNumber of concurrent workers4
--poll-intervalPoll interval in seconds1.0

quantum jobs worker stop ​

Stop worker.

ArgumentMeaningDefaultValues
--gracefulWait for running jobs to complete

quantum jobs queues ​

Manage job queues.

quantum jobs queues list ​

List all queues.

ArgumentMeaningDefaultValues
--formattabletable, json

quantum jobs queues purge ​

Purge all jobs from a queue.

ArgumentMeaningDefaultValues
nameQueue name
--statusallall, pending, failed

quantum jobs queues stats ​

Show queue statistics.

ArgumentMeaningDefaultValues
[name]Queue name (optional)

quantum mq ​

Message queue operations.

quantum mq queues ​

Manage message queues.

quantum mq queues list ​

List all queues.

ArgumentMeaningDefaultValues
--formattabletable, json

quantum mq queues create ​

Create a queue.

ArgumentMeaningDefaultValues
nameQueue name
--durableDurable queueTrue
--dlqDead letter queue name
--ttlMessage TTL in milliseconds

quantum mq queues delete ​

Delete a queue.

ArgumentMeaningDefaultValues
nameQueue name
--forceForce delete even if not empty

quantum mq queues purge ​

Purge all messages from a queue.

ArgumentMeaningDefaultValues
nameQueue name

quantum mq queues peek ​

Peek messages without consuming.

ArgumentMeaningDefaultValues
nameQueue name
--limitNumber of messages to peek10
--formattabletable, json

quantum mq topics ​

Manage topics.

quantum mq topics list ​

List all topics.

ArgumentMeaningDefaultValues
--formattabletable, json

quantum mq publish ​

Publish a message to a topic.

ArgumentMeaningDefaultValues
topicTopic name
[message]Message body (JSON string or plain text)
--fileRead message from file
--headerAdd header (format: key=value)

quantum mq send ​

Send a message to a queue.

ArgumentMeaningDefaultValues
queueQueue name
[message]Message body (JSON string or plain text)
--fileRead message from file
--headerAdd header (format: key=value)
--delayDelay in seconds before delivery

quantum mq consume ​

Consume messages from a queue.

ArgumentMeaningDefaultValues
queueQueue name
--limitNumber of messages to consume1
--timeoutTimeout in seconds5
--ackAuto-acknowledge messages
--formatjsontable, json

quantum mq subscribe ​

Subscribe to a topic (real-time).

ArgumentMeaningDefaultValues
topicTopic pattern (supports wildcards)
--formatjsonraw, json

quantum mq worker ​

Start a message worker.

ArgumentMeaningDefaultValues
--queuesQueues to consume (comma-separated)
--handlerHandler script (.q file)
--concurrencyNumber of concurrent consumers4
--prefetchPrefetch count1

quantum mq stats ​

Show message broker statistics.

ArgumentMeaningDefaultValues
--formattabletable, json

quantum mq info ​

Show connection information.

quantum migrate ​

Database migration commands.

ArgumentMeaningDefaultValues
--datasourceDatasource from quantum.config.yaml (default: the only one declared)

Specified by: DB-6 · DB-7 · DB-10 · CFG-3

quantum migrate status ​

Show migration status.

quantum migrate up ​

Apply pending migrations.

ArgumentMeaningDefaultValues
-n, --countNumber of migrations to apply

Specified by: DB-7

quantum migrate down ​

Rollback migrations.

ArgumentMeaningDefaultValues
-n, --countNumber of migrations to rollback1

quantum migrate create ​

Create a new migration.

ArgumentMeaningDefaultValues
nameMigration name

quantum migrate plan ​

Compare schema.sql with the migrations and plan the migration.

ArgumentMeaningDefaultValues
--schemaSchema file (default: schema.sql)schema.sql
--writeSave the plan as migration V00N_NAME
--yesDo not ask before writing
--allow-data-lossWrite a plan that drops tables or columns

Specified by: DB-10

MIT Licensed · Built with VitePress