use std::path::PathBuf;
use clap::Parser;
mod catalog;
mod commands;
mod formats;
mod schema;
pub(super) use catalog::{CatalogArgs, CatalogFormat, CatalogKind};
pub(super) use commands::Command;
pub(super) use formats::{DecompileFormat, DisasmFormat, InfoFormat, TokensFormat};
pub(super) use schema::SchemaArgs;
#[derive(Debug, Parser)]
#[command(
author,
version,
about = "Inspect, disassemble, and decompile Neo N3 NEF bytecode",
long_about = "Inspect, disassemble, and decompile Neo N3 NEF bytecode.\n\
\n\
- `info` / `tokens`: header metadata, ABI summary, method tokens.\n\
- `disasm`: instruction stream (text or JSON).\n\
- `cfg`: control-flow graph as Graphviz DOT.\n\
- `decompile`: lift bytecode to high-level pseudocode or a C# skeleton.\n\
- `catalog` / `schema`: bundled opcode/syscall metadata and JSON schemas.\n\
\n\
Companion `<NEF>.manifest.json` is auto-discovered alongside the NEF\n\
unless `--manifest` is passed explicitly."
)]
pub struct Cli {
#[arg(long, global = true)]
pub(super) manifest: Option<PathBuf>,
#[arg(long, global = true)]
pub(super) json_compact: bool,
#[arg(long, global = true)]
pub(super) strict_manifest: bool,
#[command(subcommand)]
pub(super) command: Command,
}