Overview
Snippets allow you to:- Store frequently-used commands and code
- Share public snippets in marketplace
- Run snippets with
rexec snippets run <name> - Categorize by language and tags
List snippets
GET/api/snippets
Get all user snippets.
curl
Snippet ID
Snippet name
Code or command content
Programming language (bash, python, javascript, etc.)
Optional description
Whether visible in marketplace
Number of times used
ISO timestamp
Create snippet
POST/api/snippets
Snippet name (unique per user)
Code or command content
Language identifier (default: “bash”)
Optional description
Share in marketplace (default: false)
curl
Update snippet
PUT/api/snippets/:id
Update snippet content or metadata.
curl
Delete snippet
DELETE/api/snippets/:id
curl
Increment usage count
POST/api/snippets/:id/use
Track snippet usage (called automatically by CLI/UI).
curl
Browse marketplace
GET/api/snippets/marketplace
List public snippets from all users.
Query Parameters:
language- Filter by languagecategory- Filter by categorysearch- Search name/descriptionsort- Sort bypopular,recent, orname
curl
CLI usage
Variable substitution
Snippets support template variables:Supported languages
bash- Shell scriptspython- Python codejavascript- JavaScript/Node.jstypescript- TypeScriptgo- Go coderust- Rust codesql- SQL queriesdockerfile- Dockerfileyaml- YAML configjson- JSON data
Related
- CLI Commands - Snippet CLI usage
- Collaboration - Share snippets with team