Skip to content

ThingsBoard CLI User Guide + new REST Clients + Releases 4.2.2.2 and 4.3.1.2#389

Merged
ashvayka merged 26 commits into
thingsboard:developfrom
ViacheslavKlimov:cli-user-guide
May 25, 2026
Merged

ThingsBoard CLI User Guide + new REST Clients + Releases 4.2.2.2 and 4.3.1.2#389
ashvayka merged 26 commits into
thingsboard:developfrom
ViacheslavKlimov:cli-user-guide

Conversation

@ViacheslavKlimov
Copy link
Copy Markdown
Member

@ViacheslavKlimov ViacheslavKlimov commented May 19, 2026

Description

image

Type of change

  • New / updated documentation page (src/content/docs/**)
  • Shared include file (src/content/_includes/**)
  • Component, layout, or styling change (src/components/**, src/styles/**)
  • Landing / use-case / case-study page (src/pages/**, src/data/**)
  • Redirects (src/data/redirects.ts)
  • Version bump / release (see release skill)
  • Build, CI, scripts, or tooling
  • Other (please describe)

Affected products

Related issues

  • Closes #

Checklist

  • pnpm check passes (Astro / TypeScript)
  • pnpm lint:eslint passes
  • pnpm lint:slugcheck passes (required if pages were added/renamed/moved across languages)
  • pnpm lint:linkcheck passes locally — required to merge; run it before requesting review (use pnpm lint:linkcheck:nobuild if you already ran a build)
  • Renamed/removed pages have a redirect in src/data/redirects.ts, and pnpm generate:redirects was run
  • No hardcoded versions — values come from src/data/versions.ts
  • Screenshots attached for visual changes

Adds a consolidated single-page user guide for the ThingsBoard CLI as
a shared MDX include rendered by thin product stubs for PE, Cloud,
and Cloud EU, and wires it into the AI sidebar group of each product
(gated by isPE so CE does not pick it up).
Adds a "Pulling changes back from ThingsBoard" subsection covering the
three calling shapes, the --solution / --dry-run / --with-credentials /
--force flags, and the git-clean default safety. Also points the
"UI edits are overwritten" caution and Limitations entry at tb pull as
the recovery path.
@ViacheslavKlimov ViacheslavKlimov changed the title ThingsBoard CLI - User Guide ThingsBoard CLI User Guide + new REST Clients May 19, 2026
The Java and Python clients track the ThingsBoard server release line,
so a single TB_VER alias of CE_FULL_VER avoids the maintenance overhead
of bumping per-client constants in lockstep with the platform.
Both guides are reorganized into eight task-oriented sections
(Installation, Quickstart, Authentication, Rate-limit handling,
Working with entities, Telemetry and attributes, Listing and querying
entities, Entity groups [PE-gated], Error handling, More examples) and
API signatures are verified against the live client repos. Helpers
encode the CE/PE/PaaS divergence (e.g. saveDevice arity, entity group
methods) so the same include serves all editions without conditional UI.
Drop the legacy REST client entries from the sidebar and card (they
remain reachable via the cross-link on each new client guide), rename
"Server-side Clients" to "Clients & CLI", add the CLI link with a
"New" badge, and reference the CLI via slug (not raw link) so the
per-version sidebar filter keeps it within its own sidebar instead of
duplicating "APIs & SDKs" groups across editions.
The CLI is a separate command-line tool, not a built-in feature, so
the default peFeature wording reads wrong here. Banner now supports a
slot override that replaces (not appends to) the default sentence, and
the new CE CLI stub uses it to render "ThingsBoard CLI works only with
ThingsBoard Professional and ThingsBoard Cloud." Existing peFeature
callers all use the self-closing form, so the change is backward-
compatible.
@ViacheslavKlimov ViacheslavKlimov changed the title ThingsBoard CLI User Guide + new REST Clients ThingsBoard CLI User Guide + new REST Clients + Releases 4.2.2.2 and 4.3.1.2 May 21, 2026
The PE entity-groups Aside in the Java and Python REST client guides
pointed at user-guide/entity-groups and user-guide/role-management,
which don't exist — the canonical pages live at user-guide/groups and
user-guide/roles.
Copy link
Copy Markdown
Member Author

@ViacheslavKlimov ViacheslavKlimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary

Reviewed 30 changed files in ThingsBoard CLI User Guide + new REST Clients + Releases 4.2.2.2 and 4.3.1.2. Left 14 comments inline. The PR is largely well-structured — new content is thorough, the peFeature banner refactor is clean, and the release-notes/upgrade-instructions/releases-table updates are internally consistent. Main areas to double-check before merging: (1) MDX rendering bug where JSX expressions inside backticks won't evaluate, (2) whether the new edition-specific Maven/PyPI artifacts actually exist at TB_VER for PE/PaaS, (3) the test.pypi.org install command for a page marketed as New.

Additional findings

Observations about behavior outside the immediate diff lines:

  • src/content/_includes/docs/edge/reference/java-rest-client.mdx and python-rest-client.mdx — The edge sidebar's Server-side REST Clients section is removed (both edgeSidebar and edgePeSidebar), but the include files and their edge / edge-PE stubs still exist. They're now orphaned in the edge sidebar — reachable only by direct URL. If the intent is to retire them on the edge side, follow up with stub-file removal + redirects in src/data/redirects.ts. If they should stay, restore the sidebar section (the deprecation <Aside> at the top of each include already steers readers to the new client).
  • src/models/upgrade-instructions.ts:74,140 — Marking only 4.3.1.1 and 4.2.2.1 as vulnerable: true while older 4.3.0.1 and 4.2.1.2 still don't carry the flag may be intentional (those families pre-date the CVE list in this patch), but worth a sanity check — most of the CVEs in the security section look like things older patches would also be exposed to.

This review was auto-generated. Findings may contain errors — please verify before applying changes.

Comment thread src/content/_includes/docs/reference/python-client.mdx Outdated
Comment thread src/content/_includes/docs/user-guide/cli.mdx Outdated
Comment thread src/content/_includes/docs/user-guide/cli.mdx Outdated
Comment thread src/content/_includes/docs/reference/apis-and-sdks.mdx Outdated
Comment thread src/components/Banner.astro
Comment thread src/content/_includes/docs/pe/releases/v4-2-x.mdx Outdated
Comment thread src/content/_includes/docs/releases/v4-2-x.mdx Outdated
Comment thread src/content/_includes/docs/releases/v4-2-x.mdx Outdated
Comment thread astro.sidebar.ts
Comment thread src/content/_includes/docs/reference/java-client.mdx
- Fix MDX JSX interpolation in Python client snippets (r3280184553)
- Drop test.pypi index from CLI install command (r3280184586)
- Drop unused Banner prop and Fragment wrapper in CLI page (r3280184590)
- Convert APIs & SDKs Clients ListCard to markdown bullets (r3280184598)
- Document slot-override semantic in Banner props; render peFeature banner on Edge CE too (r3280184605)
- Fix "loosing" typo in PE release notes (r3280184613)
- Fix "asignee" typo and reword aggregation-keys line in release notes (r3280184618, r3280184629)
- Mirror Clients & CLI on Edge sidebars with new Edge stubs; add deprecation notice on legacy Edge REST clients; add edge-aware intro wording; route shared core DocLinks via useTbDocs so Edge users land on existing pages (r3280184632)
- Mark 4.3.0.1 and 4.2.1.2 as vulnerable in upgrade-instructions (pullrequestreview-4335788404)
@ViacheslavKlimov
Copy link
Copy Markdown
Member Author

src/models/upgrade-instructions.ts:74,140 — Marking only 4.3.1.1 and 4.2.2.1 as vulnerable: true while older 4.3.0.1 and 4.2.1.2 still don't carry the flag may be intentional… (from review)

Addressed in abf5137 — added vulnerable: true to the 4.3.0.1 and 4.2.1.2 entries.

@ViacheslavKlimov
Copy link
Copy Markdown
Member Author

src/content/_includes/docs/edge/reference/java-rest-client.mdx and python-rest-client.mdx — The edge sidebar's Server-side REST Clients section is removed…, but the include files and their edge / edge-PE stubs still exist… (from review)

Addressed in abf5137 — see the F3 reply for the full plan. The legacy Edge REST-client pages stay (now with a deprecation Aside pointing to the new Edge clients), and the new Edge sidebars have a Clients & CLI section linking to 6 fresh Edge stubs for the auto-generated clients.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-user documentation for the ThingsBoard CLI and introduces new edition-aware, OpenAPI-generated Java/Python REST client docs, while also bumping site version/release metadata for the 4.3 and 4.2 release trains.

Changes:

  • Add new CLI documentation pages (CE/PE/PaaS/Edge variants) backed by a shared include.
  • Add new Java/Python REST client docs and mark legacy REST client pages as deprecated.
  • Update version constants, release tables/notes, sidebar navigation, banner behavior, and redirects for the new docs.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/models/upgrade-instructions.ts Adds upgrade entries for 4.3.1.2 and 4.2.2.2 and marks several versions as vulnerable.
src/models/releases-table.ts Updates latest patch metadata and patch lists for 4.3 and 4.2 families.
src/data/versions.ts Bumps CE/PE full versions and introduces TB_VER alias.
src/content/docs/docs/user-guide/cli.mdx New CE CLI doc entrypoint that mounts the shared CLI include.
src/content/docs/docs/reference/python-client.mdx New CE Python client doc entrypoint mounting the shared include.
src/content/docs/docs/reference/java-client.mdx New CE Java client doc entrypoint mounting the shared include.
src/content/docs/docs/pe/user-guide/cli.mdx New PE CLI doc entrypoint mounting the shared CLI include.
src/content/docs/docs/pe/reference/python-client.mdx New PE Python client doc entrypoint mounting the shared include.
src/content/docs/docs/pe/reference/java-client.mdx New PE Java client doc entrypoint mounting the shared include.
src/content/docs/docs/paas/user-guide/cli.mdx New PaaS CLI doc entrypoint mounting the shared CLI include.
src/content/docs/docs/paas/reference/python-client.mdx New PaaS Python client doc entrypoint mounting the shared include.
src/content/docs/docs/paas/reference/java-client.mdx New PaaS Java client doc entrypoint mounting the shared include.
src/content/docs/docs/paas/eu/user-guide/cli.mdx New PaaS EU CLI doc entrypoint mounting the shared CLI include.
src/content/docs/docs/paas/eu/reference/python-client.mdx New PaaS EU Python client doc entrypoint mounting the shared include.
src/content/docs/docs/paas/eu/reference/java-client.mdx New PaaS EU Java client doc entrypoint mounting the shared include.
src/content/docs/docs/edge/user-guide/cli.mdx New Edge CLI doc entrypoint mounting the shared CLI include.
src/content/docs/docs/edge/reference/python-client.mdx New Edge Python client doc entrypoint mounting the shared include.
src/content/docs/docs/edge/reference/java-client.mdx New Edge Java client doc entrypoint mounting the shared include.
src/content/docs/docs/edge/pe/user-guide/cli.mdx New Edge PE CLI doc entrypoint mounting the shared CLI include.
src/content/docs/docs/edge/pe/reference/python-client.mdx New Edge PE Python client doc entrypoint mounting the shared include.
src/content/docs/docs/edge/pe/reference/java-client.mdx New Edge PE Java client doc entrypoint mounting the shared include.
src/content/_includes/docs/user-guide/cli.mdx Adds the main CLI user guide content (shared across editions).
src/content/_includes/docs/releases/v4-3-x.mdx Adds CE release notes for v4.3.1.2.
src/content/_includes/docs/releases/v4-2-x.mdx Adds CE release notes for v4.2.2.2.
src/content/_includes/docs/reference/python-rest-client.mdx Deprecates legacy Python REST client doc and updates install snippet.
src/content/_includes/docs/reference/python-client.mdx Adds new edition-aware Python REST client documentation.
src/content/_includes/docs/reference/java-rest-client.mdx Deprecates legacy Java REST client doc and updates dependency snippet.
src/content/_includes/docs/reference/java-client.mdx Adds new edition-aware Java REST client documentation.
src/content/_includes/docs/reference/apis-and-sdks.mdx Updates “REST Clients” card to “Clients & CLI” and links to new pages.
src/content/_includes/docs/pe/releases/v4-3-x.mdx Adds PE release notes for v4.3.1.2.
src/content/_includes/docs/pe/releases/v4-2-x.mdx Adds PE release notes for v4.2.2.2.
src/content/_includes/docs/edge/reference/python-rest-client.mdx Adds deprecation note pointing to the new Python client docs.
src/content/_includes/docs/edge/reference/java-rest-client.mdx Adds deprecation note pointing to the new Java client docs.
src/content/_includes/docs/edge/reference/apis-and-sdks.mdx Updates Edge “REST Clients” card to “Clients & CLI” and links to new pages.
src/components/Banner.astro Extends peFeature visibility to Edge CE and adds slot override behavior.
public/redirects.json Adds redirects for new Edge PE CLI/client pages under legacy /docs/pe/edge/... paths.
astro.sidebar.ts Adds CLI entries and replaces legacy REST client links with new client pages in sidebars.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/models/upgrade-instructions.ts
Comment thread src/models/upgrade-instructions.ts
Comment thread src/models/upgrade-instructions.ts
Comment thread src/models/upgrade-instructions.ts
Comment thread src/models/upgrade-instructions.ts
Copy link
Copy Markdown
Member Author

@ViacheslavKlimov ViacheslavKlimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review summary

Reviewed 37 changed files in ThingsBoard CLI User Guide + new REST Clients + Releases 4.2.2.2 and 4.3.1.2. Left 7 comment(s) inline plus a couple of observations below.

Overall the new CLI guide and the auto-generated Java/Python REST client docs are well-structured, and the release notes additions are consistent with the existing format. The main things worth a second look are (a) the cross-cutting effect of the peFeature banner now also rendering on Edge CE pages, (b) whether the CLI doc really applies to Edge PE given the explicit Limitations wording, and (c) inconsistencies between the Edge and non-Edge variants of the new pages.

Additional findings

These are about lines outside this PR's diff, but they line up naturally with changes this PR is making:

  • src/content/_includes/docs/edge/reference/java-rest-client.mdx (~line 26) — still has <version>4.3.0.1</version> hardcoded. The non-Edge counterpart src/content/_includes/docs/reference/java-rest-client.mdx was migrated to ${TB_VER} in this PR; the Edge equivalent should follow the same migration or it'll silently fall out of sync each release. Same applies to displaying a non-current version (4.3.0.1) on a page that's now also flagged as deprecated.
  • src/content/_includes/docs/edge/reference/python-rest-client.mdx (~line 20) — pip3 install tb-rest-client is still unpinned. The non-Edge counterpart now pins via ==${TB_VER}; same migration would keep Edge consistent.
  • upgrade-instructions.ts4.3.1.1, 4.3.0.1, 4.2.2.1, and 4.2.1.2 are newly marked vulnerable: true. 4.2.0 (an older lts/patch: false baseline) is not marked. If this is the intended convention (only patch-level entries carry vulnerable), looks fine; if 4.2.0 should be flagged too, it's missing.

This review was auto-generated. Findings may contain errors — please verify before applying changes.

Comment thread src/components/Banner.astro Outdated
Comment thread src/components/Banner.astro
Comment thread astro.sidebar.ts
Comment thread src/content/_includes/docs/reference/apis-and-sdks.mdx Outdated
Comment thread src/content/_includes/docs/reference/java-client.mdx
Comment thread src/data/versions.ts
Comment thread src/content/_includes/docs/user-guide/cli.mdx
- Revert peFeature banner EDGE expansion; render only on CE (#3281128479)
- Migrate legacy edge Java REST client install snippet to ${TB_VER} (#pullrequestreview-4336868594)
- Migrate legacy edge Python REST client install to ==${TB_VER} (#pullrequestreview-4336868594)
- Align edge apis-and-sdks Clients & CLI links to CE style (bold={false}, no target) (#3281128499)
@ViacheslavKlimov
Copy link
Copy Markdown
Member Author

src/content/_includes/docs/edge/reference/java-rest-client.mdx (~line 26) — still has <version>4.3.0.1</version> hardcoded. The non-Edge counterpart src/content/_includes/docs/reference/java-rest-client.mdx was migrated to ${TB_VER} in this PR; the Edge equivalent should follow the same migration … (from review)

Fixed in 52f84d3 — migrated the snippet to <Code lang="xml" code={} /> interpolating ${TB_VER}, mirroring the non-Edge counterpart.

@ViacheslavKlimov
Copy link
Copy Markdown
Member Author

src/content/_includes/docs/edge/reference/python-rest-client.mdx (~line 20) — pip3 install tb-rest-client is still unpinned. The non-Edge counterpart now pins via ==${TB_VER}; same migration would keep Edge consistent. (from review)

Fixed in 52f84d3 — pinned to tb-rest-client==${TB_VER} via <Code lang="bash" code={} />, mirroring the non-Edge counterpart.

@ViacheslavKlimov
Copy link
Copy Markdown
Member Author

upgrade-instructions.ts4.3.1.1, 4.3.0.1, 4.2.2.1, and 4.2.1.2 are newly marked vulnerable: true. 4.2.0 (an older lts/patch: false baseline) is not marked. If this is the intended convention (only patch-level entries carry vulnerable), looks fine; if 4.2.0 should be flagged too, it's missing. (from review)

Convention is correct — only patch-level entries carry vulnerable: true. The 4.2.0 LTS baseline is intentionally unmarked.

- Drop "New" badge from CLI sidebar entries (CE, PE, PaaS, PaaS EU, Edge, Edge PE) and the Clients & CLI ListCards on both apis-and-sdks pages (CE + Edge)
- Add `excludeSlugs` to CatchAllRedirect; skip CLI / Java / Python client slugs when scanning the edge/pe content tree so the pe/edge catch-all no longer emits redirects nobody needs
The Entity Groups section already only renders when product is not CE
and not EDGE, but the TOC plugin was injecting its three ConditionalHeading
entries on Edge CE pages (productId='edge'), producing broken fragment
links to anchors that don't exist in the DOM. Adding edge to the exclude
list keeps the TOC in sync with the rendered body.

Edge PE (productId='edge-pe') still shows both the section and its TOC
entries because the exclude list is matched by exact string.
@ViacheslavKlimov ViacheslavKlimov changed the base branch from main to develop May 25, 2026 07:30
@ashvayka ashvayka merged commit d1bd146 into thingsboard:develop May 25, 2026
4 checks passed
@ViacheslavKlimov ViacheslavKlimov deleted the cli-user-guide branch May 25, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants