| Crates.io | keepassxc-proxy-lib |
| lib.rs | keepassxc-proxy-lib |
| version | 0.1.1 |
| created_at | 2025-12-04 09:15:46.949015+00 |
| updated_at | 2025-12-04 10:38:45.737412+00 |
| description | Client library for communicating with KeePassXC via its browser integration protocol |
| homepage | https://git.dog/xx/keepassxc-proxy-lib |
| repository | https://git.dog/xx/keepassxc-proxy-lib |
| max_upload_size | |
| id | 1966219 |
| size | 56,628 |
A Rust library to fetch credentials from a running KeePassXC instance via its browser integration protocol.
Add to your Cargo.toml:
[dependencies]
keepassxc-proxy-lib = "0.1"
use keepassxc_proxy_lib::{Connection, Association};
fn main() -> Result<(), keepassxc_proxy_lib::Error> {
let mut conn = Connection::new();
conn.connect(None)?;
// Create new association (database should be unlocked)
conn.associate()?;
// Save association for later
let assoc = conn.dump_association()?;
println!("Save this: {}", serde_json::to_string(&assoc)?);
// Get logins
let logins = conn.get_logins("https://github.com")?;
for login in logins {
println!("User: {}, Pass: {}", login.login, login.password);
}
Ok(())
}
use keepassxc_proxy_lib::{Connection, Association};
fn main() -> Result<(), keepassxc_proxy_lib::Error> {
let assoc: Association = serde_json::from_str(r#"{"name":"...","public_key":"..."}"#)?;
let mut conn = Connection::new();
conn.connect(None)?;
conn.load_association(&assoc)?;
if conn.test_associate(false)? {
let logins = conn.get_logins("https://github.com")?;
// ...
}
Ok(())
}
XDG_RUNTIME_DIR or /tmp)TMPDIR)The association's public key acts as a key file to any password with a URL. Store it securely.
MIT