Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,8 @@ fjall = "3"
# File locking
fs2 = "0.4"

# Password input
rpassword = "7"

# Testing
tempfile = "3"
3 changes: 3 additions & 0 deletions crates/akroasis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ comfy-table = "7"
dialoguer = "0.11"
figment = { workspace = true }
indicatif = "0.17"
jiff = { workspace = true }
koinon = { path = "../koinon" }
kryphos = { path = "../kryphos" }
rpassword = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
snafu = { workspace = true }
Expand Down
12 changes: 10 additions & 2 deletions crates/akroasis/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use clap::{Parser, Subcommand};

use crate::radio::RadioCommand;
use crate::vault::VaultCommand;

#[allow(clippy::doc_markdown)]
#[derive(Parser)]
Expand Down Expand Up @@ -37,8 +38,8 @@ pub enum Command {
Nav,
/// Knowledge — offline references, frequency databases, manuals
Know,
/// Communications — encrypted messaging, key management
Comms,
/// Credential vault — store, retrieve, rotate, and revoke secrets
Vault(VaultArgs),
/// Privacy — VPN, anonymization, OPSEC assessment
Privacy,
/// Serve the Akroasis daemon
Expand All @@ -51,3 +52,10 @@ pub struct RadioArgs {
#[command(subcommand)]
pub command: RadioCommand,
}

/// Vault subcommand arguments.
#[derive(clap::Args)]
pub struct VaultArgs {
#[command(subcommand)]
pub command: VaultCommand,
}
9 changes: 8 additions & 1 deletion crates/akroasis/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

mod cli;
mod radio;
mod vault;

use std::path::PathBuf;

Expand Down Expand Up @@ -32,6 +33,10 @@ enum Error {
/// A radio operation failed.
#[snafu(display("{source}"))]
Radio { source: radio::errors::RadioError },

/// A vault operation failed.
#[snafu(display("{source}"))]
Vault { source: vault::VaultCliError },
}

/// Application configuration loaded from TOML file and environment overrides.
Expand Down Expand Up @@ -73,7 +78,9 @@ fn dispatch(command: &Command) -> Result<(), Error> {
Command::Auto => println!("praxis — automation (not yet implemented)"),
Command::Nav => println!("chorografia — navigation (not yet implemented)"),
Command::Know => println!("pinax — knowledge repository (not yet implemented)"),
Command::Comms => println!("kryphos — communications (not yet implemented)"),
Command::Vault(args) => {
vault::dispatch(&args.command).context(VaultSnafu)?;
}
Command::Privacy => println!("lethe — privacy (not yet implemented)"),
Command::Serve => println!("daemon mode (not yet implemented)"),
}
Expand Down
Loading
Loading