docs/tutorials/snippets-for-deploy-scripts
Intermediate12 minFree (local) · Pro (sync)

Snippets for deploy scripts

Multi-line scripts locally. Pro syncs snippets to the cloud.

Free vs Pro

Free: create multi-line snippets in the VS Code extension or edit ~/.recall/snippets.json. Soft cap ~50. CLI recall snippet … still requires login. Pro syncs snippets with the cloud.

Snippets vs commands

COMMANDS

Single-line shell commands (Free CLI: recall save).

kubectl get pods -n prod
SNIPPETS

Multi-line shell scripts (Free: VS Code / JSON).

#!/bin/bash git pull npm install pm2 restart

01Free: create a snippet in VS Code

In VS Code open recall → Snippets → create. Name it deploy-prod and paste a multi-line script, for example:

#!/bin/bashset -eecho "Deploying..."git pull origin mainnpm cinpm run buildpm2 restart appecho "Done!"

Stored in ~/.recall/snippets.json. No account needed.

More snippet ideas

→Database backup + upload to S3
→Health check across multiple services
→Clean up old Docker images and volumes
→Rotate SSL certificates
→Run database migrations with rollback on failure

02Pro: CLI snippets (login required)

After login on Pro/Team:

recall snippet save deploy-prod --file deploy.sh --tags deploy,prod✔ Saved snippet "deploy-prod"recall snippet run deploy-prodrecall sync
// what's next
→ Load environment variables before running snippets→ Use recall in CI/CD pipelines