# dioprism-cli

Command-line reporting for Dioprism route, island, asset, capability, budget, profile, and comparison output.

## Install

~~~powershell
cargo install dioprism-cli --version 0.2.0-alpha.1
~~~

## Release Status

- Current crate version: `0.2.0-alpha.1`.
- Release wave: consolidated Dioprism package layout.
- Publish status: Prepared as a crates.io update for this package.
- Scope: Unified CLI for Dioprism analysis, assets, shader, resume, and native-port workflows.
- The README install examples and local workspace dependency requirements are aligned with this publish wave.

## API Syntax Gallery

Generated from the crate's rustdoc JSON so the visible syntax tracks the public API surface used for DX review.

### Checked Import Smoke Test

```rust
extern crate dioprism_cli as api;

fn main() {
    let _ = core::any::type_name::<api::DioprismCliIntegrationConfig>();
}
```

### CLI Syntax

```text
dioprism <command> [options]

Commands:
  dioprism | st | s <plan|profile|compare|manifest|analyze|audit> ...
      Dioprism route, island, asset, capability, budget, profile, and comparison output.
  assets | asset | a <css|hash|precompress|budget|routes> ...
      Asset budget, CSS, HTML, JavaScript, and precompression tooling.
  resume | res | r route --handler id=/assets/chunk.js#symbol [--out file]
      Resume manifest helpers.
  shader | sh render [--preset halo] [--first-paint inline-css]
      Shader poster and first-paint helpers.
  native-port | native | n <audit|plan|convert|build|verify|doctor> ...
      Native-port project conversion and verification.
  dioprism-native-port | snp <audit|convert> ...
      Dioprism/Dioxus native-port audit and conversion helpers.
  manifest | m --route /dioprism [--output file]
      Emit a demo Dioprism manifest JSON. Positional route still works.
  analyze | a --manifest file
      Emit route, island, asset, capability, adapter, and budget summary JSON.
  audit --manifest file [--html file]
      Check boot size, duplicate assets, server-owned patch policy, and runtime flags.
  plan | p --manifest file --route /dioprism [--output file]
      Emit deterministic Dioprism V2 optimization-plan JSON.
  profile | prof --manifest file [--marks file]
      Emit first-pass profiler timing output and optional observed marks.
  compare | cmp --baseline file --dioprism file [--json]
      Compare two manifest files. Positional route still emits the demo table.
```

### `crate root`
#### Constants
```text
pub const DIOPRISM_CLI_INTEGRATION_RANK_COVERAGE: &[u8];
```
#### Type Aliases
```text
pub type DioprismCliIntegrationConfig = dioprism_core::DioprismIntegrationConfig;
pub type DioprismCliRouteOverride = dioprism_core::DioprismRouteOverride;
```
#### Free Functions
```text
dioprism_cli_command<I, S>(command: impl Into<String>, args: I) -> DioprismCliCommandAdapter
dioprism_cli_config() -> DioprismCliIntegrationConfig
dioprism_cli_batch_payload(manifest: &dioprism_core::DioprismManifest) -> dioprism_core::DioprismBatchPayload
run_from<I, S>(args: I) -> Result<(), String>
run_dioprism_from<I, S>(args: I) -> Result<(), String>
print_help()
```
#### Types, Variants, Fields, and Methods
```text
pub struct DioprismCliCommandAdapter { ... }
fields:
  .command: String
  .normalized_args: Vec<String>
  .cache_key: String
  .labels: std::collections::BTreeMap<String, String>
methods:
  DioprismCliCommandAdapter::new<I, S>(command: impl Into<String>, args: I) -> Self
  DioprismCliCommandAdapter::for_command<I, S>(command: impl Into<String>, args: I) -> Self
  value.label(key: impl Into<String>, value: impl Into<String>) -> Self
  value.explain() -> dioprism_core::DioprismDiagnostic
```
