Structum CLI ReferenceΒΆ

The structum CLI is the unified control plane for the Structum Framework. It follows the β€œToolbox” philosophy: a single binary delivering a cohesive set of tools for the entire development lifecycle.

CLI Demo

πŸ“¦ InstallationΒΆ

Included in the meta-package:

pip install structum

Verify installation:

structum --version

πŸ› οΈ Main CommandsΒΆ

CoreΒΆ

Command

Description

check

Run code quality suite (Ruff, Black)

build-docs

Build Sphinx documentation

Plugin Marketplace (Sprint 2) - [New!]ΒΆ

Manage the Structum ecosystem directly from the CLI.

Command

Description

plugin search

Search the official registry for plugins

plugin install

Install plugins with GPG verification

plugin list

List installed plugins and versions

plugin verify

Verify plugin signature and integrity

Usage:

structum plugin search redis
structum plugin install structum-redis

πŸ”§ Advanced Tools (structum-cli-tools)ΒΆ

These advanced commands are available when the structum-cli-tools plugin is installed.

πŸ”’ SecurityΒΆ

Full Documentation

Command

Description

security scan

Static Analysis (SAST) using Bandit

security audit

Dependency vulnerability check (Safety)

security report

Generate compliance reports (JSON/HTML)

πŸ§ͺ TestingΒΆ

Full Documentation

Command

Description

test

Run pytest with pre-configured defaults

test --cov

Enforce test coverage thresholds

test --watch

Watch file changes and re-run tests

πŸš€ Profiling (Sprint 2)ΒΆ

Full Documentation

Command

Description

profile run

CPU Flamegraphs using py-spy

profile memory

Memory leak detection

profile benchmark

Regression testing with pytest-benchmark

πŸ“¦ Release (Sprint 2)ΒΆ

Full Documentation

Command

Description

release prepare

Semantic Versioning & Changelog generation

release validate

Verify CI status before collecting

release publish

Secure upload to PyPI

πŸ” API Stability (Sprint 2)ΒΆ

Full Documentation

Command

Description

api diff

Detect breaking changes between versions

api validate

Check API design guidelines compliance


⚑ Global Options¢

Option

Description

--verbose / -v

Enable DEBUG level logging

--config <path>

Specify custom configuration file

--no-color

Disable rich terminal output


πŸ—οΈ ArchitectureΒΆ

The CLI is built on Typer and Rich. It uses a Plugin Architecture based on Python Entry Points to discover commands dynamically.

  • Zero-Dependency Core: The base structum command only requires standard library + typer + rich.

  • Lazy Loading: Subcommands (like security or profile) are only imported when invoked, ensuring sub-second startup time.