Slack Setup
Connecting spore.host to Slack gives you /spore commands in any channel and direct message notifications when your instances change state — useful whenever you're away from the terminal.
What you'll get
Slash commands — type these in any Slack channel:
/spore list — all your registered instances
/spore status rstudio — current state, type, URL, TTL countdown
/spore start rstudio — start a stopped instance
/spore stop rstudio — stop a running instance
/spore extend rstudio 4h — extend the auto-terminate deadline
/spore hibernate rstudio — hibernate (save RAM state, stop billing)
/spore connect — generate a one-time code for a collaborator
/spore notify rstudio — subscribe to DM notifications for this instance
/spore help — command referenceDirect message notifications for lifecycle events:
- ⏱️ rstudio terminates in 5 minutes
- ✅ bert-finetune has completed
- 💤 analysis has hibernated — idle timeout reached
- ⚠️ training received a Spot interruption notice
Step 1: Create a Slack app
- Go to api.slack.com/apps and click Create New App → From scratch
- Name it
spore-bot(or whatever you prefer) and pick your workspace - Under OAuth & Permissions → Bot Token Scopes, add:
commandschat:writeusers:readusers:read.emailincoming-webhook
- Under Slash Commands, create a new command:
- Command:
/spore - Request URL:
https://awdzf7fbbsvqcrnrzusqjsuybm0iiyvf.lambda-url.us-east-1.on.aws/slack - Short Description:
Control your spore.host instances
- Command:
- Under Settings → Basic Information, enable Token Rotation under App Credentials
- Install the app to your workspace — Slack will ask which channel to post notifications to
Step 2: Connect your workspace
After installing the app, you can either use the OAuth flow (recommended) or register manually.
OAuth flow (recommended)
Click Add to Slack and authorize the app. The Lambda automatically stores your bot token and signing secret.
TIP
Your "Add to Slack" URL is:
https://awdzf7fbbsvqcrnrzusqjsuybm0iiyvf.lambda-url.us-east-1.on.aws/spore/oauthManual registration
spawn notify workspace-add \
--platform slack \
--workspace-id T03NE3GTY \
--workspace-name "My Workspace" \
--bot-token xoxb-... \
--signing-secret abc123...Your workspace ID appears in your Slack URL: https://app.slack.com/client/T03NE3GTY/...
Step 3: Register an instance
Once the workspace is connected, register your instances so spore-bot can find them:
spawn notify register \
--platform slack \
--user you@university.edu \
--workspace-id T03NE3GTY \
--instance i-0a1b2c3d4e5f \
--nickname rstudio \
--allow start,stop,status,hibernate,url
spawn notify enable \
--platform slack \
--user you@university.edu \
--workspace-id T03NE3GTY \
--nickname rstudioThe --nickname is what you'll use in Slack commands (/spore status rstudio). The --allow flag controls which operations this user can perform.
Step 4: Enable notifications at launch
Set the --slack-workspace flag when launching to enable DM notifications:
spawn launch \
--name rstudio \
--instance-type r6i.2xlarge \
--ttl 8h \
--slack-workspace T03NE3GTYOr save it as a default so you never have to type it:
spawn defaults set slack-workspace T03NE3GTYAdding collaborators
Give a collaborator access to an instance without giving them AWS credentials. They can start, stop, and check status entirely from Slack.
# Register a collaborator by email
spawn notify register \
--platform slack \
--user collaborator@partner.edu \
--workspace-id T03NE3GTY \
--instance i-0a1b2c3d4e5f \
--nickname rstudio \
--allow status,start,stop
spawn notify enable \
--platform slack \
--user collaborator@partner.edu \
--workspace-id T03NE3GTY \
--nickname rstudioAlternatively, generate a one-time connect code that the collaborator uses themselves:
/spore connect # generates a code like SPORE-XXXXXXShare the code with the collaborator. They run:
spawn notify register --connect-code SPORE-XXXXXX --nickname rstudioNotification-only subscriptions
If a collaborator wants DM notifications but shouldn't control the instance:
/spore notify rstudioThis subscribes them to all lifecycle notifications for rstudio without granting start/stop access.
To unsubscribe: /spore unnotify rstudio
Troubleshooting
Commands return "workspace not found" — check that the signing secret in your Slack app matches what was registered. Signing secrets are regenerated if you change your app's scopes. Re-register with the new secret:
spawn notify workspace-add --platform slack --workspace-id T0... --signing-secret <new-secret>Not receiving DM notifications — make sure the instance was launched with --slack-workspace and that you've run /spore notify <nickname> for your user.