This document provides a comprehensive checklist for renaming the plebbit-cli codebase:
- plebbit-cli → bitsocial-cli
- plebbit (command) → bitsocial (command)
- subplebbit → community
Note: plebbit-js has been rebranded to pkc-js (@pkcprotocol/pkc-js). All imports, class names, and API calls have been updated (PKC, createCommunity, getCommunity, etc.).
- Total "plebbit" occurrences: ~739 across 38 files
- Total "subplebbit" occurrences: ~187 across 26 files
- Source files: 14 TypeScript files in src/
- Test files: 9 test files
- CI/Build files: 3 files in ci-bin/
- package.json - Rename package
- Line 2:
"name": "plebbit-cli"→"name": "bitsocial-cli" - Line 4:
"description": "Command line interface to Plebbit API"→"description": "Command line interface to BitSocial API" - Line 6:
"homepage": "https://github.com/plebbit/plebbit-cli"→"homepage": "https://github.com/bitsocialhq/bitsocial-cli" - Line 7:
"repository": "git@github.com:plebbit/plebbit-cli.git"→"repository": "git@github.com:bitsocialhq/bitsocial-cli.git" - Line 41:
"plebbit": "./bin/run"→"bitsocial": "./bin/run"
- Line 2:
- package.json oclif section
- Line 45:
"bin": "plebbit"→"bin": "bitsocial" - Line 46:
"dirname": "plebbit"→"dirname": "bitsocial" - Lines 54-59: Update topics (remove
subplebbit:roletopic as it has no commands)"topics": { "community": { "description": "Access and manage your communities" } }
- Line 45:
- package.json dependencies - SKIPPED (plebbit-js not yet rebranded)
"@plebbit/plebbit-js": "..."remains unchanged
- oclif.manifest.json - This file is auto-generated by
oclif manifestcommand- Regenerated after source code changes
-
src/cli/commands/subplebbit/→src/cli/commands/community/
- Test files remain in
test/cli/but have been renamed (see Phase 9)
- Default data path:
.plebbit→.bitsocial(handled via env-paths) - IPFS directory:
.ipfs-plebbit-cli→.ipfs-bitsocial-cli - Note: Automatic migration skipped (Phase 13)
- .gitignore Line 110-111:
# Plebbit data directory→# BitSocial data directory.plebbit/→.bitsocial/(also kept .plebbit/ for compatibility)
-
src/cli/commands/subplebbit/create.ts→src/cli/commands/community/create.ts -
src/cli/commands/subplebbit/edit.ts→src/cli/commands/community/edit.ts -
src/cli/commands/subplebbit/get.ts→src/cli/commands/community/get.ts -
src/cli/commands/subplebbit/list.ts→src/cli/commands/community/list.ts -
src/cli/commands/subplebbit/start.ts→src/cli/commands/community/start.ts -
src/cli/commands/subplebbit/stop.ts→src/cli/commands/community/stop.ts
-
src/cli/types.ts- SKIPPED (plebbit-js types unchanged)
-
test/types/subplebbitTypes.ts→test/types/communityTypes.ts
-
test/fixtures/subplebbitForEditFixture.ts→test/fixtures/communityForEditFixture.ts
- SKIPPED - plebbit-js types remain unchanged
- SKIPPED - plebbit-js imports remain unchanged
- Method
_connectToPlebbitRpc()remains unchanged (plebbit-js API)
- File renamed but plebbit-js type references remain unchanged
Old command structure:
plebbit daemon
plebbit subplebbit create
plebbit subplebbit edit
plebbit subplebbit get
plebbit subplebbit list
plebbit subplebbit start
plebbit subplebbit stop
New command structure:
bitsocial daemon
bitsocial community create
bitsocial community edit
bitsocial community get
bitsocial community list
bitsocial community start
bitsocial community stop
src/cli/commands/daemon.ts:
- Update description:
"Run a network-connected Plebbit node..."→"Run a network-connected BitSocial node..." - Update examples:
"plebbit daemon"→"bitsocial daemon" - Update config path reference:
.ipfs-plebbit-cli/config→.ipfs-bitsocial-cli/config - Update output:
"Subplebbits in data path"→"Communities in data path" - Update output:
"Plebbit data path"→"BitSocial data path"
src/cli/commands/community/create.ts:
- Update description:
"Create a subplebbit..."→"Create a community..." - Update examples
- Update logger namespace:
"plebbit-cli:commands:subplebbit:create"→"bitsocial-cli:commands:community:create"
src/cli/commands/community/edit.ts:
- Update description:
"Edit a subplebbit..."→"Edit a community..." - Update examples
- Update logger namespace
src/cli/commands/community/get.ts:
- Update description and examples
- Update logger namespace
src/cli/commands/community/list.ts:
- Update description and examples
- Update logger namespace
src/cli/commands/community/start.ts:
- Update description:
"Start a subplebbit..."→"Start a community..." - Update examples
- Update logger namespace
src/cli/commands/community/stop.ts:
- Update description:
"Stop a subplebbit..."→"Stop a community..." - Update examples
- Update logger namespace
src/cli/hooks/prerun/parse-dynamic-flags-hook.ts:
- Update command IDs:
"subplebbit:edit"→"community:edit""subplebbit:create"→"community:create"
src/cli/commands/daemon.ts:
- Update log file prefix check:
"plebbit_cli_daemon"→"bitsocial_cli_daemon" - Update log file naming
-
envPaths("plebbit", ...)→envPaths("bitsocial", ...) - Note: Variable names like
PLEBBIT_DATA_PATHkept for now (internal only)
-
.ipfs-plebbit-cli→.ipfs-bitsocial-cli
-
src/ipfs/startIpfs.ts:.plebbit-cli.ipfs→.bitsocial-cli.ipfs
- All logger namespaces updated:
| Old Namespace | New Namespace |
|---|---|
plebbit-cli:daemon |
bitsocial-cli:daemon |
plebbit-cli:daemon:startDaemonServer |
bitsocial-cli:daemon:startDaemonServer |
plebbit-cli:commands:subplebbit:create |
bitsocial-cli:commands:community:create |
plebbit-cli:commands:subplebbit:edit |
bitsocial-cli:commands:community:edit |
plebbit-cli:commands:subplebbit:list |
bitsocial-cli:commands:community:list |
plebbit-cli:commands:subplebbit:start |
bitsocial-cli:commands:community:start |
plebbit-cli:commands:subplebbit:stop |
bitsocial-cli:commands:community:stop |
plebbit-cli:ipfs:startKuboNode |
bitsocial-cli:ipfs:startKuboNode |
-
.vscode/launch.json:"DEBUG": "plebbit*"→"DEBUG": "bitsocial*, plebbit*" -
src/cli/commands/daemon.ts: Default debug namespace updated to includebitsocial*
- Tarball naming:
plebbit_*.tar.gz→bitsocial_*.tar.gz - GitHub URLs:
github.com/plebbit/plebbit-cli→github.com/bitsocialhq/bitsocial-cli - Install directory:
$HOME/.plebbit_install_files→$HOME/.bitsocial_install_files - Binary paths and symlinks updated
- User-facing messages updated
-
test/cli/create.subplebbit.test.ts→test/cli/create.community.test.ts -
test/cli/edit.subplebbit.test.ts→test/cli/edit.community.test.ts -
test/cli/get.subplebbit.test.ts→test/cli/get.community.test.ts -
test/cli/list.subplebbit.test.ts→test/cli/list.community.test.ts -
test/cli/start.subplebbit.test.ts→test/cli/start.community.test.ts -
test/cli/stop.subplebbit.test.ts→test/cli/stop.community.test.ts
- Command references updated:
plebbit subplebbit create→bitsocial community create - Import paths updated to new file locations
- Describe blocks updated
-
test/fixtures/sub_0_private_key.pem→test/fixtures/community_0_private_key.pem -
test/fixtures/sub_1_private_key.pem→test/fixtures/community_1_private_key.pem - Fixture path references updated in test files
-
test/cli/daemon.test.ts- Updated describe blocks and comments
- Project title:
plebbit-cli→bitsocial-cli - All command examples:
plebbit→bitsocial - All
subplebbitreferences →community - Installation instructions updated
- GitHub URLs updated
- Data path examples updated
- Commands section (auto-generated, will update with
npm run generate:readme)
ci-bin/rename-tarballs-installers.ts:
- Tarball naming:
plebbit_→bitsocial_ - Installer naming:
plebbit_installer_→bitsocial_installer_
ci-bin/run-daemon-before-release.ts:
- Logger namespaces updated
- Function name:
spawnPlebbitProcess→spawnBitsocialProcess - Variable names updated
- Commands updated:
subplebbit→community - Wait pattern:
"Subplebbits in data path"→"Communities in data path"
CI.yml:
- Job name:
test-plebbit-cli:→test-bitsocial-cli: - Debug env:
DEBUG="plebbit*"→DEBUG="bitsocial*, plebbit*"
- SKIPPED - plebbit-js not yet rebranded
@plebbit/plebbit-jsremains unchanged@plebbit/plebbit-loggerremains unchanged (imported via plebbit-js)
- Logger namespace updated
- plebbit-js imports remain unchanged
- Log message:
"Applied plebbit CLI defaults..."→"Applied bitsocial CLI defaults..." - Logger namespace updated
- SKIPPED - Migration code not added per user request
- Note: Users with existing
.plebbitdirectories will need to manually migrate or the CLI will create new.bitsocialdirectories
-
"DEBUG": "plebbit*"→"DEBUG": "bitsocial*, plebbit*"
| Phase | Status | Notes |
|---|---|---|
| Phase 1: Package Config | [x] Complete | |
| Phase 2: Directory Structure | [x] Complete | |
| Phase 3: Source Files | [x] Complete | |
| Phase 4: Classes & Types | [ ] Skipped | plebbit-js not rebranded |
| Phase 5: CLI Commands | [x] Complete | |
| Phase 6: Environment Variables | [x] Complete | |
| Phase 7: Logger Namespaces | [x] Complete | |
| Phase 8: Installation Scripts | [x] Complete | |
| Phase 9: Test Files | [x] Complete | |
| Phase 10: Documentation | [x] Complete | |
| Phase 11: CI/CD & Build | [x] Complete | |
| Phase 12: External Dependencies | [ ] Skipped | plebbit-js not rebranded |
| Phase 13: Data Migration | [ ] Skipped | Per user request |
| Phase 14: VSCode Config | [x] Complete | |
| Final Verification | [x] Complete | Build & tests pass |
Since plebbit-js has not been rebranded yet, the following remain unchanged:
@plebbit/plebbit-jsimport and dependencyPlebbitclass nameplebbit.createSubplebbit()method callsplebbit.getSubplebbit()method callsplebbit.subplebbitspropertySubplebbitEditOptionsand other plebbit-js typesplebbitRpcClientsOptionsand similar plebbit-js options--plebbitRpcUrlCLI flag (maps to plebbit-js)--plebbitOptions.*CLI flags
These repositories are outside bitsocial-cli but will need coordinated updates:
| Repository | Changes Needed | Status |
|---|---|---|
| @plebbit/plebbit-js → @pkcprotocol/pkc-js | Core library rename | [ ] Not Started |
| @plebbit/plebbit-logger → @pkcprotocol/pkc-logger | Logger package rename | [ ] Not Started |
| WebUIs (seedit, plebchan, plebones) | Update default options variable names | [ ] Not Started |