{"id":23938091,"url":"https://github.com/plebbit/plebbit-cli","last_synced_at":"2025-12-26T14:28:33.416Z","repository":{"id":60992937,"uuid":"533804150","full_name":"plebbit/plebbit-cli","owner":"plebbit","description":"An interface to Plebbit API through command line","archived":false,"fork":false,"pushed_at":"2025-01-01T09:04:08.000Z","size":5367,"stargazers_count":16,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T11:17:29.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plebbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-07T14:32:33.000Z","updated_at":"2025-03-23T12:14:54.000Z","dependencies_parsed_at":"2023-11-24T13:27:55.872Z","dependency_job_id":"b36e1283-bfc2-4feb-9575-12ad0c5ceab0","html_url":"https://github.com/plebbit/plebbit-cli","commit_stats":null,"previous_names":[],"tags_count":124,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebbit%2Fplebbit-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebbit%2Fplebbit-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebbit%2Fplebbit-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plebbit%2Fplebbit-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plebbit","download_url":"https://codeload.github.com/plebbit/plebbit-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248557848,"owners_count":21124168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-06T02:18:36.708Z","updated_at":"2025-12-26T14:28:33.407Z","avatar_url":"https://github.com/plebbit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n\n\u003cimg src=\"https://raw.githubusercontent.com/plebbit/assets/master/letters-grey.svg\" width=\"260\" height=\"73\"\u003e\n\n# plebbit-cli: A Plebbit Node with WebSocket and Command Line Interface\n\n# Table of contents\n\n-   [What is Plebbit?](#what-is-plebbit)\n-   [What is plebbit-cli?](#what-is-plebbit-cli)\n-   [Install](#install)\n-   [Usage](#usage)\n-   [Commands](#commands)\n-   [Contribution](#contribution)\n-   [Feedback](#feedback)\n\n# What is Plebbit?\n\nPlebbit is serverless, admin-less, decentralized Reddit alternative built completely with IPFS/IPNS/pubsub/ENS. It doesn't use any central server, central database, public HTTP endpoint or DNS, it is pure peer to peer (except for the web client that can't join a P2P swarm directly, web clients use interchangeable HTTP providers). It will allow subplebbit (subreddit) owners to retain full ownership over their community. Whitepaper [here](https://github.com/plebbit/whitepaper/discussions/2)\n\n# What is plebbit-cli?\n\n`plebbit-cli` is an interface to the backend of Plebbit using [plebbit-js](https://github.com/plebbit/plebbit-js). Users can run and manage their subplebbits using it. It is written in Typescript and designed to receive commands via CLI and WebSocket.\n\n-   Runs an IPFS and Plebbit node\n-   Command Line interface Interface to IPFS-Nodes\n-   WebSocket RPC to access and control your subplebbits and publications\n\n# Install\n\n## For Linux/MacOS\n\n```sh-session\ncurl https://raw.githubusercontent.com/plebbit/plebbit-cli/master/bin/install.sh | sh\n```\n\n### If you want to install a specific plebbit-cli version\n\n```sh-session\ncurl https://raw.githubusercontent.com/plebbit/plebbit-cli/master/bin/install.sh | sh -s 0.14.4\n```\n\nIf you get `libfontconfig dependency error`, then you need to install libfontconfig by running `sudo apt install -y libfontconfig1 fontconfig libfontconfig1-dev libfontconfig`\n\n## For Windows\n\nFor Windows, You need to install [vc-redist](https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170) first. After you install `vc-redist`, download the installer of [plebbit](https://github.com/plebbit/plebbit-cli/releases/latest/download/plebbit_installer_win32_x64.exe) and next your way to the end\n\n## Build your Plebbit executable manually (optional)\n\nIn case the installation script is not working for you or you just want to build the source code directly. First, Yyu need to have `NodeJS 20`, `npm` and `yarn` installed\n\n```\ngit clone https://github.com/plebbit/plebbit-cli\ncd plebbit-cli\nyarn install --frozen-lockfile\nyarn build\nyarn oclif manifest\nyarn ci:download-web-uis\n./bin/run --help\n```\n\nAfter running the last command you should be able to run commands directly against `./bin/run`, for example `./bin/run daemon`\n\n# Usage\n\n## The data/config directory of Plebbit\n\nThis is the default directory where plebbit-cli will keep its config, as well as data for local subplebbits:\n\n-   macOS: ~/Library/Application Support/plebbit\n-   Windows: %LOCALAPPDATA%\\plebbit\n-   Linux: ~/.local/share/plebbit\n\n## The logs directory of Plebbit\n\nPlebbit-cli will keep logs in this directory, with a cap of 10M per log file.\n\n-   macOS: ~/Library/Logs/plebbit\n-   Windows: %LOCALAPPDATA%\\plebbit\\Log\n-   Linux: ~/.local/state/plebbit\n\n## Running Daemon\n\nIn Bash (or powershell if you're on Windows), run `plebbit daemon` to able to connect to the network. You need to have the `plebbit daemon` terminal running to be able to execute other commands.\n\n```sh-session\n$ plebbit daemon\nIPFS API listening on: http://localhost:5001/api/v0\nIPFS Gateway listening on: http://localhost:6473\nplebbit rpc: listening on ws://localhost:9138 (local connections only)\nplebbit rpc: listening on ws://localhost:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL (secret auth key for remote connections)\nPlebbit data path: /root/.local/share/plebbit\nSubplebbits in data path:  [ 'pleblore.eth' ]\nWebUI (plebones): http://localhost:9138/plebones (local connections only)\nWebUI (plebones): http://192.168.1.60:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/plebones (secret auth key for remote connections)\nWebUI (seedit): http://localhost:9138/seedit (local connections only)\nWebUI (seedit): http://192.168.1.60:9138/MHA1tm2QWG19z0bnkRarDNWIajDobl7iN2eM2PmL/seedit (secret auth key for remote connections)\n\n```\n\nOnce `plebbit daemon` is running, you can create and manage your subplebbits through the web interfaces, either seedit or plebones. If you're a power user and prefer CLI, then you can take a look at the commands below.\n### Creating your first sub\n\n```sh-session\n$ plebbit subplebbit create --title \"Hello Plebs!\" --description \"This is gonna be great\"\n12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu\n```\n\n### Listing all your subs\n\n```sh-session\n$ plebbit subplebbit list\nAddress                                              Started\n ──────────────────────────────────────────────────── ───────\n 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu true\n business-and-finance.eth                             true\n censorship-watch.eth                                 true\n health-nutrition-science.eth                         true\n movies-tv-anime.eth                                  true\n pleblore.eth                                         true\n politically-incorrect.eth                            true\n reddit-screenshots.eth                               false\n videos-livestreams-podcasts.eth                      false\n```\n\n### Adding a role moderator to your sub\n\n```sh-session\n$ plebbit subplebbit edit mysub.eth '--roles[\"author-address.eth\"].role' moderator\n```\n\n### Adding a role owner to your sub\n\n```sh-session\n$ plebbit subplebbit edit mysub.eth '--roles[\"author-address.eth\"].role' owner\n```\n\n### Adding a role admin to your sub\n\n```sh-session\n$ plebbit subplebbit edit mysub.eth '--roles[\"author-address.eth\"].role' admin\n```\n\n### Removing a role\n\n```sh-session\n$ plebbit subplebbit edit mysub.eth '--roles[\"author-address.eth\"]' null\n```\n\n# Commands\n\n\u003c!-- commands --\u003e\n* [`plebbit daemon`](#plebbit-daemon)\n* [`plebbit help [COMMAND]`](#plebbit-help-command)\n* [`plebbit subplebbit create`](#plebbit-subplebbit-create)\n* [`plebbit subplebbit edit ADDRESS`](#plebbit-subplebbit-edit-address)\n* [`plebbit subplebbit get ADDRESS`](#plebbit-subplebbit-get-address)\n* [`plebbit subplebbit list`](#plebbit-subplebbit-list)\n* [`plebbit subplebbit start ADDRESSES`](#plebbit-subplebbit-start-addresses)\n* [`plebbit subplebbit stop ADDRESSES`](#plebbit-subplebbit-stop-addresses)\n\n## `plebbit daemon`\n\nRun a network-connected Plebbit node. Once the daemon is running you can create and start your subplebbits and receive publications from users. The daemon will also serve web ui on http that can be accessed through a browser on any machine. Within the web ui users are able to browse, create and manage their subs fully P2P.\n\n```\nUSAGE\n  $ plebbit daemon --plebbitRpcUrl \u003cvalue\u003e --logPath \u003cvalue\u003e\n\nFLAGS\n  --logPath=\u003cvalue\u003e        (required) [default: /home/runner/.local/state/plebbit] Specify a directory which will be\n                           used to store logs\n  --plebbitRpcUrl=\u003cvalue\u003e  (required) [default: ws://localhost:9138/] Specify Plebbit RPC URL to listen on\n\nDESCRIPTION\n  Run a network-connected Plebbit node. Once the daemon is running you can create and start your subplebbits and receive\n  publications from users. The daemon will also serve web ui on http that can be accessed through a browser on any\n  machine. Within the web ui users are able to browse, create and manage their subs fully P2P.\n  Options can be passed to the RPC's instance through flag --plebbitOptions.optionName. For a list of plebbit options\n  (https://github.com/plebbit/plebbit-js?tab=readme-ov-file#plebbitoptions)\n  If you need to modify ipfs config, you should head to {plebbit-data-path}/.ipfs-plebbit-cli/config and modify the\n  config file\n\n\nEXAMPLES\n  $ plebbit daemon\n\n  $ plebbit daemon --plebbitRpcUrl ws://localhost:53812\n\n  $ plebbit daemon --plebbitOptions.dataPath /tmp/plebbit-datapath/\n\n  $ plebbit daemon --plebbitOptions.chainProviders.eth[0].url https://ethrpc.com\n\n  $ plebbit daemon --plebbitOptions.kuboRpcClientsOptions[0] https://remoteipfsnode.com\n```\n\n_See code: [src/cli/commands/daemon.ts](https://github.com/plebbit/plebbit-cli/blob/v0.17.10/src/cli/commands/daemon.ts)_\n\n## `plebbit help [COMMAND]`\n\nDisplay help for plebbit.\n\n```\nUSAGE\n  $ plebbit help [COMMAND...] [-n]\n\nARGUMENTS\n  [COMMAND...]  Command to show help for.\n\nFLAGS\n  -n, --nested-commands  Include all nested commands in the output.\n\nDESCRIPTION\n  Display help for plebbit.\n```\n\n_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.36/src/cli/commands/help.ts)_\n\n## `plebbit subplebbit create`\n\nCreate a subplebbit with specific properties. A newly created sub will be started after creation and be able to receive publications. For a list of properties, visit https://github.com/plebbit/plebbit-js#subplebbiteditsubplebbiteditoptions\n\n```\nUSAGE\n  $ plebbit subplebbit create --plebbitRpcUrl \u003cvalue\u003e [--privateKeyPath \u003cvalue\u003e]\n\nFLAGS\n  --plebbitRpcUrl=\u003cvalue\u003e   (required) [default: ws://localhost:9138/] URL to Plebbit RPC\n  --privateKeyPath=\u003cvalue\u003e  Private key (PEM) of the subplebbit signer that will be used to determine address (if\n                            address is not a domain). If it's not provided then Plebbit will generate a private key\n\nDESCRIPTION\n  Create a subplebbit with specific properties. A newly created sub will be started after creation and be able to\n  receive publications. For a list of properties, visit\n  https://github.com/plebbit/plebbit-js#subplebbiteditsubplebbiteditoptions\n\nEXAMPLES\n  Create a subplebbit with title 'Hello Plebs' and description 'Welcome'\n\n    $ plebbit subplebbit create --title 'Hello Plebs' --description 'Welcome'\n```\n\n_See code: [src/cli/commands/subplebbit/create.ts](https://github.com/plebbit/plebbit-cli/blob/v0.17.10/src/cli/commands/subplebbit/create.ts)_\n\n## `plebbit subplebbit edit ADDRESS`\n\nEdit a subplebbit properties. For a list of properties, visit https://github.com/plebbit/plebbit-js#subplebbiteditsubplebbiteditoptions\n\n```\nUSAGE\n  $ plebbit subplebbit edit ADDRESS --plebbitRpcUrl \u003cvalue\u003e\n\nARGUMENTS\n  ADDRESS  Address of the subplebbit address to edit\n\nFLAGS\n  --plebbitRpcUrl=\u003cvalue\u003e  (required) [default: ws://localhost:9138/] URL to Plebbit RPC\n\nDESCRIPTION\n  Edit a subplebbit properties. For a list of properties, visit\n  https://github.com/plebbit/plebbit-js#subplebbiteditsubplebbiteditoptions\n\nEXAMPLES\n  Change the address of the sub to a new ENS address\n\n    $ plebbit subplebbit edit 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu --address newAddress.eth\n\n  Add the author address 'esteban.eth' as an admin on the sub\n\n    $ plebbit subplebbit edit mysub.eth '--roles[\"esteban.eth\"].role' admin\n\n  Add two challenges to the sub. The first challenge will be a question and answer, and the second will be an image\n  captcha\n\n    $ plebbit subplebbit edit mysub.eth --settings.challenges[0].name question \\\n      --settings.challenges[0].options.question \"what is the password?\" --settings.challenges[0].options.answer \\\n      thepassword --settings.challenges[1].name captcha-canvas-v3\n\n  Change the title and description\n\n    $ plebbit subplebbit edit mysub.eth --title \"This is the new title\" --description \"This is the new description\"\n\n  Remove a role from a moderator/admin/owner\n\n    $ plebbit subplebbit edit plebbit.eth --roles['rinse12.eth'] null\n\n  Enable settings.fetchThumbnailUrls to fetch the thumbnail of url submitted by authors\n\n    subplebbit edit plebbit.eth --settings.fetchThumbnailUrls\n\n  disable settings.fetchThumbnailUrls\n\n    subplebbit edit plebbit.eth --settings.fetchThumbnailUrls=false\n```\n\n_See code: [src/cli/commands/subplebbit/edit.ts](https://github.com/plebbit/plebbit-cli/blob/v0.17.10/src/cli/commands/subplebbit/edit.ts)_\n\n## `plebbit subplebbit get ADDRESS`\n\nFetch a local or remote subplebbit, and print its json in the terminal\n\n```\nUSAGE\n  $ plebbit subplebbit get ADDRESS --plebbitRpcUrl \u003cvalue\u003e\n\nARGUMENTS\n  ADDRESS  Address of the subplebbit address to fetch\n\nFLAGS\n  --plebbitRpcUrl=\u003cvalue\u003e  (required) [default: ws://localhost:9138/] URL to Plebbit RPC\n\nDESCRIPTION\n  Fetch a local or remote subplebbit, and print its json in the terminal\n\nEXAMPLES\n  $ plebbit subplebbit get plebmusic.eth\n\n  $ plebbit subplebbit get 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu\n```\n\n_See code: [src/cli/commands/subplebbit/get.ts](https://github.com/plebbit/plebbit-cli/blob/v0.17.10/src/cli/commands/subplebbit/get.ts)_\n\n## `plebbit subplebbit list`\n\nList your subplebbits\n\n```\nUSAGE\n  $ plebbit subplebbit list --plebbitRpcUrl \u003cvalue\u003e [-q]\n\nFLAGS\n  -q, --quiet                  Only display subplebbit addresses\n      --plebbitRpcUrl=\u003cvalue\u003e  (required) [default: ws://localhost:9138/] URL to Plebbit RPC\n\nDESCRIPTION\n  List your subplebbits\n\nEXAMPLES\n  $ plebbit subplebbit list -q\n\n  $ plebbit subplebbit list\n```\n\n_See code: [src/cli/commands/subplebbit/list.ts](https://github.com/plebbit/plebbit-cli/blob/v0.17.10/src/cli/commands/subplebbit/list.ts)_\n\n## `plebbit subplebbit start ADDRESSES`\n\nStart a subplebbit\n\n```\nUSAGE\n  $ plebbit subplebbit start ADDRESSES... --plebbitRpcUrl \u003cvalue\u003e\n\nARGUMENTS\n  ADDRESSES...  Addresses of subplebbits to start. Separated by space\n\nFLAGS\n  --plebbitRpcUrl=\u003cvalue\u003e  (required) [default: ws://localhost:9138/] URL to Plebbit RPC\n\nDESCRIPTION\n  Start a subplebbit\n\nEXAMPLES\n  $ plebbit subplebbit start plebbit.eth\n\n  $ plebbit subplebbit start 12D3KooWG3XbzoVyAE6Y9vHZKF64Yuuu4TjdgQKedk14iYmTEPWu\n```\n\n_See code: [src/cli/commands/subplebbit/start.ts](https://github.com/plebbit/plebbit-cli/blob/v0.17.10/src/cli/commands/subplebbit/start.ts)_\n\n## `plebbit subplebbit stop ADDRESSES`\n\nStop a subplebbit. The subplebbit will not publish or receive any publications until it is started again.\n\n```\nUSAGE\n  $ plebbit subplebbit stop ADDRESSES... --plebbitRpcUrl \u003cvalue\u003e\n\nARGUMENTS\n  ADDRESSES...  Addresses of subplebbits to stop. Separated by space\n\nFLAGS\n  --plebbitRpcUrl=\u003cvalue\u003e  (required) [default: ws://localhost:9138/] URL to Plebbit RPC\n\nDESCRIPTION\n  Stop a subplebbit. The subplebbit will not publish or receive any publications until it is started again.\n\nEXAMPLES\n  $ plebbit subplebbit stop plebbit.eth\n\n  $ plebbit subplebbit stop Qmb99crTbSUfKXamXwZBe829Vf6w5w5TktPkb6WstC9RFW\n```\n\n_See code: [src/cli/commands/subplebbit/stop.ts](https://github.com/plebbit/plebbit-cli/blob/v0.17.10/src/cli/commands/subplebbit/stop.ts)_\n\u003c!-- commandsstop --\u003e\n\n# Contribution\n\nWe're always happy to receive pull requests. Few things to keep in mind:\n\n-   This repo follows [Angular commit conventions](https://github.com/angular/angular/blob/main/CONTRIBUTING.md). Easiest way to follow these conventions is by using `yarn commit` instead of `git commit`\n-   If you're adding a feature, make sure to add tests to your pull requests\n\n# Feedback\n\nWe would love your feedback on our [Telegram](https://t.me/plebbit)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplebbit%2Fplebbit-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplebbit%2Fplebbit-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplebbit%2Fplebbit-cli/lists"}