mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-15 04:08:02 -04:00
494 lines
59 KiB
HTML
494 lines
59 KiB
HTML
<!doctype html>
|
||
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-CLI Reference/CLI Reference" data-has-hydrated="false">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="generator" content="Docusaurus v3.9.1">
|
||
<title data-rh="true">CLI Reference | SpacetimeDB docs</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://docs.spacetimedb.com/cli-reference"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="CLI Reference | SpacetimeDB docs"><meta data-rh="true" name="description" content="This document contains the help content for the spacetime command-line program."><meta data-rh="true" property="og:description" content="This document contains the help content for the spacetime command-line program."><link data-rh="true" rel="icon" href="/images/favicon.ico"><link data-rh="true" rel="canonical" href="https://docs.spacetimedb.com/cli-reference"><link data-rh="true" rel="alternate" href="https://docs.spacetimedb.com/cli-reference" hreflang="en"><link data-rh="true" rel="alternate" href="https://docs.spacetimedb.com/cli-reference" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://QBC7Z9KXS2-dsn.algolia.net" crossorigin="anonymous"><script data-rh="true" type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"CLI Reference","item":"https://docs.spacetimedb.com/cli-reference"}]}</script><link rel="search" type="application/opensearchdescription+xml" title="SpacetimeDB docs" href="/opensearch.xml"><link rel="stylesheet" href="/assets/css/styles.0cb9f7a7.css">
|
||
<script src="/assets/js/runtime~main.d71df0f5.js" defer="defer"></script>
|
||
<script src="/assets/js/main.31d95d83.js" defer="defer"></script>
|
||
</head>
|
||
<body class="navigation-with-keyboard">
|
||
<svg style="display: none;"><defs>
|
||
<symbol id="theme-svg-external-link" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
|
||
</defs></svg>
|
||
<script>document.documentElement.setAttribute("data-theme","light"),document.documentElement.setAttribute("data-theme-choice","light"),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><link rel="preload" as="image" href="https://spacetimedb.com/images/brand.png"><div role="region" aria-label="Skip to main content"><a class="skipToContent_6jFv" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="theme-layout-navbar navbar navbar--fixed-top"><div class="navbar__inner"><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="https://spacetimedb.com/images/brand.png" alt="SpacetimeDB Logo" class="themedComponent_rvet themedComponent--light_mbAJ"><img src="https://spacetimedb.com/images/brand.png" alt="SpacetimeDB Logo" class="themedComponent_rvet themedComponent--dark_Ncy6"></div></a><div class="navbarSearchContainer_AesG"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search (Command+K)"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><a href="https://spacetimedb.com/install" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Install</a><a href="https://spacetimedb.com/pricing" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Pricing</a><a href="https://spacetimedb.com/maincloud" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Maincloud</a><a href="https://spacetimedb.com/blog" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Blog</a><a href="https://spacetimedb.com/community" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Community</a></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="theme-layout-main main-wrapper mainWrapper_hV_y"><div class="docsWrapper_f07g"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_MJiz" type="button"></button><div class="docRoot_Gd2s"><aside class="theme-doc-sidebar-container docSidebarContainer_fSpF"><div class="sidebarViewport_YElg"><div class="sidebar_kjg4"><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_AG0n"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/"><span title="Intro" class="categoryLinkLabel_EDYQ">Intro</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/deploying/maincloud"><span title="Deploying" class="categoryLinkLabel_EDYQ">Deploying</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/unity"><span title="Unity tutorial" class="categoryLinkLabel_EDYQ">Unity tutorial</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/unreal"><span title="Unreal Tutorial" class="categoryLinkLabel_EDYQ">Unreal Tutorial</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role="button" aria-expanded="true" href="/cli-reference"><span title="CLI Reference" class="categoryLinkLabel_EDYQ">CLI Reference</span></a></div><ul class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/cli-reference"><span title="CLI Reference" class="linkLabel_dpMB">CLI Reference</span></a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/cli-reference/standalone-config"><span title="Standalone Configuration" class="linkLabel_dpMB">Standalone Configuration</span></a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/modules"><span title="Server Module Languages" class="categoryLinkLabel_EDYQ">Server Module Languages</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/sdks"><span title="Client SDK Languages" class="categoryLinkLabel_EDYQ">Client SDK Languages</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/sql"><span title="SQL" class="categoryLinkLabel_EDYQ">SQL</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/subscriptions"><span title="Subscriptions" class="categoryLinkLabel_EDYQ">Subscriptions</span></a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/rls"><span title="Row Level Security" class="linkLabel_dpMB">Row Level Security</span></a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/how-to/incremental-migrations"><span title="How-To" class="categoryLinkLabel_EDYQ">How-To</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/spacetimeauth"><span title="SpacetimeAuth" class="categoryLinkLabel_EDYQ">SpacetimeAuth</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/http/authorization"><span title="HTTP API" class="categoryLinkLabel_EDYQ">HTTP API</span></a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="categoryLink_ggI5 menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/webassembly-abi"><span title="Internals" class="categoryLinkLabel_EDYQ">Internals</span></a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/appendix"><span title="Appendix" class="linkLabel_dpMB">Appendix</span></a></li></ul></nav></div></div></aside><main class="docMainContainer_dkUT"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_w2oE"><div class="docItemContainer_f71m"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_xsLZ" aria-label="Breadcrumbs"><ul class="breadcrumbs"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_oyay"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">CLI Reference</span></li><li class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link">CLI Reference</span></li></ul></nav><div class="tocCollapsible_dqme theme-doc-toc-mobile tocMobile_Z34P"><button type="button" class="clean-btn tocCollapsibleButton_QMSE">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Command-Line Help for <code>spacetime</code></h1></header>
|
||
<p>This document contains the help content for the <code>spacetime</code> command-line program.</p>
|
||
<p><strong>Command Overview:</strong></p>
|
||
<ul>
|
||
<li><a href="#spacetime"><code>spacetime</code>↴</a></li>
|
||
<li><a href="#spacetime-publish"><code>spacetime publish</code>↴</a></li>
|
||
<li><a href="#spacetime-delete"><code>spacetime delete</code>↴</a></li>
|
||
<li><a href="#spacetime-logs"><code>spacetime logs</code>↴</a></li>
|
||
<li><a href="#spacetime-call"><code>spacetime call</code>↴</a></li>
|
||
<li><a href="#spacetime-describe"><code>spacetime describe</code>↴</a></li>
|
||
<li><a href="#spacetime-energy"><code>spacetime energy</code>↴</a></li>
|
||
<li><a href="#spacetime-energy-balance"><code>spacetime energy balance</code>↴</a></li>
|
||
<li><a href="#spacetime-sql"><code>spacetime sql</code>↴</a></li>
|
||
<li><a href="#spacetime-rename"><code>spacetime rename</code>↴</a></li>
|
||
<li><a href="#spacetime-generate"><code>spacetime generate</code>↴</a></li>
|
||
<li><a href="#spacetime-list"><code>spacetime list</code>↴</a></li>
|
||
<li><a href="#spacetime-login"><code>spacetime login</code>↴</a></li>
|
||
<li><a href="#spacetime-login-show"><code>spacetime login show</code>↴</a></li>
|
||
<li><a href="#spacetime-logout"><code>spacetime logout</code>↴</a></li>
|
||
<li><a href="#spacetime-init"><code>spacetime init</code>↴</a></li>
|
||
<li><a href="#spacetime-build"><code>spacetime build</code>↴</a></li>
|
||
<li><a href="#spacetime-server"><code>spacetime server</code>↴</a></li>
|
||
<li><a href="#spacetime-server-list"><code>spacetime server list</code>↴</a></li>
|
||
<li><a href="#spacetime-server-set-default"><code>spacetime server set-default</code>↴</a></li>
|
||
<li><a href="#spacetime-server-add"><code>spacetime server add</code>↴</a></li>
|
||
<li><a href="#spacetime-server-remove"><code>spacetime server remove</code>↴</a></li>
|
||
<li><a href="#spacetime-server-fingerprint"><code>spacetime server fingerprint</code>↴</a></li>
|
||
<li><a href="#spacetime-server-ping"><code>spacetime server ping</code>↴</a></li>
|
||
<li><a href="#spacetime-server-edit"><code>spacetime server edit</code>↴</a></li>
|
||
<li><a href="#spacetime-server-clear"><code>spacetime server clear</code>↴</a></li>
|
||
<li><a href="#spacetime-subscribe"><code>spacetime subscribe</code>↴</a></li>
|
||
<li><a href="#spacetime-start"><code>spacetime start</code>↴</a></li>
|
||
<li><a href="#spacetime-version"><code>spacetime version</code>↴</a></li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime">spacetime<a href="#spacetime" class="hash-link" aria-label="Direct link to spacetime" title="Direct link to spacetime" translate="no"></a></h2>
|
||
<p><strong>Usage:</strong> <code>spacetime [OPTIONS] <COMMAND></code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="subcommands"><strong>Subcommands:</strong><a href="#subcommands" class="hash-link" aria-label="Direct link to subcommands" title="Direct link to subcommands" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>publish</code> — Create and update a SpacetimeDB database</li>
|
||
<li><code>delete</code> — Deletes a SpacetimeDB database</li>
|
||
<li><code>logs</code> — Prints logs from a SpacetimeDB database</li>
|
||
<li><code>call</code> — Invokes a reducer function in a database. WARNING: This command is UNSTABLE and subject to breaking changes.</li>
|
||
<li><code>describe</code> — Describe the structure of a database or entities within it. WARNING: This command is UNSTABLE and subject to breaking changes.</li>
|
||
<li><code>energy</code> — Invokes commands related to database budgets. WARNING: This command is UNSTABLE and subject to breaking changes.</li>
|
||
<li><code>sql</code> — Runs a SQL query on the database. WARNING: This command is UNSTABLE and subject to breaking changes.</li>
|
||
<li><code>rename</code> — Rename a database</li>
|
||
<li><code>generate</code> — Generate client files for a spacetime module.</li>
|
||
<li><code>list</code> — Lists the databases attached to an identity. WARNING: This command is UNSTABLE and subject to breaking changes.</li>
|
||
<li><code>login</code> — Manage your login to the SpacetimeDB CLI</li>
|
||
<li><code>logout</code> —</li>
|
||
<li><code>init</code> — Initializes a new spacetime project. WARNING: This command is UNSTABLE and subject to breaking changes.</li>
|
||
<li><code>build</code> — Builds a spacetime module.</li>
|
||
<li><code>server</code> — Manage the connection to the SpacetimeDB server. WARNING: This command is UNSTABLE and subject to breaking changes.</li>
|
||
<li><code>subscribe</code> — Subscribe to SQL queries on the database. WARNING: This command is UNSTABLE and subject to breaking changes.</li>
|
||
<li><code>start</code> — Start a local SpacetimeDB instance</li>
|
||
<li><code>version</code> — Manage installed spacetime versions</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options"><b>Options:</b><a href="#options" class="hash-link" aria-label="Direct link to options" title="Direct link to options" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>--root-dir <ROOT_DIR></code> — The root directory to store all spacetime files in.</li>
|
||
<li><code>--config-path <CONFIG_PATH></code> — The path to the cli.toml config file</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-publish">spacetime publish<a href="#spacetime-publish" class="hash-link" aria-label="Direct link to spacetime publish" title="Direct link to spacetime publish" translate="no"></a></h2>
|
||
<p>Create and update a SpacetimeDB database</p>
|
||
<p><strong>Usage:</strong> <code>spacetime publish [OPTIONS] [name|identity]</code></p>
|
||
<p>Run <code>spacetime help publish</code> for more detailed information.</p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments"><b>Arguments:</b><a href="#arguments" class="hash-link" aria-label="Direct link to arguments" title="Direct link to arguments" translate="no"></a></h6>
|
||
<ul>
|
||
<li>
|
||
<p><code><NAME|IDENTITY></code> — A valid domain or identity for this database.</p>
|
||
<p>Database names must match the regex <code>/^[a-z0-9]+(-[a-z0-9]+)*$/</code>,
|
||
i.e. only lowercase ASCII letters and numbers, separated by dashes.</p>
|
||
</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-1"><b>Options:</b><a href="#options-1" class="hash-link" aria-label="Direct link to options-1" title="Direct link to options-1" translate="no"></a></h6>
|
||
<ul>
|
||
<li>
|
||
<p><code>-c</code>, <code>--delete-data</code> — When publishing to an existing database identity, first DESTROY all data associated with the module</p>
|
||
</li>
|
||
<li>
|
||
<p><code>--build-options <BUILD_OPTIONS></code> — Options to pass to the build command, for example --build-options='--lint-dir='</p>
|
||
<p>Default value: ``</p>
|
||
</li>
|
||
<li>
|
||
<p><code>-p</code>, <code>--project-path <PROJECT_PATH></code> — The system path (absolute or relative) to the module project</p>
|
||
<p>Default value: <code>.</code></p>
|
||
</li>
|
||
<li>
|
||
<p><code>-b</code>, <code>--bin-path <WASM_FILE></code> — The system path (absolute or relative) to the compiled wasm binary we should publish, instead of building the project.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>--break-clients</code> — Allow breaking changes when publishing to an existing database identity. This will break existing clients.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>--anonymous</code> — Perform this action with an anonymous identity</p>
|
||
</li>
|
||
<li>
|
||
<p><code>-s</code>, <code>--server <SERVER></code> — The nickname, domain name or URL of the server to host the database.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</p>
|
||
</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-delete">spacetime delete<a href="#spacetime-delete" class="hash-link" aria-label="Direct link to spacetime delete" title="Direct link to spacetime delete" translate="no"></a></h2>
|
||
<p>Deletes a SpacetimeDB database</p>
|
||
<p><strong>Usage:</strong> <code>spacetime delete [OPTIONS] <database></code></p>
|
||
<p>Run <code>spacetime help delete</code> for more detailed information.</p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-1"><b>Arguments:</b><a href="#arguments-1" class="hash-link" aria-label="Direct link to arguments-1" title="Direct link to arguments-1" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><DATABASE></code> — The name or identity of the database to delete</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-2"><b>Options:</b><a href="#options-2" class="hash-link" aria-label="Direct link to options-2" title="Direct link to options-2" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>-s</code>, <code>--server <SERVER></code> — The nickname, host name or URL of the server hosting the database</li>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-logs">spacetime logs<a href="#spacetime-logs" class="hash-link" aria-label="Direct link to spacetime logs" title="Direct link to spacetime logs" translate="no"></a></h2>
|
||
<p>Prints logs from a SpacetimeDB database</p>
|
||
<p><strong>Usage:</strong> <code>spacetime logs [OPTIONS] <database></code></p>
|
||
<p>Run <code>spacetime help logs</code> for more detailed information.</p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-2"><b>Arguments:</b><a href="#arguments-2" class="hash-link" aria-label="Direct link to arguments-2" title="Direct link to arguments-2" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><DATABASE></code> — The name or identity of the database to print logs from</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-3"><b>Options:</b><a href="#options-3" class="hash-link" aria-label="Direct link to options-3" title="Direct link to options-3" translate="no"></a></h6>
|
||
<ul>
|
||
<li>
|
||
<p><code>-s</code>, <code>--server <SERVER></code> — The nickname, host name or URL of the server hosting the database</p>
|
||
</li>
|
||
<li>
|
||
<p><code>-n</code>, <code>--num-lines <NUM_LINES></code> — The number of lines to print from the start of the log of this database. If no num lines is provided, all lines will be returned.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>-f</code>, <code>--follow</code> — A flag that causes logs to not stop when end of the log file is reached, but rather to wait for additional data to be appended to the input.</p>
|
||
</li>
|
||
<li>
|
||
<p><code>--format <FORMAT></code> — Output format for the logs</p>
|
||
<p>Default value: <code>text</code></p>
|
||
<p>Possible values: <code>text</code>, <code>json</code></p>
|
||
</li>
|
||
<li>
|
||
<p><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</p>
|
||
</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-call">spacetime call<a href="#spacetime-call" class="hash-link" aria-label="Direct link to spacetime call" title="Direct link to spacetime call" translate="no"></a></h2>
|
||
<p>Invokes a reducer function in a database. WARNING: This command is UNSTABLE and subject to breaking changes.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime call [OPTIONS] <database> <reducer_name> [arguments]...</code></p>
|
||
<p>Run <code>spacetime help call</code> for more detailed information.</p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-3"><b>Arguments:</b><a href="#arguments-3" class="hash-link" aria-label="Direct link to arguments-3" title="Direct link to arguments-3" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><DATABASE></code> — The database name or identity to use to invoke the call</li>
|
||
<li><code><REDUCER_NAME></code> — The name of the reducer to call</li>
|
||
<li><code><ARGUMENTS></code> — arguments formatted as JSON</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-4"><b>Options:</b><a href="#options-4" class="hash-link" aria-label="Direct link to options-4" title="Direct link to options-4" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>-s</code>, <code>--server <SERVER></code> — The nickname, host name or URL of the server hosting the database</li>
|
||
<li><code>--anonymous</code> — Perform this action with an anonymous identity</li>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-describe">spacetime describe<a href="#spacetime-describe" class="hash-link" aria-label="Direct link to spacetime describe" title="Direct link to spacetime describe" translate="no"></a></h2>
|
||
<p>Describe the structure of a database or entities within it. WARNING: This command is UNSTABLE and subject to breaking changes.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime describe [OPTIONS] --json <database> [entity_type] [entity_name]</code></p>
|
||
<p>Run <code>spacetime help describe</code> for more detailed information.</p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-4"><b>Arguments:</b><a href="#arguments-4" class="hash-link" aria-label="Direct link to arguments-4" title="Direct link to arguments-4" translate="no"></a></h6>
|
||
<ul>
|
||
<li>
|
||
<p><code><DATABASE></code> — The name or identity of the database to describe</p>
|
||
</li>
|
||
<li>
|
||
<p><code><ENTITY_TYPE></code> — Whether to describe a reducer or table</p>
|
||
<p>Possible values: <code>reducer</code>, <code>table</code></p>
|
||
</li>
|
||
<li>
|
||
<p><code><ENTITY_NAME></code> — The name of the entity to describe</p>
|
||
</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-5"><b>Options:</b><a href="#options-5" class="hash-link" aria-label="Direct link to options-5" title="Direct link to options-5" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>--json</code> — Output the schema in JSON format. Currently required; in the future, omitting this will give human-readable output.</li>
|
||
<li><code>--anonymous</code> — Perform this action with an anonymous identity</li>
|
||
<li><code>-s</code>, <code>--server <SERVER></code> — The nickname, host name or URL of the server hosting the database</li>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-energy">spacetime energy<a href="#spacetime-energy" class="hash-link" aria-label="Direct link to spacetime energy" title="Direct link to spacetime energy" translate="no"></a></h2>
|
||
<p>Invokes commands related to database budgets. WARNING: This command is UNSTABLE and subject to breaking changes.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime energy energy <COMMAND></code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="subcommands-1"><b>Subcommands:</b><a href="#subcommands-1" class="hash-link" aria-label="Direct link to subcommands-1" title="Direct link to subcommands-1" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>balance</code> — Show current energy balance for an identity</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-energy-balance">spacetime energy balance<a href="#spacetime-energy-balance" class="hash-link" aria-label="Direct link to spacetime energy balance" title="Direct link to spacetime energy balance" translate="no"></a></h2>
|
||
<p>Show current energy balance for an identity</p>
|
||
<p><strong>Usage:</strong> <code>spacetime energy balance [OPTIONS]</code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-6"><b>Options:</b><a href="#options-6" class="hash-link" aria-label="Direct link to options-6" title="Direct link to options-6" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>-i</code>, <code>--identity <IDENTITY></code> — The identity to check the balance for. If no identity is provided, the default one will be used.</li>
|
||
<li><code>-s</code>, <code>--server <SERVER></code> — The nickname, host name or URL of the server from which to request balance information</li>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-sql">spacetime sql<a href="#spacetime-sql" class="hash-link" aria-label="Direct link to spacetime sql" title="Direct link to spacetime sql" translate="no"></a></h2>
|
||
<p>Runs a SQL query on the database. WARNING: This command is UNSTABLE and subject to breaking changes.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime sql [OPTIONS] <database> <query></code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-5"><b>Arguments:</b><a href="#arguments-5" class="hash-link" aria-label="Direct link to arguments-5" title="Direct link to arguments-5" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><DATABASE></code> — The name or identity of the database you would like to query</li>
|
||
<li><code><QUERY></code> — The SQL query to execute</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-7"><b>Options:</b><a href="#options-7" class="hash-link" aria-label="Direct link to options-7" title="Direct link to options-7" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>--interactive</code> — Instead of using a query, run an interactive command prompt for <code>SQL</code> expressions</li>
|
||
<li><code>--confirmed</code> — Instruct the server to deliver only updates of confirmed transactions</li>
|
||
<li><code>--anonymous</code> — Perform this action with an anonymous identity</li>
|
||
<li><code>-s</code>, <code>--server <SERVER></code> — The nickname, host name or URL of the server hosting the database</li>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-rename">spacetime rename<a href="#spacetime-rename" class="hash-link" aria-label="Direct link to spacetime rename" title="Direct link to spacetime rename" translate="no"></a></h2>
|
||
<p>Rename a database</p>
|
||
<p><strong>Usage:</strong> <code>spacetime rename [OPTIONS] --to <new-name> <database-identity></code></p>
|
||
<p>Run <code>spacetime rename --help</code> for more detailed information.</p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-6"><b>Arguments:</b><a href="#arguments-6" class="hash-link" aria-label="Direct link to arguments-6" title="Direct link to arguments-6" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><DATABASE-IDENTITY></code> — The database identity to rename</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-8"><b>Options:</b><a href="#options-8" class="hash-link" aria-label="Direct link to options-8" title="Direct link to options-8" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>--to <NEW-NAME></code> — The new name you would like to assign</li>
|
||
<li><code>-s</code>, <code>--server <SERVER></code> — The nickname, host name or URL of the server on which to set the name</li>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-generate">spacetime generate<a href="#spacetime-generate" class="hash-link" aria-label="Direct link to spacetime generate" title="Direct link to spacetime generate" translate="no"></a></h2>
|
||
<p>Generate client files for a spacetime module.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime spacetime generate --lang <LANG> --out-dir <DIR> [--project-path <DIR> | --bin-path <PATH> | --module-name <MODULE_NAME> | --uproject-dir <DIR>]</code></p>
|
||
<p>Run <code>spacetime help publish</code> for more detailed information.</p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-9"><b>Options:</b><a href="#options-9" class="hash-link" aria-label="Direct link to options-9" title="Direct link to options-9" translate="no"></a></h6>
|
||
<ul>
|
||
<li>
|
||
<p><code>-b</code>, <code>--bin-path <WASM_FILE></code> — The system path (absolute or relative) to the compiled wasm binary we should inspect</p>
|
||
</li>
|
||
<li>
|
||
<p><code>-p</code>, <code>--project-path <PROJECT_PATH></code> — The system path (absolute or relative) to the project you would like to inspect</p>
|
||
<p>Default value: <code>.</code></p>
|
||
</li>
|
||
<li>
|
||
<p><code>-o</code>, <code>--out-dir <OUT_DIR></code> — The system path (absolute or relative) to the generate output directory</p>
|
||
</li>
|
||
<li>
|
||
<p><code>--uproject-dir <UPROJECT_DIR></code> — Path to the Unreal project directory, replaces --out-dir for Unreal generation (only used with --lang unrealcpp)</p>
|
||
</li>
|
||
<li>
|
||
<p><code>--namespace <NAMESPACE></code> — The namespace that should be used</p>
|
||
<p>Default value: <code>SpacetimeDB.Types</code></p>
|
||
</li>
|
||
<li>
|
||
<p><code>--module-name <MODULE_NAME></code> — The module name that should be used for DLL export macros (required for lang unrealcpp)</p>
|
||
</li>
|
||
<li>
|
||
<p><code>-l</code>, <code>--lang <LANG></code> — The language to generate</p>
|
||
<p>Possible values: <code>csharp</code>, <code>typescript</code>, <code>rust</code>, <code>unrealcpp</code></p>
|
||
</li>
|
||
<li>
|
||
<p><code>--build-options <BUILD_OPTIONS></code> — Options to pass to the build command, for example --build-options='--lint-dir='</p>
|
||
<p>Default value: ``</p>
|
||
</li>
|
||
<li>
|
||
<p><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</p>
|
||
</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-list">spacetime list<a href="#spacetime-list" class="hash-link" aria-label="Direct link to spacetime list" title="Direct link to spacetime list" translate="no"></a></h2>
|
||
<p>Lists the databases attached to an identity. WARNING: This command is UNSTABLE and subject to breaking changes.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime list [OPTIONS]</code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-10"><b>Options:</b><a href="#options-10" class="hash-link" aria-label="Direct link to options-10" title="Direct link to options-10" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>-s</code>, <code>--server <SERVER></code> — The nickname, host name or URL of the server from which to list databases</li>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-login">spacetime login<a href="#spacetime-login" class="hash-link" aria-label="Direct link to spacetime login" title="Direct link to spacetime login" translate="no"></a></h2>
|
||
<p>Manage your login to the SpacetimeDB CLI</p>
|
||
<p><strong>Usage:</strong> <code>spacetime login [OPTIONS] login <COMMAND></code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="subcommands-2"><b>Subcommands:</b><a href="#subcommands-2" class="hash-link" aria-label="Direct link to subcommands-2" title="Direct link to subcommands-2" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>show</code> — Show the current login info</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-11"><b>Options:</b><a href="#options-11" class="hash-link" aria-label="Direct link to options-11" title="Direct link to options-11" translate="no"></a></h6>
|
||
<ul>
|
||
<li>
|
||
<p><code>--auth-host <AUTH-HOST></code> — Fetch login token from a different host</p>
|
||
<p>Default value: <code>https://spacetimedb.com</code></p>
|
||
</li>
|
||
<li>
|
||
<p><code>--server-issued-login <SERVER></code> — Log in to a SpacetimeDB server directly, without going through a global auth server</p>
|
||
</li>
|
||
<li>
|
||
<p><code>--token <SPACETIMEDB-TOKEN></code> — Bypass the login flow and use a login token directly</p>
|
||
</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-login-show">spacetime login show<a href="#spacetime-login-show" class="hash-link" aria-label="Direct link to spacetime login show" title="Direct link to spacetime login show" translate="no"></a></h2>
|
||
<p>Show the current login info</p>
|
||
<p><strong>Usage:</strong> <code>spacetime login show [OPTIONS]</code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-12"><b>Options:</b><a href="#options-12" class="hash-link" aria-label="Direct link to options-12" title="Direct link to options-12" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>--token</code> — Also show the auth token</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-logout">spacetime logout<a href="#spacetime-logout" class="hash-link" aria-label="Direct link to spacetime logout" title="Direct link to spacetime logout" translate="no"></a></h2>
|
||
<p><strong>Usage:</strong> <code>spacetime logout [OPTIONS]</code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-13"><b>Options:</b><a href="#options-13" class="hash-link" aria-label="Direct link to options-13" title="Direct link to options-13" translate="no"></a></h6>
|
||
<ul>
|
||
<li>
|
||
<p><code>--auth-host <AUTH-HOST></code> — Log out from a custom auth server</p>
|
||
<p>Default value: <code>https://spacetimedb.com</code></p>
|
||
</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-init">spacetime init<a href="#spacetime-init" class="hash-link" aria-label="Direct link to spacetime init" title="Direct link to spacetime init" translate="no"></a></h2>
|
||
<p>Initializes a new spacetime project. WARNING: This command is UNSTABLE and subject to breaking changes.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime init --lang <lang> [project-path]</code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-7"><b>Arguments:</b><a href="#arguments-7" class="hash-link" aria-label="Direct link to arguments-7" title="Direct link to arguments-7" translate="no"></a></h6>
|
||
<ul>
|
||
<li>
|
||
<p><code><PROJECT-PATH></code> — The path where we will create the spacetime project</p>
|
||
<p>Default value: <code>.</code></p>
|
||
</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-14"><b>Options:</b><a href="#options-14" class="hash-link" aria-label="Direct link to options-14" title="Direct link to options-14" translate="no"></a></h6>
|
||
<ul>
|
||
<li>
|
||
<p><code>-l</code>, <code>--lang <LANG></code> — The spacetime module language.</p>
|
||
<p>Possible values: <code>csharp</code>, <code>rust</code></p>
|
||
</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-build">spacetime build<a href="#spacetime-build" class="hash-link" aria-label="Direct link to spacetime build" title="Direct link to spacetime build" translate="no"></a></h2>
|
||
<p>Builds a spacetime module.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime build [OPTIONS]</code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-15"><b>Options:</b><a href="#options-15" class="hash-link" aria-label="Direct link to options-15" title="Direct link to options-15" translate="no"></a></h6>
|
||
<ul>
|
||
<li>
|
||
<p><code>-p</code>, <code>--project-path <PROJECT_PATH></code> — The system path (absolute or relative) to the project you would like to build</p>
|
||
<p>Default value: <code>.</code></p>
|
||
</li>
|
||
<li>
|
||
<p><code>--lint-dir <LINT_DIR></code> — The directory to lint for nonfunctional print statements. If set to the empty string, skips linting.</p>
|
||
<p>Default value: <code>src</code></p>
|
||
</li>
|
||
<li>
|
||
<p><code>-d</code>, <code>--debug</code> — Builds the module using debug instead of release (intended to speed up local iteration, not recommended for CI)</p>
|
||
</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-server">spacetime server<a href="#spacetime-server" class="hash-link" aria-label="Direct link to spacetime server" title="Direct link to spacetime server" translate="no"></a></h2>
|
||
<p>Manage the connection to the SpacetimeDB server. WARNING: This command is UNSTABLE and subject to breaking changes.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime server server <COMMAND></code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="subcommands-3"><b>Subcommands:</b><a href="#subcommands-3" class="hash-link" aria-label="Direct link to subcommands-3" title="Direct link to subcommands-3" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>list</code> — List stored server configurations</li>
|
||
<li><code>set-default</code> — Set the default server for future operations</li>
|
||
<li><code>add</code> — Add a new server configuration</li>
|
||
<li><code>remove</code> — Remove a saved server configuration</li>
|
||
<li><code>fingerprint</code> — Show or update a saved server's fingerprint</li>
|
||
<li><code>ping</code> — Checks to see if a SpacetimeDB host is online</li>
|
||
<li><code>edit</code> — Update a saved server's nickname, host name or protocol</li>
|
||
<li><code>clear</code> — Deletes all data from all local databases</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-server-list">spacetime server list<a href="#spacetime-server-list" class="hash-link" aria-label="Direct link to spacetime server list" title="Direct link to spacetime server list" translate="no"></a></h2>
|
||
<p>List stored server configurations</p>
|
||
<p><strong>Usage:</strong> <code>spacetime server list</code></p>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-server-set-default">spacetime server set-default<a href="#spacetime-server-set-default" class="hash-link" aria-label="Direct link to spacetime server set-default" title="Direct link to spacetime server set-default" translate="no"></a></h2>
|
||
<p>Set the default server for future operations</p>
|
||
<p><strong>Usage:</strong> <code>spacetime server set-default <server></code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-8"><b>Arguments:</b><a href="#arguments-8" class="hash-link" aria-label="Direct link to arguments-8" title="Direct link to arguments-8" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><SERVER></code> — The nickname, host name or URL of the new default server</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-server-add">spacetime server add<a href="#spacetime-server-add" class="hash-link" aria-label="Direct link to spacetime server add" title="Direct link to spacetime server add" translate="no"></a></h2>
|
||
<p>Add a new server configuration</p>
|
||
<p><strong>Usage:</strong> <code>spacetime server add [OPTIONS] --url <url> <name></code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-9"><b>Arguments:</b><a href="#arguments-9" class="hash-link" aria-label="Direct link to arguments-9" title="Direct link to arguments-9" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><NAME></code> — Nickname for this server</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-16"><b>Options:</b><a href="#options-16" class="hash-link" aria-label="Direct link to options-16" title="Direct link to options-16" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>--url <URL></code> — The URL of the server to add</li>
|
||
<li><code>-d</code>, <code>--default</code> — Make the new server the default server for future operations</li>
|
||
<li><code>--no-fingerprint</code> — Skip fingerprinting the server</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-server-remove">spacetime server remove<a href="#spacetime-server-remove" class="hash-link" aria-label="Direct link to spacetime server remove" title="Direct link to spacetime server remove" translate="no"></a></h2>
|
||
<p>Remove a saved server configuration</p>
|
||
<p><strong>Usage:</strong> <code>spacetime server remove [OPTIONS] <server></code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-10"><b>Arguments:</b><a href="#arguments-10" class="hash-link" aria-label="Direct link to arguments-10" title="Direct link to arguments-10" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><SERVER></code> — The nickname, host name or URL of the server to remove</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-17"><b>Options:</b><a href="#options-17" class="hash-link" aria-label="Direct link to options-17" title="Direct link to options-17" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-server-fingerprint">spacetime server fingerprint<a href="#spacetime-server-fingerprint" class="hash-link" aria-label="Direct link to spacetime server fingerprint" title="Direct link to spacetime server fingerprint" translate="no"></a></h2>
|
||
<p>Show or update a saved server's fingerprint</p>
|
||
<p><strong>Usage:</strong> <code>spacetime server fingerprint [OPTIONS] <server></code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-11"><b>Arguments:</b><a href="#arguments-11" class="hash-link" aria-label="Direct link to arguments-11" title="Direct link to arguments-11" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><SERVER></code> — The nickname, host name or URL of the server</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-18"><b>Options:</b><a href="#options-18" class="hash-link" aria-label="Direct link to options-18" title="Direct link to options-18" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-server-ping">spacetime server ping<a href="#spacetime-server-ping" class="hash-link" aria-label="Direct link to spacetime server ping" title="Direct link to spacetime server ping" translate="no"></a></h2>
|
||
<p>Checks to see if a SpacetimeDB host is online</p>
|
||
<p><strong>Usage:</strong> <code>spacetime server ping <server></code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-12"><b>Arguments:</b><a href="#arguments-12" class="hash-link" aria-label="Direct link to arguments-12" title="Direct link to arguments-12" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><SERVER></code> — The nickname, host name or URL of the server to ping</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-server-edit">spacetime server edit<a href="#spacetime-server-edit" class="hash-link" aria-label="Direct link to spacetime server edit" title="Direct link to spacetime server edit" translate="no"></a></h2>
|
||
<p>Update a saved server's nickname, host name or protocol</p>
|
||
<p><strong>Usage:</strong> <code>spacetime server edit [OPTIONS] <server></code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-13"><b>Arguments:</b><a href="#arguments-13" class="hash-link" aria-label="Direct link to arguments-13" title="Direct link to arguments-13" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><SERVER></code> — The nickname, host name or URL of the server</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-19"><b>Options:</b><a href="#options-19" class="hash-link" aria-label="Direct link to options-19" title="Direct link to options-19" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>--new-name <NICKNAME></code> — A new nickname to assign the server configuration</li>
|
||
<li><code>--url <URL></code> — A new URL to assign the server configuration</li>
|
||
<li><code>--no-fingerprint</code> — Skip fingerprinting the server</li>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-server-clear">spacetime server clear<a href="#spacetime-server-clear" class="hash-link" aria-label="Direct link to spacetime server clear" title="Direct link to spacetime server clear" translate="no"></a></h2>
|
||
<p>Deletes all data from all local databases</p>
|
||
<p><strong>Usage:</strong> <code>spacetime server clear [OPTIONS]</code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-20"><b>Options:</b><a href="#options-20" class="hash-link" aria-label="Direct link to options-20" title="Direct link to options-20" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>--data-dir <DATA_DIR></code> — The path to the server data directory to clear [default: that of the selected spacetime instance]</li>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-subscribe">spacetime subscribe<a href="#spacetime-subscribe" class="hash-link" aria-label="Direct link to spacetime subscribe" title="Direct link to spacetime subscribe" translate="no"></a></h2>
|
||
<p>Subscribe to SQL queries on the database. WARNING: This command is UNSTABLE and subject to breaking changes.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime subscribe [OPTIONS] <database> <query>...</code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-14"><b>Arguments:</b><a href="#arguments-14" class="hash-link" aria-label="Direct link to arguments-14" title="Direct link to arguments-14" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><DATABASE></code> — The name or identity of the database you would like to query</li>
|
||
<li><code><QUERY></code> — The SQL query to execute</li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-21"><b>Options:</b><a href="#options-21" class="hash-link" aria-label="Direct link to options-21" title="Direct link to options-21" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code>-n</code>, <code>--num-updates <NUM-UPDATES></code> — The number of subscription updates to receive before exiting</li>
|
||
<li><code>-t</code>, <code>--timeout <TIMEOUT></code> — The timeout, in seconds, after which to disconnect and stop receiving subscription messages. If <code>-n</code> is specified, it will stop after whichever
|
||
one comes first.</li>
|
||
<li><code>--print-initial-update</code> — Print the initial update for the queries.</li>
|
||
<li><code>--confirmed</code> — Instruct the server to deliver only updates of confirmed transactions</li>
|
||
<li><code>--anonymous</code> — Perform this action with an anonymous identity</li>
|
||
<li><code>-y</code>, <code>--yes</code> — Run non-interactively wherever possible. This will answer "yes" to almost all prompts, but will sometimes answer "no" to preserve non-interactivity (e.g. when prompting whether to log in with spacetimedb.com).</li>
|
||
<li><code>-s</code>, <code>--server <SERVER></code> — The nickname, host name or URL of the server hosting the database</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-start">spacetime start<a href="#spacetime-start" class="hash-link" aria-label="Direct link to spacetime start" title="Direct link to spacetime start" translate="no"></a></h2>
|
||
<p>Start a local SpacetimeDB instance</p>
|
||
<p>Run <code>spacetime start --help</code> to see all options.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime start [OPTIONS] [args]...</code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-15"><b>Arguments:</b><a href="#arguments-15" class="hash-link" aria-label="Direct link to arguments-15" title="Direct link to arguments-15" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><ARGS></code> — The args to pass to <code>spacetimedb-{edition} start</code></li>
|
||
</ul>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="options-22"><b>Options:</b><a href="#options-22" class="hash-link" aria-label="Direct link to options-22" title="Direct link to options-22" translate="no"></a></h6>
|
||
<ul>
|
||
<li>
|
||
<p><code>--edition <EDITION></code> — The edition of SpacetimeDB to start up</p>
|
||
<p>Default value: <code>standalone</code></p>
|
||
<p>Possible values: <code>standalone</code>, <code>cloud</code></p>
|
||
</li>
|
||
</ul>
|
||
<h2 class="anchor anchorWithStickyNavbar_wKCU" id="spacetime-version">spacetime version<a href="#spacetime-version" class="hash-link" aria-label="Direct link to spacetime version" title="Direct link to spacetime version" translate="no"></a></h2>
|
||
<p>Manage installed spacetime versions</p>
|
||
<p>Run <code>spacetime version --help</code> to see all options.</p>
|
||
<p><strong>Usage:</strong> <code>spacetime version [ARGS]...</code></p>
|
||
<h6 class="anchor anchorWithStickyNavbar_wKCU" id="arguments-16"><b>Arguments:</b><a href="#arguments-16" class="hash-link" aria-label="Direct link to arguments-16" title="Direct link to arguments-16" translate="no"></a></h6>
|
||
<ul>
|
||
<li><code><ARGS></code> — The args to pass to spacetimedb-update</li>
|
||
</ul>
|
||
<hr>
|
||
<small><i>This document was gene</i>rated automatically by <a href="https://crates.io/crates/clap-markdown"><code>clap-markdown</code></a>.</small></div></article><nav class="docusaurus-mt-lg pagination-nav" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/unreal/part-4"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">4 - Moving and Colliding</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/cli-reference/standalone-config"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Standalone Configuration</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_Ea_L thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#spacetime" class="table-of-contents__link toc-highlight">spacetime</a></li><li><a href="#spacetime-publish" class="table-of-contents__link toc-highlight">spacetime publish</a></li><li><a href="#spacetime-delete" class="table-of-contents__link toc-highlight">spacetime delete</a></li><li><a href="#spacetime-logs" class="table-of-contents__link toc-highlight">spacetime logs</a></li><li><a href="#spacetime-call" class="table-of-contents__link toc-highlight">spacetime call</a></li><li><a href="#spacetime-describe" class="table-of-contents__link toc-highlight">spacetime describe</a></li><li><a href="#spacetime-energy" class="table-of-contents__link toc-highlight">spacetime energy</a></li><li><a href="#spacetime-energy-balance" class="table-of-contents__link toc-highlight">spacetime energy balance</a></li><li><a href="#spacetime-sql" class="table-of-contents__link toc-highlight">spacetime sql</a></li><li><a href="#spacetime-rename" class="table-of-contents__link toc-highlight">spacetime rename</a></li><li><a href="#spacetime-generate" class="table-of-contents__link toc-highlight">spacetime generate</a></li><li><a href="#spacetime-list" class="table-of-contents__link toc-highlight">spacetime list</a></li><li><a href="#spacetime-login" class="table-of-contents__link toc-highlight">spacetime login</a></li><li><a href="#spacetime-login-show" class="table-of-contents__link toc-highlight">spacetime login show</a></li><li><a href="#spacetime-logout" class="table-of-contents__link toc-highlight">spacetime logout</a></li><li><a href="#spacetime-init" class="table-of-contents__link toc-highlight">spacetime init</a></li><li><a href="#spacetime-build" class="table-of-contents__link toc-highlight">spacetime build</a></li><li><a href="#spacetime-server" class="table-of-contents__link toc-highlight">spacetime server</a></li><li><a href="#spacetime-server-list" class="table-of-contents__link toc-highlight">spacetime server list</a></li><li><a href="#spacetime-server-set-default" class="table-of-contents__link toc-highlight">spacetime server set-default</a></li><li><a href="#spacetime-server-add" class="table-of-contents__link toc-highlight">spacetime server add</a></li><li><a href="#spacetime-server-remove" class="table-of-contents__link toc-highlight">spacetime server remove</a></li><li><a href="#spacetime-server-fingerprint" class="table-of-contents__link toc-highlight">spacetime server fingerprint</a></li><li><a href="#spacetime-server-ping" class="table-of-contents__link toc-highlight">spacetime server ping</a></li><li><a href="#spacetime-server-edit" class="table-of-contents__link toc-highlight">spacetime server edit</a></li><li><a href="#spacetime-server-clear" class="table-of-contents__link toc-highlight">spacetime server clear</a></li><li><a href="#spacetime-subscribe" class="table-of-contents__link toc-highlight">spacetime subscribe</a></li><li><a href="#spacetime-start" class="table-of-contents__link toc-highlight">spacetime start</a></li><li><a href="#spacetime-version" class="table-of-contents__link toc-highlight">spacetime version</a></li></ul></div></div></div></div></main></div></div></div><footer class="theme-layout-footer footer"><div class="container container-fluid"></div></footer></div>
|
||
</body>
|
||
</html> |