Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T05:01:59.691Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

main.rs

44 lines · 1.1 KB · rust
1use anyhow::Result;
2use clap::{Parser, ValueEnum};
3use schemars::schema_for;
4use settings::ProjectSettingsContent;
5use theme::IconThemeFamilyContent;
6use theme_settings::ThemeFamilyContent;
7
8#[derive(Parser, Debug)]
9pub struct Args {
10    #[arg(value_enum)]
11    pub schema_type: SchemaType,
12}
13
14#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
15#[clap(rename_all = "snake_case")]
16pub enum SchemaType {
17    Theme,
18    IconTheme,
19    Project,
20}
21
22fn main() -> Result<()> {
23    env_logger::init();
24
25    let args = Args::parse();
26
27    match args.schema_type {
28        SchemaType::Theme => {
29            let schema = schema_for!(ThemeFamilyContent);
30            println!("{}", serde_json::to_string_pretty(&schema)?);
31        }
32        SchemaType::IconTheme => {
33            let schema = schema_for!(IconThemeFamilyContent);
34            println!("{}", serde_json::to_string_pretty(&schema)?);
35        }
36        SchemaType::Project => {
37            let schema = schema_for!(ProjectSettingsContent);
38            println!("{}", serde_json::to_string_pretty(&schema)?);
39        }
40    }
41
42    Ok(())
43}
44
Served at tenant.openagents/omega Member data and write actions are omitted.