Skip to content

Robj1925/skool-pp-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Skool Community CLI (skool-pp-cli)

A high-performance command-line interface for Skool community owners and power users. This tool allows you to bypass the browser for community management, perform deep domain analytics, and gain behavioral insights into your members.

Skool Community CLI Logo

πŸš€ Key Features

  • Full Data Sync: Synchronize your entire community (members, posts, classroom content, etc.) to a local SQLite database.
  • Domain Analytics (Rung 4): Identify "orphaned" members (joined but never posted), stale members, and top contributors based on points and activity.
  • Behavioral Insights (Rung 5): Predictive modeling for churn risk and member growth velocity to proactively manage your community.
  • Direct Messaging: List conversations and send direct messages directly from the terminal.
  • Content Management: Create, manage, and delete posts across your communities programmatically.
  • Cloudflare Optimized: Built-in support for HTTP/2 and modern browser headers to ensure reliable API connectivity.

πŸ›  Installation

From Source (Recommended)

Ensure you have Go installed (v1.21+) and Node.js.

  1. Clone the repository:

    git clone https://github.com/Robj1925/skool-pp-cli.git
    cd skool-pp-cli
  2. Build the binary:

    go build -o skool-pp-cli ./cmd/skool-pp-cli
  3. (Optional) Move it to your path:

    sudo mv skool-pp-cli /usr/local/bin/

πŸ€– Instructions for AI Agents

If you are an AI Agent (e.g., Claude Code, Codex, Antigravity) instructed to "install this CLI tool", follow these exact steps:

  1. Install Dependencies: If go or npm are missing, install them first.
    • On macOS:
      • If brew is not installed, install it first: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
      • Then run: brew install go node
    • On Linux (Debian/Ubuntu): sudo apt-get update && sudo apt-get install -y golang nodejs npm
    • If you cannot install them, explicitly ask the human to install Go (v1.21+) and Node.js.
  2. Clone and Build: Run the following one-liner to clone, install dependencies, and build the binary in the current directory:
    git clone https://github.com/Robj1925/skool-pp-cli.git && cd skool-pp-cli && npm install && npx playwright install chromium && go build -o skool-pp-cli ./cmd/skool-pp-cli
  3. Handle Authentication (CRITICAL): Do not attempt browser automation. Use one of these two methods, preferring HAR import:
    • Method A: HAR Import (Most Reliable - RECOMMENDED)
      • Instruct the human to go to DevTools -> Network. Chrome only: Click Gear Icon -> Check "Allow to generate HAR with sensitive data".
      • CRITICAL: Refresh the page, then export the HAR (choose "with sensitive data" in Chrome).
      • Run ./skool-pp-cli auth import-har path/to/export.har.
    • Method B: Manual Cookie (Fallback)
      • Instruct the human user to open their browser, log in to Skool, and open Developer Tools (Network tab).
      • Tell them to copy the cookie: header from any request (like members.json).
      • Instruct them to run ./skool-pp-cli auth set-token "YOUR_COOKIE_STRING".
  4. Verify: Once the session token is saved, run ./skool-pp-cli doctor --agent to verify connectivity.

πŸ”‘ Setup & Authentication

Skool uses session-based authentication. The CLI provides tools to capture and manage your credentials securely.

1. HAR Import (Recommended)

This is the most reliable way to authenticate. Export a HAR file from your browser and import it:

  1. Open skool.com in your browser and log in.
  2. Open DevTools (F12) -> Network tab.
  3. Chrome Users (IMPORTANT):
    • Click the Gear Icon (Settings) in the top-right of the Network tab.
    • Ensure "Allow to generate HAR with sensitive data" is checked.
  4. CRITICAL: Refresh the page while the Network tab is open.
  5. Click on any group or community to ensure traffic is recorded.
  6. Export the file:
    • Chrome: Click the Download icon (Export HAR) and choose "Export HAR (with sensitive data)".
    • Others: Right-click any request and select "Save all as HAR with content".
  7. Run: skool-pp-cli auth import-har path/to/export.har

2. Manual Cookie (Fallback)

If you prefer to copy the cookie string manually:

  1. Run skool-pp-cli auth refresh for detailed instructions on finding your session cookie.
  2. Once copied, run:
    skool-pp-cli auth set-token "YOUR_COOKIE_STRING"

3. Verify Connection

Run the "doctor" command to ensure everything is working:

skool-pp-cli doctor

πŸ“– Basic Workflow

πŸ‘€ Identity & Communities

Quickly see which communities you belong to and your user profile:

  1. List your groups:

    skool-pp-cli me groups

    This returns the Name, Hash (ID), and Slug for all your joined communities.

  2. View your profile:

    skool-pp-cli me info

πŸ“ Creating Content

To create a post, you first need to find the correct group and category:

  1. Find the target group hash:

    skool-pp-cli me groups
  2. List available categories for that group:

    skool-pp-cli posts list-categories --group <hash>
  3. Create the post:

    skool-pp-cli posts create <hash> --category <category-id> --title "My Title" --content "Body"
  4. Delete a post: Use the custom python helper script:

    python3 scripts/delete_post.py <post-id>

πŸ’¬ Direct Messaging

You can now list your conversations and send messages directly from the CLI:

  1. List your chat history:

    skool-pp-cli channels list

    This will output a list of your recent conversations with their unique channel_id.

  2. Send a message:

    skool-pp-cli channels send <CHANNEL_ID> --content "Hello from the CLI!"

1. Synchronize Data

Before running analytics, you need a local copy of your data:

skool-pp-cli sync

This will create a SQLite database at ~/.config/skool-pp-cli/skool.db.

2. Run Domain Analytics (Rung 4)

Find "orphaned" members who joined but haven't contributed yet:

skool-pp-cli analytics-domain orphans

Find "stale" members who haven't been active in 30 days:

skool-pp-cli analytics-domain stale --days 30

3. Get Behavioral Insights (Rung 5)

Predict which members are at risk of churning:

skool-pp-cli insights churn-risk

Identify members who are leveling up at high velocity:

skool-pp-cli insights level-velocity

πŸ–₯️ Command Reference

Command Description
posts create Create a new post in a group.
sync Fetches all community data and stores it locally.
analytics-domain Advanced reports on member status and engagement.
insights Predictive behavioral analytics (Churn, Velocity, Health).
auth set-token Configures your session cookie manually.
auth import-har Extract session cookies from a browser HAR export.
channels List chat conversations and send direct messages.
me List your joined communities and user profile.
groups Access group-specific analytics and management metrics.
doctor Connectivity, auth, and local database health check.
search Instant full-text search across your local community data.

✍️ Writing Content

You can create posts in any group where you have permission. You need the group's unique hash (found in the URL or via skool-pp-cli me groups).

# Create a post (defaults to 'General discussion' category)
skool-pp-cli posts create <group-hash> \
  --title "My New Post" \
  --content "This is the body of the post. Supports markdown!"

# Create a post in a specific category
skool-pp-cli posts create <group-hash> \
  --title "Q&A" \
  --content "Ask me anything!" \
  --category-id <category-id>

Note: The Skool API requires a category ID for every post. If --category-id is omitted, the CLI defaults to the "General discussion" category.


❓ Troubleshooting

"No such table: members" This usually means you haven't run skool-pp-cli sync yet, or the sync failed. Run skool-pp-cli sync and check for errors.

"Cloudflare / HTTP 403" If you are getting blocked, ensure you are using the latest version of the CLI. We've implemented HTTP/2 support to align with Skool's production environment.

"Missing config file" The CLI expects a config file at ~/.config/skool-pp-cli/config.toml. Running skool-pp-cli auth set-token or auth import-har will create this for you automatically.


πŸ“œ License

Licensed under Apache-2.0. See LICENSE for details.

Developed with ❀️ for the Skool Community.

About

A high-performance CLI for Skool community owners. Sync data, run deep domain analytics, predict churn, and publish content directly from the terminal.

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages