Skip to content

refactor: unified cvc CLI#96

Merged
transfix merged 5 commits into
masterfrom
refactor/unified-cvc-cli
May 26, 2026
Merged

refactor: unified cvc CLI#96
transfix merged 5 commits into
masterfrom
refactor/unified-cvc-cli

Conversation

@transfix
Copy link
Copy Markdown
Owner

Summary

Consolidates the old standalone libcvc.cpp CLI, volutils commands, and meshing/SDF operations into a single unified cvc program with subcommands.

Changes

  • New: src/cvc-cli/main.cpp — unified CLI with 25 subcommands grouped by category
  • New: src/cvc-cli/CMakeLists.txt — builds and installs the cvc executable
  • Updated: src/CMakeLists.txt — wires in cvc-cli subdirectory
  • Removed: src/cvc/core/libcvc.cpp — obsolete standalone program

Commands (25 total)

Category Commands
File Info info, stats
Conversion copy, convert
Geometry sdf, iso, tetrahedralize, hexahedralize
Vol Arithmetic add, subtract, scale, normalize, clip, negate, mask, downsample
Vol Transform rotate
Analysis ssim
Projection project, backproject
Image I/O vol2img, img2vol, rgba-merge
Test Data bunny
Network server, client (XMLRPC conditional)

Improvements over old libcvc CLI

  • Rich per-command --help with option descriptions and enum listings
  • Named options with short flags (-i, -o, -d, -v, etc.)
  • Positional argument support for common patterns
  • Grouped help output by category
  • --version flag
  • All SDF algorithm and mesher extraction/improvement/normal options exposed
  • Feature guards (CVC_ENABLE_SDF, CVC_ENABLE_MESHER)
  • Consolidates volume utilities from volrover's volutils (eventual deprecation of standalone volutils)

Testing

  • Builds successfully (local debug build)
  • cvc --help shows all commands grouped by category
  • cvc sdf --help, cvc iso --help show rich option descriptions
  • cvc bunny test.off exports geometry successfully
  • cvc info test.off reads back geometry metadata correctly

transfix added 3 commits May 25, 2026 18:15
… commands

Replace the old standalone libcvc.cpp program with a modern unified CLI
called 'cvc' that consolidates all functionality into a single tool with
subcommands, inspired by volutils' boost::program_options pattern.

Commands included (25 total, grouped by category):

  File Info:     info, stats
  Conversion:    copy, convert
  Geometry:      sdf, iso, tetrahedralize, hexahedralize
  Vol Arithmetic: add, subtract, scale, normalize, clip, negate, mask, downsample
  Vol Transform: rotate
  Analysis:      ssim
  Projection:    project, backproject
  Image I/O:     vol2img, img2vol, rgba-merge
  Test Data:     bunny
  Network:       server, client (XMLRPC, conditional)

Key improvements over old libcvc CLI:
- Rich per-command --help with option descriptions
- Named options with short flags (-i, -o, -d, etc.)
- Positional argument support for common patterns
- Grouped help output by category
- --version flag
- All SDF algorithm and mesher extraction/improvement options exposed
- Feature guards (#ifdef CVC_ENABLE_SDF, CVC_ENABLE_MESHER)
- Combines volume utilities previously only in volrover's volutils

The old src/cvc/core/libcvc.cpp is removed as obsolete.
- Add cvc_cli_test.cpp with 58 fast tests + 11 heavy integration tests
- Fast tests: help/version, subcommand --help (20+), bunny geometry,
  info/stats/copy/convert, volume arithmetic, SDF (v1+v2), iso extraction,
  error handling, SDF->iso pipeline
- Integration tests (gated to merge-to-master): BunnySdfV2, SdfIsoRoundtrip,
  VolumeShortcut, VolArithmetic, Ssim, Convert, IsoExtractionMethods,
  Tetrahedralize, Hexahedralize, HighRes, SdfFlipNormals
- Add --algorithm/-a flag to bunny command for SDF algorithm selection
- Update CI workflow: add 'Integration' to STRESS_REGEX so heavy tests
  only run on push-to-master (3600s timeout), skipped on PRs
- Use 16x16x16 minimum grid for SDF tests (v1 requires >= 16)
- tetrahedralize2: dual-tet (TETRA2) mesh extraction from volume
- layer-mesh: interval/layer meshing between two isosurfaces
  (outer and inner isovalue) for shells, cortical layers, etc.
- Both support full improvement method and normal type options
- Add help tests and integration tests (73 total tests, all passing)
@transfix transfix force-pushed the refactor/unified-cvc-cli branch from eeb154e to 05d1ba2 Compare May 25, 2026 23:17
transfix added 2 commits May 25, 2026 19:02
New commands for distributed state and script execution:

- serve: headless CVC state server with distributed_state_session
  Supports IPC/gRPC transport, peer clustering (--seed), TLS, bearer
  token auth, subtree delegation, and optional state_exec coordinator.

- exec: run state_exec (Scheme-like) scripts against the state tree
  Supports inline expressions (-e) and script files (-f) with
  resource limits (--max-steps, --max-time).

- state: query and modify the state tree
  Operations: get, set, list, json, delete on dot-separated paths.

- cluster-status: connect to a cluster and print admin health report
  Shows peers, delegations, blob store, shard stats.

- ps: list running state_exec processes

Tests: 95 total (78 fast + 17 integration), all passing.
New tests cover help for all 5 commands, exec arithmetic/let/lambda/
file/errors, state get/set/list/json/errors, ps, and integration
tests for exec pipelines, resource limits, and multi-file scripts.
@transfix transfix merged commit f83ced6 into master May 26, 2026
9 of 14 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