init: archlens — architecture diagram generator
Some checks failed
CI / Check / Test (push) Failing after 1m24s

Hex arch + DDD, tree-sitter parsing, Mermaid/ASCII output.
Supports Rust + Python. 92 tests. CI, diff, --check for staleness detection.
This commit is contained in:
2026-06-16 16:13:04 +02:00
commit 35f27d00b0
106 changed files with 6744 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
use std::path::PathBuf;
use clap::{Parser, Subcommand};
#[derive(Parser, Debug)]
#[command(
name = "archlens",
about = "Generate architecture diagrams from source code"
)]
pub struct Cli {
#[command(subcommand)]
pub command: Option<Command>,
#[arg(default_value = ".")]
pub path: PathBuf,
#[arg(long, default_value = "module")]
pub level: String,
#[arg(long, default_value = "mermaid")]
pub format: String,
#[arg(long)]
pub output: Option<String>,
#[arg(long)]
pub config: Option<String>,
#[arg(long)]
pub scope: Option<String>,
#[arg(long)]
pub exclude: Vec<String>,
#[arg(long)]
pub split_by_module: bool,
#[arg(long)]
pub strict: bool,
#[arg(
long,
help = "Check if output matches existing file, exit 1 if different"
)]
pub check: bool,
#[arg(short, long, action = clap::ArgAction::Count)]
pub verbose: u8,
}
#[derive(Subcommand, Debug)]
pub enum Command {
Init {
#[arg(default_value = ".")]
path: PathBuf,
},
Diff {
#[arg(help = "Path to existing diagram file to compare against")]
existing: PathBuf,
},
}