CLI - community

community


The community group connects the CLI to the Constellab Community platform. Use it to authenticate against the platform, manage documentation pages (folders, empty pages, content), inspect a brick's documentation tree, and ask the Ragflow chatbot a question. The documentation commands are the tooling behind writing and publishing developer docs from the command line.




community login


Authenticates with the Community platform via the browser. This stores the access token locally so that subsequent documentation commands can act on your behalf. If you are already logged in, the flow is skipped unless you pass --force.


gws community login [OPTIONS]


# Log in via the browser
gws community login

# Force a fresh login even if credentials already exist
gws community login --force

community logout


Removes stored authentication credentials for the current domain. Pass --all to remove the credentials for every stored domain at once.


gws community logout [OPTIONS]


# Log out from the current domain
gws community logout

# Log out from every stored domain
gws community logout --all

community status


Shows the current authentication status: the active domain, whether you are logged in, and the token's expiration date. Any other domains with stored credentials are listed as well. This command takes no arguments or options.


gws community status

gws community status

community create-folder


Creates a new folder inside an existing folder. Provide the parent folder's ID and the title of the new folder. On success, the new folder's title and ID are printed. Requires authentication (gws community login).


gws community create-folder  </code></pre><br><br><pre><code>gws community create-folder folder123 "My New Folder"</code></pre><br><h3>community create-doc</h3><br><p>Creates a new <b>empty</b> documentation page inside a folder. Provide the folder's ID and the page title. The command prints the new page's ID and a ready-to-use <code>update-doc</code> command to push content into it. Requires authentication (<code>gws community login</code>).</p><br><pre><code>gws community create-doc <FOLDER_ID> <TITLE></code></pre><br><br><pre><code>gws community create-doc folder123 "Getting Started"</code></pre><br><h3>community update-doc</h3><br><p>Updates a documentation page's content from a local JSON file. The JSON file must be in <code>RichTextDTO</code> format (the same EditorJS-style structure used across the platform). This is how you push real content into a page created with <code>create-doc</code>. Requires authentication (<code>gws community login</code>).</p><br><pre><code>gws community update-doc <DOCUMENTATION_ID> <JSON_FILE_PATH></code></pre><br><br><pre><code>gws community update-doc doc456 ./doc_cli_community.json</code></pre><br><h3>community get-doc</h3><br><p>Retrieves a documentation page and writes it to a file. The page content is converted to Markdown (with block comments included) and written to the output path you provide.</p><br><pre><code>gws community get-doc <DOCUMENTATION_ID> <OUTPUT_FILE_PATH></code></pre><br><br><pre><code>gws community get-doc doc456 ./getting-started.md</code></pre><br><h3>community ask-chatbot</h3><br><p>Asks a question to the Ragflow chatbot and prints the answer along with a session ID. Pass the returned session ID back via <code>--session-id</code> to continue the same conversation across calls.</p><br><pre><code>gws community ask-chatbot <MESSAGE> [OPTIONS]</code></pre><br><br><pre><code># Ask a one-off question
gws community ask-chatbot "How do I create a Task?"

# Continue an existing conversation
gws community ask-chatbot "And how do I add parameters?" --session-id sess789</code></pre><br><h3>community doc-hierarchy</h3><br><p>Shows the documentation hierarchy (tree) of a brick. Provide the brick's ID; by default the <code>latest</code> version is used. Output is an indented text tree by default, or a JSON dump with <code>--format json</code>.</p><br><pre><code>gws community doc-hierarchy <BRICK_ID> [OPTIONS]</code></pre><br><br><pre><code># Print the tree for the latest version
gws community doc-hierarchy brick123

# Get a specific version as JSON
gws community doc-hierarchy brick123 --version 1.2.0 --format json</code></pre>
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.