Polis CLI for decentralized social networking. Publish signed posts, discover conversations, comment on posts, manage blessing requests, and view activity status...
AI-powered workflows for decentralized social networking using the polis CLI.
--json flag for structured output parsingThe polis CLI binary is polis (Go CLI). Ensure it is on your PATH or use the full path to the binary.
All commands should use the --json flag for machine-readable output:
polis --json <command> [options]
The following environment variables should be configured:
POLIS_BASE_URL - Your polis site URL (e.g., https://yourdomain.com)DISCOVERY_SERVICE_URL - Discovery service URLDISCOVERY_SERVICE_KEY - API authentication keyTrigger phrases: "publish", "post", "sign and publish", "deploy post"
Read the draft file to understand content and extract title
Suggest/refine title if needed:
Check for existing frontmatter:
republishpostExecute the command:
# For new posts
polis --json post <file>
# For updates to existing posts
polis --json republish <file>
# For inline content (stdin)
echo "<content>" | polis --json post - --filename <name.md> --title "<title>"
Parse and report results:
Offer git commit (don't auto-commit):
Trigger phrases: "discover", "find posts about", "search for", "what's being discussed"
Load following list:
cat metadata/following.json
Fetch local index (your own content):
polis --json index
Fetch followed authors' indexes: For each author in following.json:
curl -s <author-url>/metadata/public.jsonl
Semantic matching:
Present results:
Offer next actions:
metadata/following.json contains author URLs<author-base-url>/metadata/public.jsonlTrigger phrases: "comment on", "reply to", "respond to"
Preview the target post/comment:
polis --json preview <url>
Present content to user:
Gather context for drafting:
Present draft inline for user to edit:
Create the comment:
echo "<approved-content>" | polis --json comment - <url> --filename <reply-name.md>
Report beseech status:
Trigger phrases: "manage blessings", "review blessings", "blessing requests", "pending comments"
Sync and fetch requests:
polis --json blessing sync
polis --json blessing requests
Report auto-blessed comments (FYI):
Walk through pending requests one-at-a-time:
For each pending request:
a. Preview the comment:
polis --json preview <comment_url>
b. Assess quality using these signals (weighted):
c. Present with recommendation:
Request <hash> from <author>
On: <post-url>
Comment: "<excerpt>..."
Signature: VALID/INVALID
AI Recommendation: GRANT/DENY (reasoning)
[Grant] [Deny] [Skip]
d. Execute user's decision:
polis --json blessing grant <hash>
# or
polis --json blessing deny <hash>
e. Move to next request
Deny silently (no rationale sent to commenter - future feature)
Trigger phrases: "status", "polis status", "what's my status", "show activity"
Gather data:
# Your published content
polis --json index
# Pending blessing requests (others wanting your blessing)
polis --json blessing requests
# Git status for uncommitted changes
git status --porcelain 2>/dev/null || true
# Discovery service health
curl -s -o /dev/null -w "%{http_code}" "${DISCOVERY_SERVICE_URL}/health" 2>/dev/null || echo "unreachable"
# Following count
cat metadata/following.json | jq 'length' 2>/dev/null || echo "0"
Parse and present dashboard:
=== Polis Status ===
Published Content:
- X posts (latest: "<title>" - <relative-time>)
- Y comments (latest: reply to <domain> - <relative-time>)
Pending Actions:
- N blessing requests awaiting YOUR review
- M of YOUR comments awaiting blessing from others
- P uncommitted files
Network:
- Following: Q authors
- Discovery service: connected/disconnected
Trigger phrases: "notifications", "pending actions", "what needs attention", "any updates", "check for updates"
Fetch notifications:
# List unread notifications
polis --json notifications
# List all notifications (including read)
polis --json notifications list --all
# Filter by type
polis --json notifications list --type version_available,new_follower
Present categorized notifications:
=== Notifications ===
Updates (1 unread):
- [version_available] CLI v0.35.0 available (you have v0.34.0)
Pending Actions (2 unread):
- [version_pending] Metadata files need update - run 'polis rebuild'
Social (3 unread):
- [new_follower] alice.com started following you
- [new_post] bob.com published "New Article"
- [blessing_changed] Your comment was blessed on charlie.com
Offer actions based on notification type:
version_available - "Upgrade available. Show release notes?"version_pending - "Run polis rebuild --all to update metadata?"new_follower - "Follow them back?"new_post - "Preview this post?"blessing_changed - "View the comment?"Mark notifications as handled:
# Mark specific notification as read
polis --json notifications read <id>
# Mark all as read
polis --json notifications read --all
# Dismiss old notifications
polis --json notifications dismiss --older-than 30d
| Type | Source | Description |
|---|---|---|
version_available |
Discovery service | New CLI version released |
version_pending |
Local detection | CLI upgraded but metadata needs rebuild |
new_follower |
Discovery service | Someone followed you |
new_post |
Discovery service | Followed author published |
blessing_changed |
Discovery service | Your comment was blessed/unblessed |
# Fetch new notifications from discovery service
polis --json notifications sync
# Reset and do full re-sync
polis --json notifications sync --reset
# Show current config
polis --json notifications config
# Set poll interval
polis notifications config --poll-interval 30m
# Enable/disable notification types
polis notifications config --enable new_post
polis notifications config --disable version_available
# Mute specific domains
polis notifications config --mute spam.com
polis notifications config --unmute spam.com
Notifications are stored locally:
.polis/notifications.jsonl - Notification log (one per line).polis/notifications-manifest.json - Preferences and sync stateTrigger phrases: "register", "register site", "make discoverable", "unregister"
Register with discovery service:
polis --json register
Report registration status:
Unregister if requested (destructive - confirm first):
polis --json unregister --force
polis init --register can auto-register during initializationTrigger phrases: "clone", "download site", "fetch site", "mirror"
Clone a remote polis site:
# Clone to auto-named directory
polis --json clone https://alice.com
# Clone to specific directory
polis --json clone https://alice.com ./alice-site
# Force full re-download
polis --json clone https://alice.com --full
# Only fetch changes (incremental)
polis --json clone https://alice.com --diff
Report what was downloaded:
Trigger phrases: "about", "site info", "show config", "what's my setup"
Get comprehensive site info:
polis --json about
Present dashboard:
=== Site ===
URL: https://yoursite.com
Title: Your Site Name
=== Versions ===
CLI: 0.34.0
Manifest: 0.34.0
=== Keys ===
Status: configured
Fingerprint: SHA256:abc123...
=== Discovery ===
Service: https://discovery.polis.pub
Registered: yes
polis config commandTrigger phrases: "dm", "message", "send a message", "direct message", "read messages"
List conversations:
polis --json dm list
Present conversation list:
Read a conversation when user picks one:
polis --json dm read <conversation_id>
Send a message when requested:
polis --json dm send <recipient_url> "<message>"
Retry failed deliveries:
# Retry all unsent
polis --json dm retry
# Retry specific conversation
polis --json dm retry <conversation_id>
Show DM acceptance policy:
polis --json dm config
POLIS_BASE_URL to be set for sending.polis/policies/rules.jsonlTrigger phrases: "tag", "label", "categorize", "tag this post", "show tags"
List all tags:
polis --json tag list
Show targets for a specific tag:
polis --json tag show <name>
Apply a tag to content:
polis --json tag apply <name> <target-uri>
Remove a target from a tag:
polis --json tag remove <name> <target-uri>
Delete an entire tag:
polis --json tag delete <name>
pub.polis.tagWhen commands fail, parse the JSON error response:
{
"status": "error",
"command": "...",
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message"
}
}
Common error codes and responses:
FILE_NOT_FOUND - Help user locate the correct fileINVALID_INPUT - Explain required formatAPI_ERROR - Check network/discovery service statusSIGNATURE_ERROR - Report verification failureINVALID_STATE - Guide user (e.g., run polis init first)For detailed command syntax and JSON response schemas, see: