cli-anything-acloudviewer 3.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. cli_anything/acloudviewer/README.md +616 -0
  2. cli_anything/acloudviewer/__init__.py +1 -0
  3. cli_anything/acloudviewer/__main__.py +5 -0
  4. cli_anything/acloudviewer/acloudviewer_cli.py +4354 -0
  5. cli_anything/acloudviewer/core/__init__.py +1 -0
  6. cli_anything/acloudviewer/core/ai_registry.py +61 -0
  7. cli_anything/acloudviewer/core/scene.py +49 -0
  8. cli_anything/acloudviewer/core/session.py +42 -0
  9. cli_anything/acloudviewer/mcp_server.py +3319 -0
  10. cli_anything/acloudviewer/skills/SKILL.md +548 -0
  11. cli_anything/acloudviewer/tests/__init__.py +1 -0
  12. cli_anything/acloudviewer/tests/test_backend.py +407 -0
  13. cli_anything/acloudviewer/tests/test_cli.py +228 -0
  14. cli_anything/acloudviewer/tests/test_cli_comprehensive.py +1674 -0
  15. cli_anything/acloudviewer/tests/test_core.py +762 -0
  16. cli_anything/acloudviewer/tests/test_e2e.py +129 -0
  17. cli_anything/acloudviewer/tests/test_installer.py +1116 -0
  18. cli_anything/acloudviewer/tests/test_mcp.py +1835 -0
  19. cli_anything/acloudviewer/tests/test_utils.py +1424 -0
  20. cli_anything/acloudviewer/utils/__init__.py +1 -0
  21. cli_anything/acloudviewer/utils/acloudviewer_backend.py +3164 -0
  22. cli_anything/acloudviewer/utils/colmap_backend.py +716 -0
  23. cli_anything/acloudviewer/utils/installer.py +1327 -0
  24. cli_anything/acloudviewer/utils/repl_skin.py +455 -0
  25. cli_anything/acloudviewer/utils/rpc_client.py +490 -0
  26. cli_anything/acloudviewer/utils/source_builder.py +376 -0
  27. cli_anything/acloudviewer/utils/spirula_backend.py +151 -0
  28. cli_anything_acloudviewer-3.2.0.dist-info/METADATA +663 -0
  29. cli_anything_acloudviewer-3.2.0.dist-info/RECORD +32 -0
  30. cli_anything_acloudviewer-3.2.0.dist-info/WHEEL +5 -0
  31. cli_anything_acloudviewer-3.2.0.dist-info/entry_points.txt +3 -0
  32. cli_anything_acloudviewer-3.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,616 @@
1
+ # cli-anything-acloudviewer v3.1.0
2
+
3
+ CLI harness for **ACloudViewer** — 3D point cloud and mesh processing via
4
+ the ACloudViewer binary CLI (`-SILENT` mode) and JSON-RPC WebSocket.
5
+
6
+ Part of the [CLI-Anything](https://github.com/Asher-1/CLI-Anything) project.
7
+
8
+ **Supported Platforms:** Linux, macOS, Windows.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ cd acloudviewer/agent-harness
14
+ pip install -e .
15
+ ```
16
+
17
+ One-line script (Linux / macOS): installs the harness, runs `check`, and
18
+ registers the MCP server with detected AI clients
19
+ (`ACV_SKIP_CLIENTS=1` to skip registration):
20
+
21
+ ```bash
22
+ curl -LsSf https://raw.githubusercontent.com/Asher-1/CLI-Anything/main/acloudviewer/agent-harness/install.sh | sh
23
+ ```
24
+
25
+ The ACloudViewer binary must be on `PATH`, or set the `ACV_BINARY`
26
+ environment variable to its absolute path. `cli-anything-acloudviewer
27
+ install auto` downloads it from GitHub Releases automatically, and
28
+ `cli-anything-acloudviewer install clients --all` merges the MCP server entry
29
+ (`cli-anything-acloudviewer-mcp`) into the configs of detected clients
30
+ (Claude Code, Claude Desktop, Codex, Cursor) with `.bak` backups.
31
+
32
+ ## Command modes
33
+
34
+ ### Runtime behavior (auto-detect)
35
+
36
+ | Mode | How it Works | Requirement |
37
+ |------|-------------|-------------|
38
+ | **Headless** | Subprocess: `ACloudViewer -SILENT -O ... -SS ...` | ACloudViewer binary |
39
+ | **GUI** | JSON-RPC WebSocket to running ACloudViewer | ACloudViewer with JSON-RPC plugin |
40
+
41
+ The CLI auto-detects: if a running ACloudViewer instance responds on
42
+ `ws://127.0.0.1:6001`, GUI mode is used; otherwise headless.
43
+
44
+ ### Commands by category (what each command needs)
45
+
46
+ **General** (no ACloudViewer backend required):
47
+
48
+ `info`, `check`, `install`, `formats`, `session`, `repl`
49
+
50
+ **Headless** (binary `-SILENT` mode; no GUI):
51
+
52
+ - `convert`, `batch-convert`
53
+ - `ai`: `list`, `schema`, `run` (all registered AICore plugin batch tasks)
54
+ - `plugin`: `run` (ordinary/third-party native command passthrough)
55
+ - `process`: `subsample`, `normals`, `icp`, `sor`, `c2c-dist`, `c2m-dist`, `crop`, `density`, `curvature`, `roughness`, `delaunay`, `sample-mesh`, `color-banding`, `volume-25d`, `crop-2d`, `rasterize`, `cross-section`, `stat-test`, `approx-density`, `feature`, `best-fit-plane`, `extract-cc`, `set-active-sf`, `remove-sf`, `remove-all-sfs`, `rename-sf`, `filter-sf`, `coord-to-sf`, `sf-arithmetic`, `sf-op`, `octree-normals`, `orient-normals`, `invert-normals`, `clear-normals`, `normals-to-dip`, `normals-to-sfs`, `remove-rgb`, `merge-clouds`, `extract-vertices`, `flip-triangles`, `mesh-volume`, `merge-meshes`, `match-centers`, `drop-global-shift`, `closest-point-set`, `remove-scan-grids`, `pcv`, `compass-export`, `compass-import-fol`, `compass-import-lin`, `compass-refit`, `compass-p21`, `sra`
56
+ - `reconstruct`: `mesh`, `auto`, `extract-features`, `match`, `sparse`, `undistort`, `dense-stereo`, `fuse`, `poisson`, `simplify-mesh`, `texture-mesh`, `convert-model`, `analyze-model`, `delaunay-mesh`
57
+ - `sibr`: `tool`, `prepare-colmap`, `texture-mesh`, `unwrap-mesh`, `tonemapper`, `align-meshes`, `camera-converter`, `nvm-to-sibr`, `crop-from-center`, `clipping-planes`, `distord-crop`
58
+
59
+ **GUI** (requires ACloudViewer running with the JSON-RPC plugin):
60
+
61
+ - `open`, `clear`
62
+ - `scene`: `list`, `info`, `remove`, `set-visible`
63
+ - `entity`: `rename`, `set-color`
64
+ - `view`: `screenshot`, `camera`, `orientation`, `zoom-fit`, `refresh`, `perspective`, `point-size`
65
+ - `cloud`: `compute-normals`, `subsample`, `crop`, `scalar-fields`, `paint-uniform`, `paint-by-height`, `set-active-sf`, `remove-sf`, `remove-all-sfs`, `rename-sf`, `filter-sf`, `coord-to-sf`, `remove-rgb`, `remove-normals`, `invert-normals`, `merge`
66
+ - `mesh`: `simplify`, `smooth`, `sample-points`, `extract-vertices`, `flip-triangles`, `volume`, `merge`
67
+ - `transform`: `apply`
68
+ - `export`
69
+ - `methods`: `list`
70
+ - `colmap`: `reconstruct`, `run` (generic subcommand executor)
71
+
72
+ ## Usage Examples
73
+
74
+ ### Basic operations — **General**
75
+
76
+ ```bash
77
+ # Enter interactive REPL
78
+ cli-anything-acloudviewer
79
+
80
+ # Show backend info
81
+ cli-anything-acloudviewer --json info
82
+
83
+ # Diagnostics: binary, wheel, install hints
84
+ cli-anything-acloudviewer check
85
+
86
+ # Install app, wheel, or auto (see --help)
87
+ cli-anything-acloudviewer install --help
88
+
89
+ # List supported file formats
90
+ cli-anything-acloudviewer --json formats
91
+ ```
92
+
93
+ ### AICore and plugin automation — **Headless or GUI RPC**
94
+
95
+ ```bash
96
+ # Registry identity is local; schemas come from the installed plugin
97
+ cli-anything-acloudviewer --json ai list
98
+ cli-anything-acloudviewer --json --mode headless ai schema lightglue
99
+
100
+ # External-data batch inference; repeat inputs and arbitrary typed options
101
+ cli-anything-acloudviewer --json --mode headless ai run ocr \
102
+ --image page-1.png --image page-2.png --out-dir ./ocr-out \
103
+ --option LANG=en --option LAYOUT=true
104
+
105
+ # Legacy ordinary plugin argv is preserved exactly
106
+ cli-anything-acloudviewer --mode headless plugin run ANIMATION \
107
+ --arg=-FPS --arg=24 --arg=-TOTAL_FRAMES --arg=10
108
+ ```
109
+
110
+ `ai run` returns the plugin's `acloudviewer.aicore.batch/1` manifest. In GUI
111
+ mode it calls JSON-RPC `aicore.batch`; in headless mode it invokes the same
112
+ native command directly. MCP exposes the same boundary as `list_ai_tasks`,
113
+ `get_ai_schema`, `run_ai_batch`, and `run_plugin_command`.
114
+
115
+ ### File conversion — **Headless**
116
+
117
+ ```bash
118
+ # Convert PLY to PCD
119
+ cli-anything-acloudviewer --mode headless convert input.ply output.pcd
120
+
121
+ # Convert mesh OBJ to STL
122
+ cli-anything-acloudviewer --mode headless convert model.obj model.stl
123
+
124
+ # Batch convert all PLY files to PCD
125
+ cli-anything-acloudviewer --mode headless batch-convert ./scans/ ./output/ -f .pcd
126
+ ```
127
+
128
+ ### Point cloud processing — **Headless**
129
+
130
+ ```bash
131
+ # Voxel subsample
132
+ cli-anything-acloudviewer --mode headless process subsample input.ply -o sub.ply --voxel-size 0.05
133
+
134
+ # Compute normals (standard k-NN method)
135
+ cli-anything-acloudviewer --mode headless process normals input.ply -o normals.ply
136
+
137
+ # Compute normals with octree (faster for large clouds)
138
+ cli-anything-acloudviewer --mode headless normals octree input.ply -o normals.ply --radius AUTO
139
+
140
+ # Orient normals consistently (MST algorithm)
141
+ cli-anything-acloudviewer --mode headless normals orient-mst input.ply -o oriented.ply --knn 6
142
+
143
+ # Invert all normal directions
144
+ cli-anything-acloudviewer --mode headless normals invert input.ply -o inverted.ply
145
+
146
+ # Convert normals to scalar fields (Nx, Ny, Nz)
147
+ cli-anything-acloudviewer --mode headless normals to-sfs input.ply -o normals_sf.ply
148
+
149
+ # ICP registration (align source to target)
150
+ cli-anything-acloudviewer --mode headless process icp source.ply target.ply -o aligned.ply
151
+
152
+ # Statistical outlier removal
153
+ cli-anything-acloudviewer --mode headless process sor input.ply -o clean.ply --knn 6 --sigma 1.0
154
+
155
+ # Cloud-to-cloud distance
156
+ cli-anything-acloudviewer --mode headless process c2c-dist compared.ply reference.ply -o dist.ply
157
+
158
+ # Cloud-to-mesh distance
159
+ cli-anything-acloudviewer --mode headless process c2m-dist cloud.ply mesh.obj -o dist.ply
160
+
161
+ # Point density
162
+ cli-anything-acloudviewer --mode headless process density input.ply -o density.ply --radius 0.05
163
+
164
+ # Curvature estimation
165
+ cli-anything-acloudviewer --mode headless process curvature input.ply -o curv.ply --type MEAN --radius 0.05
166
+
167
+ # Surface roughness
168
+ cli-anything-acloudviewer --mode headless process roughness input.ply -o rough.ply --radius 0.1
169
+
170
+ # Geometric features (surface variation, etc.)
171
+ cli-anything-acloudviewer --mode headless process feature input.ply -o features.ply --type SURFACE_VARIATION --kernel-size 0.1
172
+
173
+ # Extract connected components
174
+ cli-anything-acloudviewer --mode headless process extract-cc input.ply -o components.ply --min-points 100
175
+
176
+ # Delaunay triangulation
177
+ cli-anything-acloudviewer --mode headless process delaunay input.ply -o mesh.ply
178
+
179
+ # Sample mesh to point cloud
180
+ cli-anything-acloudviewer --mode headless process sample-mesh mesh.obj -o cloud.ply --density 100
181
+
182
+ # Color banding (height-based coloring)
183
+ cli-anything-acloudviewer --mode headless process color-banding input.ply -o colored.ply --axis Z --frequency 10.0
184
+
185
+ # Extract cross-section along polyline
186
+ cli-anything-acloudviewer --mode headless process cross-section input.ply -o section.ply --polyline path.ply
187
+
188
+ # Compute 2.5D volume between two clouds
189
+ cli-anything-acloudviewer --mode headless process volume-25d ground.ply surface.ply -o volume_mesh.ply --grid-step 0.5
190
+
191
+ # Crop by 2D polygon (orthogonal to Z axis)
192
+ cli-anything-acloudviewer --mode headless process crop-2d input.ply -o cropped.ply --dim Z --polygon "0,0;10,0;10,10;0,10"
193
+ ```
194
+
195
+ ### Plugin processing — **Headless**
196
+
197
+ ```bash
198
+ # PCV ambient occlusion (ShadeVis)
199
+ cli-anything-acloudviewer --mode headless process pcv input.ply -o ao.ply --n-rays 256 --resolution 1024
200
+ cli-anything-acloudviewer --mode headless process pcv input.ply -o ao.ply --mode-180 --is-closed
201
+
202
+ # Compass — export measurements to CSV or XML
203
+ cli-anything-acloudviewer --mode headless process compass-export project.bin -o data --format csv
204
+ cli-anything-acloudviewer --mode headless process compass-export project.bin -o data.xml --format xml
205
+
206
+ # Compass — import foliations / lineations from scalar fields
207
+ cli-anything-acloudviewer --mode headless process compass-import-fol input.ply --dip-sf Dip --dipdir-sf DipDir
208
+ cli-anything-acloudviewer --mode headless process compass-import-lin input.ply --trend-sf Trend --plunge-sf Plunge
209
+
210
+ # Compass — refit planes & P21 intensity
211
+ cli-anything-acloudviewer --mode headless process compass-refit project.bin
212
+ cli-anything-acloudviewer --mode headless process compass-p21 input.ply --radius 10.0 --subsample 25 -o p21.ply
213
+
214
+ # SRA radial distance from surface of revolution
215
+ cli-anything-acloudviewer --mode headless process sra input.ply -o output.ply --profile profile.txt --axis Z
216
+ ```
217
+
218
+ ### Scalar field operations — **Headless**
219
+
220
+ ```bash
221
+ # Create scalar field from coordinate (X, Y, or Z)
222
+ cli-anything-acloudviewer --mode headless sf coord-to-sf input.ply -o height.ply --dimension Z
223
+
224
+ # Apply arithmetic operation (SQRT, ABS, EXP, LOG, etc.)
225
+ cli-anything-acloudviewer --mode headless sf arithmetic input.ply -o sqrt.ply --sf-index 0 --operation SQRT
226
+
227
+ # Apply operation with constant (ADD, SUB, MULTIPLY, DIVIDE)
228
+ cli-anything-acloudviewer --mode headless sf operation input.ply -o scaled.ply --sf-index 0 --operation MULTIPLY --value 2.0
229
+
230
+ # Compute scalar field gradient
231
+ cli-anything-acloudviewer --mode headless sf gradient input.ply -o gradient.ply
232
+
233
+ # Filter points by scalar field value
234
+ cli-anything-acloudviewer --mode headless sf filter input.ply -o filtered.ply --min 0.0 --max 10.0
235
+
236
+ # Convert active scalar field to RGB colors
237
+ cli-anything-acloudviewer --mode headless sf convert-to-rgb input.ply -o colored.ply
238
+
239
+ # Set active scalar field
240
+ cli-anything-acloudviewer --mode headless sf set-active input.ply -o active.ply --sf-index 0
241
+
242
+ # Rename scalar field
243
+ cli-anything-acloudviewer --mode headless sf rename input.ply -o renamed.ply --sf-index 0 --name "Elevation"
244
+
245
+ # Remove scalar field
246
+ cli-anything-acloudviewer --mode headless sf remove input.ply -o removed.ply --sf-index 0
247
+
248
+ # Remove all scalar fields
249
+ cli-anything-acloudviewer --mode headless sf remove-all input.ply -o clean.ply
250
+ ```
251
+
252
+ ### 3D reconstruction (Colmap) — **Headless**
253
+
254
+ ```bash
255
+ # Automatic end-to-end reconstruction from images
256
+ cli-anything-acloudviewer --json reconstruct auto ./images/ -w ./workspace/ --quality high
257
+
258
+ # Step-by-step reconstruction pipeline:
259
+
260
+ # 1. Extract features from images
261
+ cli-anything-acloudviewer reconstruct extract-features ./images/ -d ./database.db
262
+
263
+ # 2. Match features between images
264
+ cli-anything-acloudviewer reconstruct match ./database.db --method exhaustive
265
+
266
+ # 3. Sparse reconstruction (Structure-from-Motion)
267
+ cli-anything-acloudviewer reconstruct sparse -d ./database.db --image-path ./images/ -o ./sparse/
268
+
269
+ # Reproducible sparse reconstruction with raw COLMAP mapper options
270
+ cli-anything-acloudviewer reconstruct sparse -d ./database.db --image-path ./images/ -o ./sparse/ \
271
+ --random-seed 17 --mapper-option Mapper.min_num_matches=32
272
+
273
+ # 4. Undistort images for dense reconstruction
274
+ cli-anything-acloudviewer reconstruct undistort --image-path ./images/ -i ./sparse/0 -o ./dense/
275
+
276
+ # 5. Dense stereo (PatchMatch MVS)
277
+ cli-anything-acloudviewer reconstruct dense-stereo ./dense/
278
+
279
+ # 6. Fuse depth maps into dense point cloud
280
+ cli-anything-acloudviewer reconstruct fuse ./dense/ -o ./dense/fused.ply
281
+
282
+ # 7. Poisson surface reconstruction
283
+ cli-anything-acloudviewer reconstruct poisson ./dense/fused.ply -o ./mesh.ply
284
+
285
+ # 8. Delaunay meshing with visibility constraints
286
+ cli-anything-acloudviewer reconstruct delaunay-mesh ./dense/fused.ply -o ./mesh_delaunay.ply
287
+
288
+ # 9. Texture the mesh (uses Colmap image_texturer)
289
+ cli-anything-acloudviewer reconstruct texture-mesh ./dense/ -o ./textured/ --mesh ./mesh_delaunay.ply
290
+
291
+ # Utility: convert model format
292
+ cli-anything-acloudviewer reconstruct convert-model ./sparse/0 -o ./model.ply --output-type PLY
293
+
294
+ # Utility: analyze reconstruction quality
295
+ cli-anything-acloudviewer reconstruct analyze-model ./sparse/0
296
+
297
+ # Mesh reconstruction from point cloud (via ACloudViewer Delaunay)
298
+ cli-anything-acloudviewer reconstruct mesh input.ply -o mesh.ply
299
+ ```
300
+
301
+ ### SIBR dataset tools — **Headless**
302
+
303
+ Requires ACloudViewer built with the SIBR plugin (`-DPLUGIN_STANDARD_QSIBR=ON`).
304
+
305
+ ```bash
306
+ # Prepare Colmap output for SIBR rendering
307
+ cli-anything-acloudviewer sibr prepare-colmap ./colmap_workspace/
308
+
309
+ # Prepare with metadata fix
310
+ cli-anything-acloudviewer sibr prepare-colmap ./colmap_workspace/ --fix-metadata
311
+
312
+ # Generate textured mesh from dataset
313
+ cli-anything-acloudviewer sibr texture-mesh ./dataset/
314
+
315
+ # UV-unwrap a mesh for texturing
316
+ cli-anything-acloudviewer sibr unwrap-mesh ./dataset/
317
+
318
+ # Apply tonemapping to HDR images
319
+ cli-anything-acloudviewer sibr tonemapper ./dataset/
320
+
321
+ # Align meshes in the dataset
322
+ cli-anything-acloudviewer sibr align-meshes ./dataset/
323
+
324
+ # Convert camera formats for SIBR
325
+ cli-anything-acloudviewer sibr camera-converter ./dataset/
326
+
327
+ # Convert NVM format to SIBR dataset layout
328
+ cli-anything-acloudviewer sibr nvm-to-sibr ./dataset/
329
+
330
+ # Crop dataset from center
331
+ cli-anything-acloudviewer sibr crop-from-center ./dataset/
332
+
333
+ # Compute clipping planes
334
+ cli-anything-acloudviewer sibr clipping-planes ./dataset/
335
+
336
+ # Distortion-aware image cropping
337
+ cli-anything-acloudviewer sibr distord-crop ./dataset/
338
+
339
+ # Run any SIBR tool by name with passthrough args
340
+ cli-anything-acloudviewer sibr tool prepareColmap4Sibr -path ./dataset/ -fix_metadata
341
+
342
+ # Launch SIBR viewers for novel view synthesis visualization
343
+ cli-anything-acloudviewer sibr viewer gaussian --model-path ./output/ --path ./dataset/
344
+ cli-anything-acloudviewer sibr viewer ulr --path ./dataset/
345
+ cli-anything-acloudviewer sibr viewer texturedmesh --mesh ./model.obj --path ./dataset/
346
+ cli-anything-acloudviewer sibr viewer remoteGaussian --ip 127.0.0.1 --port 6009
347
+ ```
348
+
349
+ **Available SIBR viewer types**:
350
+ - `gaussian`: Gaussian Splatting viewer (requires `--model-path` and `--path`)
351
+ - `ulr` / `ulrv2`: Unstructured Lumigraph Rendering viewers
352
+ - `texturedmesh`: Textured mesh viewer (requires `--mesh` and `--path`)
353
+ - `pointbased`: Point-based rendering viewer
354
+ - `remoteGaussian`: Remote Gaussian viewer for network rendering
355
+
356
+ ### Full reconstruction pipeline (Colmap + SIBR) — **Headless**
357
+
358
+ End-to-end example: images to SIBR-ready dataset:
359
+
360
+ ```bash
361
+ # 1. Automatic Colmap reconstruction
362
+ cli-anything-acloudviewer reconstruct auto ./images/ -w ./workspace/ --quality high
363
+
364
+ # 2. Prepare the reconstruction for SIBR viewing
365
+ cli-anything-acloudviewer sibr prepare-colmap ./workspace/
366
+
367
+ # 3. Generate textured mesh
368
+ cli-anything-acloudviewer sibr texture-mesh ./workspace/
369
+
370
+ # 4. UV-unwrap the mesh
371
+ cli-anything-acloudviewer sibr unwrap-mesh ./workspace/
372
+ ```
373
+
374
+ ### Scene, entity, view & open — **GUI**
375
+
376
+ Requires a running ACloudViewer with the JSON-RPC plugin (`--mode gui` or auto-detect when `ws://127.0.0.1:6001` is available).
377
+
378
+ ```bash
379
+ # Open a file in the viewer
380
+ cli-anything-acloudviewer --mode gui open /path/to/model.ply
381
+
382
+ # List all entities in the scene
383
+ cli-anything-acloudviewer --json --mode gui scene list
384
+
385
+ # Get entity details
386
+ cli-anything-acloudviewer --json --mode gui scene info --id 1
387
+
388
+ # Remove an entity from the scene
389
+ cli-anything-acloudviewer --mode gui scene remove --id 1
390
+
391
+ # Rename an entity
392
+ cli-anything-acloudviewer --mode gui entity rename --id 1 --name "MyCloud"
393
+
394
+ # Set entity color
395
+ cli-anything-acloudviewer --mode gui entity set-color --id 1 --r 255 --g 0 --b 0
396
+
397
+ # Take a screenshot
398
+ cli-anything-acloudviewer --mode gui view screenshot -o screenshot.png --width 1920 --height 1080
399
+
400
+ # Get camera parameters
401
+ cli-anything-acloudviewer --json --mode gui view camera
402
+
403
+ # Set view orientation
404
+ cli-anything-acloudviewer --mode gui view orientation --orient top
405
+
406
+ # Clear the scene
407
+ cli-anything-acloudviewer --mode gui clear
408
+
409
+ # List available RPC methods
410
+ cli-anything-acloudviewer --json --mode gui methods list
411
+ ```
412
+
413
+ ### Cloud operations — **GUI**
414
+
415
+ ```bash
416
+ # Compute normals on a loaded cloud
417
+ cli-anything-acloudviewer --json --mode gui cloud compute-normals --id 1 --radius 0.05
418
+
419
+ # Subsample a cloud
420
+ cli-anything-acloudviewer --json --mode gui cloud subsample --id 1 --method SPATIAL --param 0.1
421
+
422
+ # Get scalar field list
423
+ cli-anything-acloudviewer --json --mode gui cloud scalar-fields --id 1
424
+
425
+ # Set active scalar field
426
+ cli-anything-acloudviewer --json --mode gui cloud set-active-sf --id 1 --index 0
427
+
428
+ # Remove a scalar field
429
+ cli-anything-acloudviewer --json --mode gui cloud remove-sf --id 1 --index 0
430
+
431
+ # Coordinate to scalar field
432
+ cli-anything-acloudviewer --json --mode gui cloud coord-to-sf --id 1 --axis z
433
+
434
+ # Remove RGB colors
435
+ cli-anything-acloudviewer --mode gui cloud remove-rgb --id 1
436
+
437
+ # Remove/Invert normals
438
+ cli-anything-acloudviewer --mode gui cloud remove-normals --id 1
439
+ cli-anything-acloudviewer --mode gui cloud invert-normals --id 1
440
+
441
+ # Merge multiple clouds
442
+ cli-anything-acloudviewer --json --mode gui cloud merge --ids 1 2 3
443
+ ```
444
+
445
+ ### Mesh operations — **GUI**
446
+
447
+ ```bash
448
+ # Simplify mesh
449
+ cli-anything-acloudviewer --json --mode gui mesh simplify --id 1 --target-count 10000
450
+
451
+ # Smooth mesh (Laplacian)
452
+ cli-anything-acloudviewer --json --mode gui mesh smooth --id 1 --iterations 3
453
+
454
+ # Extract vertices as point cloud
455
+ cli-anything-acloudviewer --json --mode gui mesh extract-vertices --id 1
456
+
457
+ # Compute mesh volume
458
+ cli-anything-acloudviewer --json --mode gui mesh volume --id 1
459
+
460
+ # Flip triangle normals
461
+ cli-anything-acloudviewer --mode gui mesh flip-triangles --id 1
462
+
463
+ # Merge meshes
464
+ cli-anything-acloudviewer --json --mode gui mesh merge --ids 1 2
465
+ ```
466
+
467
+ ### COLMAP via RPC — **GUI**
468
+
469
+ ```bash
470
+ # Run automatic reconstruction via RPC (live Colmap progress in GUI console)
471
+ cli-anything-acloudviewer --json --mode gui colmap reconstruct --image-path ./images/ -w ./workspace/
472
+
473
+ # Run any Colmap subcommand via RPC
474
+ cli-anything-acloudviewer --json --mode gui colmap run --subcommand feature_extractor --args "--image_path ./images/"
475
+ ```
476
+
477
+ ### Session management — **General**
478
+
479
+ ```bash
480
+ # Show session status
481
+ cli-anything-acloudviewer --json session status
482
+
483
+ # Undo last operation
484
+ cli-anything-acloudviewer session undo
485
+
486
+ # Redo last undone operation
487
+ cli-anything-acloudviewer session redo
488
+ ```
489
+
490
+ ### JSON output (for agent/script consumption)
491
+
492
+ All commands support `--json` flag for structured output. Use **`--mode headless`** or **`--mode gui`** when the command belongs to that category; General commands do not require a backend mode.
493
+
494
+ ```bash
495
+ cli-anything-acloudviewer --json info
496
+ cli-anything-acloudviewer --json formats
497
+ cli-anything-acloudviewer --json --mode headless process subsample input.ply -o sub.ply --voxel-size 0.05
498
+ ```
499
+
500
+ ## Command Reference
501
+
502
+ | Mode | Group | Subcommands | Description |
503
+ |------|-------|------------|-------------|
504
+ | **General** | `check` | — | Installation diagnostics and fix hints |
505
+ | **General** | `install` | `app`, `wheel`, `auto` | Download / install binary or Python wheel |
506
+ | **General** | `formats` | — | List supported file formats |
507
+ | **General** | `info` | — | Show backend info and supported formats |
508
+ | **General** | `session` | `status`, `undo`, `redo` | Session management |
509
+ | **General** | `repl` | — | Interactive REPL session |
510
+ | **Headless** | `convert` | — | Convert between 30+ 3D file formats |
511
+ | **Headless** | `batch-convert` | — | Batch convert all files in a directory |
512
+ | **Headless** | `process` | `subsample`, `normals`, `icp`, `sor`, `c2c-dist`, `c2m-dist`, `crop`, `density`, `curvature`, `roughness`, `delaunay`, `sample-mesh`, `color-banding`, `set-active-sf`, `remove-sf`, `remove-all-sfs`, `rename-sf`, `filter-sf`, `coord-to-sf`, `remove-rgb`, `remove-normals`, `invert-normals`, `merge-clouds`, `extract-vertices`, `flip-triangles`, `mesh-volume`, `merge-meshes`, `volume-25d`, `crop-2d`, `rasterize`, `cross-section`, `stat-test`, … | Point cloud and mesh processing (35+ operations) |
513
+ | **Headless** | `reconstruct` | `mesh`, `auto`, `extract-features`, `match`, `sparse`, `undistort`, `dense-stereo`, `fuse`, `poisson`, `simplify-mesh`, `texture-mesh`, `convert-model`, `analyze-model`, `delaunay-mesh` | 3D reconstruction (Colmap SfM/MVS) |
514
+ | **Headless** | `sibr` | `tool`, `prepare-colmap`, `texture-mesh`, `unwrap-mesh`, `tonemapper`, `align-meshes`, `camera-converter`, `nvm-to-sibr`, `crop-from-center`, `clipping-planes`, `distord-crop` | SIBR dataset preprocessing (11 tools) |
515
+ | **GUI** | `open` | — | Open a file in the running ACloudViewer |
516
+ | **GUI** | `clear` | — | Clear all entities from the scene |
517
+ | **GUI** | `scene` | `list`, `info`, `remove`, `set-visible`, `select`, `clear` | Scene tree operations |
518
+ | **GUI** | `entity` | `rename`, `set-color` | Entity property management |
519
+ | **GUI** | `view` | `screenshot`, `camera`, `orientation`, `zoom-fit`, `refresh`, `perspective`, `point-size` | Viewport control (7 operations) |
520
+ | **GUI** | `cloud` | `compute-normals`, `subsample`, `crop`, `scalar-fields`, `paint-uniform`, `paint-by-height`, `set-active-sf`, `remove-sf`, `remove-all-sfs`, `rename-sf`, `filter-sf`, `coord-to-sf`, `remove-rgb`, `remove-normals`, `invert-normals`, `merge` | Point cloud operations (16 operations) |
521
+ | **GUI** | `mesh` | `simplify`, `smooth`, `sample-points`, `extract-vertices`, `flip-triangles`, `volume`, `merge` | Mesh operations (7 operations) |
522
+ | **GUI** | `transform` | `apply` | Apply transformations to entities |
523
+ | **GUI** | `export` | — | Export entities to file |
524
+ | **GUI** | `methods` | `list` | List available RPC methods (dynamic discovery) |
525
+ | **GUI** | `colmap` | `reconstruct`, `run` | COLMAP reconstruction via RPC |
526
+
527
+ ## JSON-RPC API (72 Methods)
528
+
529
+ When running in GUI mode, the harness communicates via JSON-RPC 2.0 over WebSocket. The method registry is dynamic — use `methods.list` to discover all available methods at runtime.
530
+
531
+ Key method groups:
532
+
533
+ | Category | Methods |
534
+ |----------|---------|
535
+ | **Lifecycle** | `ping`, `methods.list` |
536
+ | **File I/O** | `open`, `export`, `file.convert`, `clear` |
537
+ | **Scene** | `scene.list`, `scene.info`, `scene.remove`, `scene.setVisible` |
538
+ | **Entity** | `entity.rename`, `entity.setColor` |
539
+ | **View** | `view.screenshot`, `view.setOrientation`, `view.zoomFit`, `view.refresh`, `view.setPerspective`, `view.setPointSize`, `view.getCamera` |
540
+ | **Cloud** | `cloud.computeNormals`, `cloud.subsample`, `cloud.crop`, `cloud.getScalarFields`, `cloud.paintUniform`, `cloud.paintByHeight`, `cloud.paintByScalarField`, `cloud.setActiveSf`, `cloud.removeSf`, `cloud.removeAllSfs`, `cloud.renameSf`, `cloud.filterSf`, `cloud.coordToSF`, `cloud.removeRgb`, `cloud.removeNormals`, `cloud.invertNormals`, `cloud.merge`, `cloud.density`, `cloud.curvature`, `cloud.roughness`, `cloud.geometricFeature`, `cloud.approxDensity`, `cloud.colorBanding`, `cloud.sorFilter`, `cloud.sfArithmetic`, `cloud.sfOperation`, `cloud.sfGradient`, `cloud.sfConvertToRGB`, `cloud.octreeNormals`, `cloud.orientNormalsMST`, `cloud.clearNormals`, `cloud.normalsToSFs`, `cloud.normalsToDip`, `cloud.extractConnectedComponents`, `cloud.bestFitPlane`, `cloud.delaunay` |
541
+ | **Mesh** | `mesh.simplify`, `mesh.smooth`, `mesh.samplePoints`, `mesh.extractVertices`, `mesh.flipTriangles`, `mesh.volume`, `mesh.merge` |
542
+ | **Transform** | `transform.apply` |
543
+ | **COLMAP** | `colmap.reconstruct`, `colmap.run` |
544
+
545
+ ## MCP Server (187 Tools)
546
+
547
+ An optional MCP server exposes 187 tools for integration with AI agents:
548
+
549
+ ```bash
550
+ pip install -e .
551
+ cli-anything-acloudviewer-mcp --mode auto
552
+ ```
553
+
554
+ MCP tool categories mirror the JSON-RPC methods above, plus additional CLI-only tools for headless processing, file conversion, batch operations, SIBR, plugin processing (PCV, Compass, SRA, CSF, RANSAC, etc.), and session management.
555
+
556
+ ## Supported File Formats
557
+
558
+ ### Point Cloud (Import/Export)
559
+
560
+ | Format | Extensions | Plugin Required |
561
+ |--------|-----------|----------------|
562
+ | PLY | `.ply` | — (built-in) |
563
+ | ASCII | `.asc`, `.xyz`, `.xyzn`, `.xyzrgb`, `.pts`, `.txt`, `.csv`, `.neu` | — (built-in) |
564
+ | BIN | `.bin` | — (built-in) |
565
+ | VTK | `.vtk` | — (built-in) |
566
+ | PCD | `.pcd` | qPCL |
567
+ | LAS/LAZ | `.las`, `.laz` | qLASIO or qPDALIO |
568
+ | E57 | `.e57` | qE57IO |
569
+ | DRC | `.drc` | qDracoIO |
570
+ | SBF | `.sbf` | qCoreIO |
571
+ | PTX (import only) | `.ptx` | — (built-in) |
572
+
573
+ ### Mesh (Import/Export)
574
+
575
+ | Format | Extensions | Plugin Required |
576
+ |--------|-----------|----------------|
577
+ | OBJ | `.obj` | — (built-in) |
578
+ | STL | `.stl` | — (built-in) |
579
+ | OFF | `.off` | — (built-in) |
580
+ | FBX | `.fbx` | qFBXIO |
581
+ | DXF | `.dxf` | — (requires CV_DXF_SUPPORT) |
582
+ | glTF (import only) | `.gltf`, `.glb` | qMeshIO |
583
+ | DAE (import only) | `.dae` | qMeshIO |
584
+ | 3DS (import only) | `.3ds` | qMeshIO |
585
+
586
+ ## Platform Notes
587
+
588
+ | Platform | Binary Name | Auto-Discovery |
589
+ |----------|------------|----------------|
590
+ | Linux | `ACloudViewer.sh`, `ACloudViewer` | PATH, `/usr/local/bin`, `/opt/ACloudViewer`, `~/.local/share/ACloudViewer` |
591
+ | macOS | `ACloudViewer` | PATH, `/Applications/ACloudViewer.app`, `~/Applications/ACloudViewer.app` |
592
+ | Windows | `ACloudViewer.bat`, `ACloudViewer.exe` | PATH, `%PROGRAMFILES%\ACloudViewer`, `%LOCALAPPDATA%\ACloudViewer` |
593
+
594
+ On all platforms, set `ACV_BINARY` environment variable to override auto-discovery.
595
+
596
+ ### Platform-specific format availability
597
+
598
+ - **LAS FWF** (full waveform): Windows only (`qLASFWF` plugin)
599
+ - **STEP/STP** import: Requires OpenCASCADE (varies by build)
600
+ - **GDAL rasters** (`.tif`, `.tiff`): Requires `CV_GDAL_SUPPORT` build flag
601
+ - **SHP**: Requires `CV_SHP_SUPPORT` build flag
602
+ - **SIBR tools**: Not available on macOS
603
+
604
+ ## Running Tests
605
+
606
+ ```bash
607
+ pip install -e ".[dev]"
608
+ python -m pytest cli_anything/acloudviewer/tests/ -v
609
+ ```
610
+
611
+ Test suite covering CLI structure, format maps, backend logic, RPC client wrappers (20 new cloud analysis/SF/normals wrappers), MCP tool registration (187 tools), and session management.
612
+
613
+ ## Methodology
614
+
615
+ Built following the
616
+ [CLI-Anything HARNESS methodology](https://github.com/Asher-1/CLI-Anything/blob/main/cli-anything-plugin/HARNESS.md).
@@ -0,0 +1 @@
1
+ """ACloudViewer CLI — 3D point cloud and mesh processing via binary CLI and JSON-RPC."""
@@ -0,0 +1,5 @@
1
+ """Allow running as python3 -m cli_anything.acloudviewer"""
2
+ from cli_anything.acloudviewer.acloudviewer_cli import main
3
+
4
+ if __name__ == "__main__":
5
+ main()