1use crate::config::{CLAUDE_ENV, Config, OPENCODE_ENV}; 2use crate::vm::ssh; 3 4pub fn render(cfg: &Config) -> String { 5 let mut out = String::from( 6 "export PATH=\"$HOME/.local/bin:$HOME/.opencode/bin:$HOME/.cargo/bin:/usr/local/go/bin:$HOME/go/bin:$PATH\"\nexport DISPLAY=:0\nexport AGENT_BROWSER_HEADED=1\n", 7 ); 8 for (name, secret) in [ 9 (CLAUDE_ENV, cfg.claude_token()), 10 (OPENCODE_ENV, cfg.opencode_key()), 11 ] { 12 if let Some(s) = secret { 13 out += &format!("export {name}={}\n", ssh::quote(&s.value)); 14 } 15 } 16 out 17}