Shadcn-style component distribution for Replyke comment systems.
- CLI Tool (
@replyke/cli) - Install components into your project - Component Registry - Threaded comments system (React web)
- 24 Component Files - Fully transformed, no -core dependencies
- Inline Styles - Copy, paste, customize
cd packages/cli
pnpm installpnpm buildIn a separate React project:
# Initialize Replyke
node /path/to/cli/packages/cli/dist/index.js init
# Add threaded comments
node /path/to/cli/packages/cli/dist/index.js add comments-threadedcli/
โโโ packages/
โ โโโ cli/ # CLI package
โ โโโ src/
โ โ โโโ commands/ # init, add commands
โ โ โโโ utils/ # registry, transform utilities
โ โโโ package.json
โ
โโโ registry/
โ โโโ react/
โ โโโ comments-threaded/
โ โโโ styled/
โ โโโ registry.json # Component metadata
โ โโโ files/ # 20 component files
โ โโโ hooks/ # 2 hook files
โ โโโ utils/ # 1 utility file
โ โโโ context/ # 1 context file
โ
โโโ package.json # Root workspace
โโโ pnpm-workspace.yaml # Workspace config
# Build CLI
pnpm build
# Watch mode (for development)
pnpm dev
# Run CLI directly
pnpm cli init
pnpm cli add comments-threaded- All 24 TypeScript files transformed
- No @replyke/comments-threaded-core dependencies
- Hardcoded base styles with customization comments
- Kebab-case file naming
- Relative imports updated
- Logical directory grouping maintained
-
initcommand - Project initialization -
addcommand - Component installation - Registry fetching (local for testing)
- Dependency checking
- File copying with structure preservation
- registry.json metadata
- 24 files organized with logical grouping
- Component descriptions
- Dependency specifications
- Root package.json
- pnpm-workspace.yaml
- CLI package.json with dependencies
Create a test React project (in a separate directory):
npm create vite@latest test-replyke-app -- --template react-ts
cd test-replyke-app
npm installnpm install @replyke/react-js @replyke/ui-core-react-js# Initialize (creates replyke.json)
node /path/to/cli/packages/cli/dist/index.js init
# Add components
node /path/to/cli/packages/cli/dist/index.js add comments-threaded// src/App.tsx
import ThreadedCommentSection from './components/ui/threaded-comment-section';
function App() {
return (
<div>
<ThreadedCommentSection
entityId="test-entity"
/>
</div>
);
}- โ
Files copied to
src/components/ui/ - โ No TypeScript errors
- โ Imports resolve correctly
- โ Components render
- โ Can modify hardcoded styles directly
- Only React web components (no React Native yet)
- Only threaded comments (social comments not transformed)
- Only inline styles (no Tailwind variant)
- Local registry only (not published to npm/GitHub yet)
- No
diffcommand
- Transform social comments system
- Add React Native support
- Publish to npm
- GitHub registry hosting
- Tailwind CSS variants
-
diffcommand for updates - Component preview website
threaded-comment-section.tsx- Main entry pointnew-comment-form.tsx- Top-level comment formmention-suggestions.tsx- @ mention autocompletecomments-feed/- Feed components (4 files)comment-thread/- Thread components (4 files)single-comment/- Individual comment (5 files)modals/- Modal components (4 files)
hooks/use-threaded-comments.tsx- Main hookhooks/use-modal-manager.tsx- Modal stateutils/prop-comparison.ts- Memoization utilitiescontext/modal-manager-context.tsx- Modal context
Make sure you've installed the peer dependencies:
npm install @replyke/react-js @replyke/ui-core-react-jsRun the init command first:
node /path/to/cli/packages/cli/dist/index.js initThese are expected! Registry files aren't meant to run directly. They'll work once copied to a project with dependencies installed.
Apache-2.0
You've successfully created a shadcn-style component distribution system for Replyke!
Next step: Test in a real React project and iterate based on feedback.