feat: add setup did command to publish labeler identity

`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>
This commit is contained in:
govandClaude Opus 5.5 committed 2026-11-06 15:18:00 -05:00
1 parent 3c0d56cdaf
commit b4ac30c010
7 files changed
+199 -28

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
//! 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>"),
}
}