Manage social media accounts programmatically via URL scheme. Add, remove, edit, and configure accounts for X, BlueSky, and Mastodon from scripts.
Manage connected social media accounts programmatically. Add, remove, edit, and configure accounts for X, BlueSky, and Mastodon.
statuz://accounts?action={action}&platform={platform}&[parameters]
| Parameter | Type | Description | Example |
|---|---|---|---|
action | string | Required - Action to perform: add, remove, edit, set-default | add |
platform | string | Required - Platform: x, bluesky, mastodon | x |
id | string | Account ID (for identification) | account-123 |
name | string | Account username/handle | johndoe |
nickname | string | Account nickname | Work%20Account |
set-nickname | string | New nickname (for edit action) | Personal |
set-enabled | boolean | Enable/disable account | true |
instance | string | Mastodon instance URL | fosstodon.org |
autoConnect | boolean | Auto-trigger OAuth (for add action) | true |
Important: Nicknames are platform-scoped. You can use the same nickname on different platforms without conflicts.
Navigate to the account connection screen and optionally trigger OAuth automatically.
# Add X account
open "statuz://accounts?action=add&platform=x"
# Add BlueSky account
open "statuz://accounts?action=add&platform=bluesky"
# Add Mastodon account (defaults to mastodon.social)
open "statuz://accounts?action=add&platform=mastodon"For Mastodon, specify a custom instance:
# Add account on fosstodon
open "statuz://accounts?action=add&platform=mastodon&instance=fosstodon.org"
# Add account on mas.to
open "statuz://accounts?action=add&platform=mastodon&instance=mas.to"By default, the OAuth flow triggers automatically. To only show the form:
# Show form without auto-connecting
open "statuz://accounts?action=add&platform=mastodon&autoConnect=false"Disconnect and remove an account. Identify the account using one of: id, name, or nickname.
# Remove by username
open "statuz://accounts?action=remove&platform=x&name=johndoe"
# Remove by ID
open "statuz://accounts?action=remove&platform=bluesky&id=account-123"
# Remove by nickname (URL-encoded)
NICKNAME=$(printf %s "Work Account" | jq -sRr @uri)
open "statuz://accounts?action=remove&platform=x&nickname=$NICKNAME"Modify account settings: nickname and enabled status.
Note: Credentials cannot be modified via URL scheme for security. OAuth must be done through the app's secure UI.
# Edit by username
NICKNAME=$(printf %s "Personal Account" | jq -sRr @uri)
open "statuz://accounts?action=edit&platform=x&name=johndoe&set-nickname=$NICKNAME"
# Edit by ID
NICKNAME=$(printf %s "Work Account" | jq -sRr @uri)
open "statuz://accounts?action=edit&platform=bluesky&id=account-456&set-nickname=$NICKNAME"# Disable account temporarily
open "statuz://accounts?action=edit&platform=x&name=johndoe&set-enabled=false"
# Re-enable account
open "statuz://accounts?action=edit&platform=x&name=johndoe&set-enabled=true"# Change nickname and enable
NICKNAME=$(printf %s "Main Account" | jq -sRr @uri)
open "statuz://accounts?action=edit&platform=bluesky&name=user&set-nickname=$NICKNAME&set-enabled=true"Set which account should be the default for a platform.
# Set default by username
open "statuz://accounts?action=set-default&platform=x&name=johndoe"
# Set default by nickname
NICKNAME=$(printf %s "Work Account" | jq -sRr @uri)
open "statuz://accounts?action=set-default&platform=bluesky&nickname=$NICKNAME"
# Set default by ID
open "statuz://accounts?action=set-default&platform=mastodon&id=account-789"#!/bin/bash
# Add X account
open "statuz://accounts?action=add&platform=x"
# Set nickname for identification
NICKNAME=$(printf %s "Personal Twitter" | jq -sRr @uri)
open "statuz://accounts?action=edit&platform=x&name=myhandle&set-nickname=$NICKNAME"
# Set as default
open "statuz://accounts?action=set-default&platform=x&name=myhandle"#!/bin/bash
# Add BlueSky account
open "statuz://accounts?action=add&platform=bluesky"
# Edit nickname (use full handle)
NICKNAME=$(printf %s "Main Bluesky" | jq -sRr @uri)
open "statuz://accounts?action=edit&platform=bluesky&name=user.bsky.social&set-nickname=$NICKNAME"#!/bin/bash
# Add account on specific instance
open "statuz://accounts?action=add&platform=mastodon&instance=mastodon.social"
# Add another instance
open "statuz://accounts?action=add&platform=mastodon&instance=fosstodon.org"
# Set default Mastodon account
open "statuz://accounts?action=set-default&platform=mastodon&[email protected]"Switch between work and personal accounts:
#!/bin/bash
# switch-work.sh
echo "Switching to work accounts..."
# Set work accounts as default
open "statuz://accounts?action=set-default&platform=x&nickname=Work%20X"
open "statuz://accounts?action=set-default&platform=bluesky&nickname=Work%20BlueSky"
# Disable personal accounts
open "statuz://accounts?action=edit&platform=x&nickname=Personal%20X&set-enabled=false"
open "statuz://accounts?action=edit&platform=bluesky&nickname=Personal%20BlueSky&set-enabled=false"
echo "Work accounts activated!"#!/bin/bash
# switch-personal.sh
echo "Switching to personal accounts..."
# Set personal accounts as default
open "statuz://accounts?action=set-default&platform=x&nickname=Personal%20X"
open "statuz://accounts?action=set-default&platform=bluesky&nickname=Personal%20BlueSky"
# Enable personal accounts
open "statuz://accounts?action=edit&platform=x&nickname=Personal%20X&set-enabled=true"
open "statuz://accounts?action=edit&platform=bluesky&nickname=Personal%20BlueSky&set-enabled=true"
echo "Personal accounts activated!"#!/bin/bash
# cleanup-accounts.sh
# Disable all test accounts
TEST_ACCOUNTS=("test1" "test2" "test3")
for account in "${TEST_ACCOUNTS[@]}"; do
echo "Disabling $account..."
open "statuz://accounts?action=edit&platform=x&name=$account&set-enabled=false"
sleep 0.5
done
echo "Test accounts disabled!"#!/bin/bash
# setup-statuz-accounts.sh
echo "Setting up Statuz accounts..."
# Add all accounts
open "statuz://accounts?action=add&platform=x"
sleep 2
open "statuz://accounts?action=add&platform=bluesky"
sleep 2
open "statuz://accounts?action=add&platform=mastodon&instance=mastodon.social"
sleep 2
# Set nicknames (after OAuth completes)
read -p "Press enter after completing OAuth flows..."
# Configure nicknames
WORK_X=$(printf %s "Work Twitter" | jq -sRr @uri)
open "statuz://accounts?action=edit&platform=x&name=workhandle&set-nickname=$WORK_X"
PERSONAL_BS=$(printf %s "Personal BlueSky" | jq -sRr @uri)
open "statuz://accounts?action=edit&platform=bluesky&name=user.bsky.social&set-nickname=$PERSONAL_BS"
echo "Accounts configured!"You can identify accounts using three methods:
Platform-specific format:
# X
open "statuz://accounts?action=edit&platform=x&name=johndoe&..."
# BlueSky
open "statuz://accounts?action=edit&platform=bluesky&name=user.bsky.social&..."
# Mastodon
open "statuz://accounts?action=edit&platform=mastodon&[email protected]&..."Custom name you've assigned to the account. Must be URL-encoded.
NICKNAME=$(printf %s "My Work Account" | jq -sRr @uri)
open "statuz://accounts?action=edit&platform=x&nickname=$NICKNAME&..."Platform Scoping: Nicknames are scoped per platform. You can use "Work Account" on both X and BlueSky without conflicts.
Internal account identifier. Use the MCP accounts_list tool or Settings to find IDs.
open "statuz://accounts?action=edit&platform=x&id=550e8400-e29b-41d4-a716-446655440000&..."
Common errors and solutions:
❌ Error: "Account not found"
Solutions:
❌ Error: "Invalid platform"
Fix: Use x, bluesky, or mastodon (lowercase)
❌ Error: "Account already connected"
Fix: Use the edit action instead of add
❌ Error: "Invalid Mastodon instance"
Solutions:
Account passwords, tokens, and OAuth credentials are never exposed through the URL scheme:
✅ Can modify:
❌ Cannot modify:
Adding accounts requires OAuth authentication through Statuz's secure UI:
| Platform | Identifier | Features |
|---|---|---|
| X (Twitter) | x | OAuth 1.0, multiple accounts (premium) |
| BlueSky | bluesky | OAuth 2.0, handle-based auth |
| Mastodon | mastodon | OAuth 2.0, custom instances |
#!/usr/bin/env node
// @raycast.schemaVersion 1
// @raycast.title Switch to Work Accounts
// @raycast.mode silent
const { exec } = require('child_process');
const accounts = [
{ platform: 'x', nickname: 'Work Twitter' },
{ platform: 'bluesky', nickname: 'Work BlueSky' }
];
accounts.forEach(({ platform, nickname }) => {
const encoded = encodeURIComponent(nickname);
exec(`open "statuz://accounts?action=set-default&platform=${platform}&nickname=${encoded}"`);
});Set up keywords to switch account contexts:
# Keyword: work-accounts
open "statuz://accounts?action=set-default&platform=x&nickname=Work%20X"
open "statuz://accounts?action=set-default&platform=bluesky&nickname=Work%20BS"
# Keyword: personal-accounts
open "statuz://accounts?action=set-default&platform=x&nickname=Personal%20X"
open "statuz://accounts?action=set-default&platform=bluesky&nickname=Personal%20BS"