# Slab Slab turns pasted code, notes, markdown, and agent transcripts into shareable images. ## Programmatic usage To open Slab with prefilled content, construct a URL using the hash fragment: https://slab.sentry.dev/#data= The decoded JSON object should match: ```json { "source": "string", "language": "auto", "preset": "auto", "fontSize": "16" } ``` The hash fragment is used so source content is not sent to the server. Supported values and encoding details are documented at: https://slab.sentry.dev/slab-api.json ## Example JSON: ```json { "source": "console.log('hello')", "language": "javascript", "preset": "landscape", "fontSize": "16" } ``` Open: https://slab.sentry.dev/#data=eyJzb3VyY2UiOiJjb25zb2xlLmxvZygnaGVsbG8nKSIsImxhbmd1YWdlIjoiamF2YXNjcmlwdCIsInByZXNldCI6ImxhbmRzY2FwZSIsImZvbnRTaXplIjoiMTYifQ ## Shell helper This opens Slab with stdin as the source: ```bash node -e "let s='';process.stdin.setEncoding('utf8');process.stdin.on('data',c=>s+=c);process.stdin.on('end',()=>{const state={source:s,language:'auto',preset:'auto',fontSize:'16'};const data=Buffer.from(JSON.stringify(state),'utf8').toString('base64url');console.log('https://slab.sentry.dev/#data='+data);})" ```