`cargo run --bin setup -- did` adds #atproto_label and #atproto_labeler to the DID document via the PDS-signed PLC flow, prompting for the main password and the emailed code. Splits setup into declare/did modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
567 B
Rust
20 lines
567 B
Rust
//! One-time labeler setup.
|
|
//!
|
|
//! - `cargo run --bin setup -- declare` publishes the label definitions.
|
|
//! - `cargo run --bin setup -- did` publishes the labeler's identity entries.
|
|
mod declare;
|
|
mod did;
|
|
|
|
use anyhow::{Result, bail};
|
|
use cities_labeler::config::Config;
|
|
|
|
#[tokio::main]
|
|
async fn main() -> Result<()> {
|
|
let config = Config::from_env()?;
|
|
match std::env::args().nth(1).as_deref() {
|
|
Some("declare") => declare::run(&config).await,
|
|
Some("did") => did::run(&config).await,
|
|
_ => bail!("usage: setup <declare|did>"),
|
|
}
|
|
}
|