| Crates.io | tavo-ai |
| lib.rs | tavo-ai |
| version | 0.4.0 |
| created_at | 2025-10-12 03:35:25.529126+00 |
| updated_at | 2025-10-12 03:35:25.529126+00 |
| description | Tavo AI SDK for Rust |
| homepage | https://tavoai.github.io/tavo-api/ |
| repository | https://github.com/TavoAI/tavo-api |
| max_upload_size | |
| id | 1878843 |
| size | 88,326 |
Tavo AI SDK for Rust
Add this to your Cargo.toml:
[dependencies]
tavo-ai = "0.4"
Or use cargo:
cargo add tavo-ai
use tavo_ai::TavoClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize client
let client = TavoClient::new("your-api-key-here")?;
// Health check
let health = client.health_check().await?;
println!("API Status: {}", health.status);
Ok(())
}
use tavo_ai::{TavoClient, ScanOptions};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = TavoClient::new("your-api-key")?;
// Scan a repository
let scan_options = ScanOptions {
repository_url: "https://github.com/user/repo".to_string(),
scan_type: "security".to_string(),
};
let scan = client.scans().create(scan_options).await?;
println!("Scan created: {}", scan.id);
// Get scan results
let results = client.scans().get_results(&scan.id).await?;
println!("Vulnerabilities found: {}", results.vulnerabilities.len());
Ok(())
}
use tavo_ai::TavoClientBuilder;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = TavoClientBuilder::new("your-api-key")
.base_url("https://api.tavoai.net")?
.timeout(std::time::Duration::from_secs(30))
.build()?;
// Use client...
Ok(())
}
Main client struct for interacting with Tavo AI API.
new(api_key: &str): Create a new client with default configurationhealth_check(): Check API availabilityscans(): Get scans API clientBuilder for configuring TavoClient instances.
new(api_key: &str): Create a new builderbase_url(url: &str): Set custom base URLtimeout(duration: Duration): Set request timeoutbuild(): Build the clientcreate(options: ScanOptions): Create a new scanget_results(scan_id: &str): Get scan resultslist(): List all scansGet your API key from Tavo AI Dashboard.
export TAVO_API_KEY="your-api-key"
See the examples/ directory for complete usage examples:
cargo run --example basic_scan
Apache-2.0