Skip to main content
Glama
main.rs648 B
use std::env::args; use si_pkg::{ PkgSpec, SiPkg, }; use tokio::fs; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let mut args = args(); let input = args.nth(1).expect("usage: program <JSON_FILE> <TARBALL>"); let tar_file = args.next().expect("usage: program <JSON_FILE> <TARBALL>"); let spec: PkgSpec = { let buf = fs::read_to_string(&input).await?; serde_json::from_str(&buf)? }; let pkg = SiPkg::load_from_spec(spec)?; println!("--- Writing pkg to: {tar_file}"); fs::write(&tar_file, pkg.write_to_bytes()?).await?; println!("--- Done."); Ok(()) }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/systeminit/si'

If you have feedback or need assistance with the MCP directory API, please join our Discord server