Installing the Replyke CLI
The Replyke CLI is your gateway to adding fully customizable comment components to your application. You can use it directly withnpx (no installation needed) or install it globally for convenience.
Prerequisites
Before getting started, ensure you have:1
Node.js 18+
The CLI requires Node.js version 18 or higher.
2
A React Project
You’ll need an existing React, React Native, or Expo project.Supported platforms:
- React (Web) ✅
- React Native ✅
- Expo ✅
3
Replyke Project
Create a project in the Replyke Dashboard if you haven’t already.
Using npx (Recommended)
The easiest way to use the CLI is withnpx — no installation required:
Global Installation (Optional)
If you prefer, you can install the CLI globally:npx:
For the rest of this documentation, we’ll use
npx @replyke/cli to be version-agnostic, but you can use replyke if you’ve installed globally.Initializing Your Project
Run the initialization command in your project directory:Interactive Prompts
The CLI will ask you a series of questions to configure your project:Platform Selection
Platform Selection
Question: “Which platform are you using?”Options:
- React (Web)
- React Native
- Expo
Styling Preference
Styling Preference
Question: “Which styling approach do you prefer?”Options:
- Tailwind CSS - Uses utility classes like
bg-white dark:bg-gray-800 - Inline Styles - Uses style objects like
style={{ backgroundColor: theme === 'dark' ? '#1F2937' : '#FFFFFF' }}
- Choose Tailwind if your project already uses Tailwind CSS
- Choose Inline Styles if you don’t use Tailwind or prefer explicit styling
Component Path
Component Path
Question: “Where should components be installed?”Default:
src/componentsWhat it does: Sets the directory where CLI components will be copied.Note: You can use any path, but src/components is conventional.What Happens During Init
The initialization process:- Detects your project type based on your
package.json - Creates
replyke.jsonconfiguration file in your project root - Checks for required peer dependencies:
@replyke/react-jsand@replyke/ui-core-react-js(React Web)@replyke/react-nativeand@replyke/ui-core-react-native(React Native)@replyke/expoand@replyke/ui-core-react-native(Expo)
- Offers to install missing dependencies if needed
The replyke.json File
After initialization, you’ll see areplyke.json file in your project root:
add commands.
You can manually edit this file to change your preferences. Just re-run
add commands to install components with the new configuration.Installing Dependencies
The CLI will check for required peer dependencies and prompt you to install them if missing.For React (Web)
For React Native
For Expo
These dependencies are required. Components use them for data fetching, caching, real-time updates, authentication, and core functionality.
Troubleshooting
Error: Node version too old
Error: Node version too old
Error: Not a valid project directory
Error: Not a valid project directory
package.json is located.CLI hangs or doesn't respond
CLI hangs or doesn't respond
Solution:
- Press
Ctrl+Cto cancel - Clear npx cache:
npx clear-npx-cache - Try again:
npx @replyke/cli init
Want to change configuration
Want to change configuration
Solution:
- Delete
replyke.json - Run
npx @replyke/cli initagain - Or manually edit
replyke.jsonand re-runaddcommands

