Skip to content

docs: document boxlite volume and boxlite network, and lead the volume pages with the CLI - #61

Merged
Mandalorian-Wang merged 1 commit into
boxlite-ai:mainfrom
Mandalorian-Wang:docs/cli-volume-network
Oct 21, 2026
Merged

Mandalorian-Wang merged 1 commit into
boxlite-ai:mainfrom
Mandalorian-Wang:docs/cli-volume-network

Conversation

@Mandalorian-Wang

Copy link
Copy Markdown
Contributor

Batch one of the user-perspective plan — workstreams A and C.

The CLI reference described 17 of the 19 commands the CLI actually ships.
boxlite volume (create / ls / get / rm) and boxlite network (tunnel) appeared
nowhere on the site: grep "boxlite volume" returned zero hits across every
.mdx. Volumes are the one capability with all three surfaces — CLI, SDK, console —
and the docs taught two of them.

Run, not read

Everything documented here was executed against api.boxlite.ai.

$ boxlite volume create --name docs-cli-check
a265d8cc-96aa-46b4-b0a0-afa05c7e4d02      <- prints the id, not the name

$ boxlite volume get <id> --format json
{ "Id": ..., "Name": ..., "CreatedAt": ..., "Size": "-" }   <- PascalCase keys

$ boxlite create python --name trainer -v docs-cli-check:/data
$ boxlite exec trainer -- sh -c 'echo hi > /data/f.txt && cat /data/f.txt'
hi                                        <- mounts by name; exec needs --

$ boxlite volume rm <id>                  # while a box still held it
Error removing volume '...': invalid state: Volume cannot be deleted because it is
in use by one or more boxes (e.g. docs-probe-v)

$ boxlite network tunnel docs-tun2 8080
https://8080-d-6574546e6e4b787a4c596d52.proxy.boxlite.ai

$ boxlite network tunnel docs-tun2 8080 --listen 127.0.0.1:18080
tcp://127.0.0.1:18080                     # fetching that locally -> HTTP 200

Against a box created without --inbound, the same tunnel reproduces #1677 from the
CLI for the first time — previously that string came only from the PR description:

Error: invalid state: Box etTnnKxzLYmR is not public; set public: true before opening a tunnel

Structural changes

  • cloud/mount-a-volume.mdx — the only console walkthrough was at line 203 of
    221
    , buried under ~190 lines of SDK code. The page now opens with "Pick where to
    do this"
    : console, CLI, SDK. First console mention moved from 92% → 7% of the page.
  • cloud/volume-operations.mdx — "The four operations" and "State the SDK does
    not expose"
    named the API's shape, not a reader's goal. Now "What you can do to a
    volume"
    and "Find out why a volume is not ready", and the operations table gained
    CLI and console columns.
  • cloud/volume-reference.mdx — the name/id split works from a terminal too.

The fourth mechanical rule

scripts/check-cli-coverage.py — every command boxlite --help lists must appear in
the CLI reference. Verified both ways:

$ python3 scripts/check-cli-coverage.py reference/cli.mdx        # this commit
19 CLI commands: run exec create list rm ... network serve auth volume
reference/cli.mdx: all documented                                 exit=0

$ python3 scripts/check-cli-coverage.py <pre-commit reference>
/tmp/old-cli.mdx: `boxlite network` ships but is not documented
/tmp/old-cli.mdx: `boxlite volume` ships but is not documented
2 undocumented command(s).                                        exit=1

It is deliberately not wired into CI. The CLI ships through sh.boxlite.ai, not
pip or npm, so gating every docs PR on it would couple docs CI to an external
installer — if that endpoint is down, no docs PR merges. That tradeoff is the docs
owner's call, not a default I should take. The script is useful today as a local check
and as a step in whatever job we decide should own it.

Checks

python3 scripts/lint-docs.py .          → 180 pages checked, no soft promises
python3 scripts/gen-llms-txt.py --check → llms.txt is up to date
python3 scripts/check-structure.py .    → clean
python3 scripts/check-cli-coverage.py   → all documented
mint broken-links                       → no broken links found
Tabs / CodeGroup / Note nesting         → balanced on all three edited pages

Every box and volume created for this was removed afterwards.

🤖 Generated with Claude Code

…e pages with the CLI

Batch one of the user-perspective plan: workstreams A and C.

The CLI reference described 17 of the 19 commands the CLI actually ships.
`boxlite volume` (create / ls / get / rm) and `boxlite network` (tunnel)
appeared nowhere on the site — `grep "boxlite volume"` returned zero hits
across every .mdx. Volumes are the one capability with all three
surfaces, and the docs taught only two of them.

Everything below was run against api.boxlite.ai, not read from --help.

  $ boxlite volume create --name docs-cli-check
  a265d8cc-96aa-46b4-b0a0-afa05c7e4d02      <- prints the id, not the name

  $ boxlite volume get <id> --format json
  { "Id": ..., "Name": ..., "CreatedAt": ..., "Size": "-" }   <- PascalCase

  $ boxlite create python --name trainer -v docs-cli-check:/data
  $ boxlite exec trainer -- sh -c 'echo hi > /data/f.txt && cat /data/f.txt'
  hi                                        <- mounts by name; exec needs --

  $ boxlite volume rm <id>                  # while a box held it
  Error removing volume '...': invalid state: Volume cannot be deleted
  because it is in use by one or more boxes (e.g. docs-probe-v)

  $ boxlite network tunnel docs-tun2 8080
  https://8080-d-6574546e6e4b787a4c596d52.proxy.boxlite.ai

  $ boxlite network tunnel docs-tun2 8080 --listen 127.0.0.1:18080
  tcp://127.0.0.1:18080                     # fetching it locally -> HTTP 200

Against a box created without --inbound, the same tunnel reproduces
#1677 from the CLI for the first time:

  Error: invalid state: Box etTnnKxzLYmR is not public; set public: true
  before opening a tunnel

Structural changes, from the same plan:

- cloud/mount-a-volume.mdx — the only console walkthrough on the page was
  at line 203 of 221, under ~190 lines of SDK code. The page now opens
  with "Pick where to do this": console, CLI, SDK. First console mention
  moved from 92% of the page to 7%.
- cloud/volume-operations.mdx — "The four operations" and "State the SDK
  does not expose" named the API's shape, not a reader's goal. Now "What
  you can do to a volume" and "Find out why a volume is not ready", and
  the operations table gained CLI and console columns.
- cloud/volume-reference.mdx — the name/id split works from a terminal
  too; said so.

Also adds scripts/check-cli-coverage.py, the fourth mechanical rule.
Verified both ways: green on this commit, and against the pre-commit
reference it names exactly `boxlite network` and `boxlite volume` and
exits 1. It is NOT wired into CI yet — the CLI ships through
sh.boxlite.ai rather than pip or npm, so gating every docs PR on it would
couple docs CI to an external installer. That tradeoff is a call for the
docs owner, not a default.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Oct 21, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit f426795.

Approve preview

@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: 4e251ff9-9623-4815-a23b-6a54e67794e1
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Mandalorian-Wang
Mandalorian-Wang merged commit 7982273 into boxlite-ai:main Oct 21, 2026
2 of 3 checks passed
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.

1 participant