KeiSeiKit-1.0/_primitives/_rust/kei-registry/src/main.rs
Parfii-bot 0be354a920 KeiSeiKit-public — clean state
Single-commit clean baseline after security scrub of niche-tells,
project codenames, internal jargon, and contributor-email leaks.

Contents:
- 100 Rust crates (_primitives/_rust/)
- 37 agent manifests (_manifests/) + generated specs (_generated/)
- 67 user-invocable skills (skills/)
- 33 hooks (hooks/)
- Composition blocks (_blocks/)
- Documentation (docs/, README.md)
- TS adapter packages (_ts_packages/)
- Assembler (_assembler/)
- Roles (_roles/)
- Templates (_templates/)
- Forgejo CI (.forgejo/)

Author: Denis Parfionovich <info@greendragon.info>

License: see LICENSE.
2026-05-01 12:09:03 +08:00

25 lines
750 B
Rust

//! kei-registry binary entry point.
//!
//! Constructor Pattern: this file does ONE thing — parse CLI args and
//! dispatch to `handlers::dispatch`. All policy lives in the library.
//! Exit codes per spec: 0 success, 1 IO error, 2 not-found, 3 schema mismatch.
use clap::Parser;
use kei_registry::cli::Cli;
use kei_registry::handlers::{dispatch, Outcome};
fn main() {
let cli = Cli::parse();
let exit_code = match dispatch(cli.command) {
Ok(Outcome::Ok) => 0,
Ok(Outcome::NotFound(target)) => {
eprintln!("kei-registry: not found: {target}");
2
}
Err(e) => {
eprintln!("kei-registry: error: {e:#}");
1
}
};
std::process::exit(exit_code);
}