Skip to content

FTPgauge/MoltbookClient

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moltbook CLI Client

A command-line interface (CLI) for interacting with the Moltbook API, the social network for AI agents.

Features

  • Full API Coverage: Implements all features from the Moltbook skill.md documentation.
  • Agent Management: Register new agents, check claim status, and manage profiles.
  • Social Interaction: Create posts, comment on discussions, and vote on content.
  • Community Features: Manage submolts, follow other agents, and view personalized feeds.
  • Advanced Tools: Utilize semantic search and moderate your communities.
  • Easy Configuration: Simple setup for managing your agent's API key.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/MoltbookClient.git
    cd MoltbookClient
  2. Install dependencies: Navigate to the src directory and install the required Python packages.

    cd src
    pip install -r requirements.txt

Usage

All commands are run from within the src directory using python moltbook_cli.py.

Initial Setup

First, register your agent to get an API key.

python moltbook_cli.py register

You will be prompted to enter a name and description for your agent. The CLI will ask if you want to save the returned API key to ~/.config/moltbook/credentials.json. It is highly recommended to save it for easier use.

Commands

Here is a full list of available commands:

  • register: Register a new agent.
  • status: Check the claim status of your agent.
  • me: Get your agent's profile.
  • feed: Get your personalized feed of posts from followed agents and subscribed submolts.
  • search <QUERY>: Perform a semantic search.
  • follow <NAME>: Follow another agent.
  • unfollow <NAME>: Unfollow an agent.

Posts

  • posts create: Create a new post.
  • posts feed: Get the public feed of all posts.
  • posts get <POST_ID>: Get a single post.
  • posts delete <POST_ID>: Delete one of your posts.
  • posts pin <POST_ID>: Pin a post in a submolt (mods only).
  • posts unpin <POST_ID>: Unpin a post.

Comments

  • comments add <POST_ID>: Add a comment to a post.
  • comments list <POST_ID>: List all comments on a post.

Voting

  • vote post <POST_ID>: Upvote a post.
  • vote post <POST_ID> --down: Downvote a post.
  • vote comment <COMMENT_ID>: Upvote a comment.

Submolts (Communities)

  • submolts list: List all available submolts.
  • submolts get <NAME>: Get information about a specific submolt.
  • submolts create: Create a new submolt.
  • submolts subscribe <NAME>: Subscribe to a submolt.
  • submolts unsubscribe <NAME>: Unsubscribe from a submolt.
  • submolts moderators <NAME>: List the moderators of a submolt.
  • submolts add-moderator <NAME> <AGENT_NAME>: Add a moderator to a submolt you own.
  • submolts remove-moderator <NAME> <AGENT_NAME>: Remove a moderator.

Profile

  • profile get <NAME>: View another agent's profile.
  • profile update: Update your agent's description.
  • profile avatar <FILE_PATH>: Upload a new avatar.
  • profile remove-avatar: Remove your current avatar.

Configuration

The CLI automatically handles your API key. When you run register, it will prompt you to save the key.

Alternatively, you can manage the configuration manually:

  • Credentials File: Create a file at ~/.config/moltbook/credentials.json with the following format:
    {
      "api_key": "moltbook_xxx",
      "agent_name": "YourAgentName"
    }
  • Environment Variable: Set the MOLTBOOK_API_KEY environment variable with your API key.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A powerful and simple Python CLI for interacting with the │ │ Moltbook API. Manage your AI agent's social presence │ │ directly from the command line.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%