Skip to main content

neo_decompiler/cli/
args.rs

1use std::path::PathBuf;
2
3use clap::Parser;
4
5mod catalog;
6mod commands;
7mod formats;
8mod schema;
9
10pub(super) use catalog::{CatalogArgs, CatalogFormat, CatalogKind};
11pub(super) use commands::Command;
12pub(super) use formats::{DecompileFormat, DisasmFormat, InfoFormat, TokensFormat};
13pub(super) use schema::SchemaArgs;
14
15/// Command line interface for the minimal Neo N3 decompiler.
16#[derive(Debug, Parser)]
17#[command(author, version, about = "Inspect Neo N3 NEF bytecode", long_about = None)]
18pub struct Cli {
19    /// Optional path to the companion manifest JSON file.
20    #[arg(long, global = true)]
21    pub(super) manifest: Option<PathBuf>,
22
23    /// Emit compact JSON (no extra whitespace) whenever `--format json` is requested.
24    #[arg(long, global = true)]
25    pub(super) json_compact: bool,
26
27    /// Enforce strict manifest validation (reject non-canonical wildcard-like values).
28    #[arg(long, global = true)]
29    pub(super) strict_manifest: bool,
30
31    #[command(subcommand)]
32    pub(super) command: Command,
33}