Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.replyke.com/llms.txt

Use this file to discover all available pages before exploring further.

Installing the Replyke CLI

The Replyke CLI copies fully customizable comment components directly into your project as editable source code. You can use it with npx (no installation required) or install it globally.

Prerequisites

1

Node.js 18+

node --version
# Should output v18.x.x or higher
2

A React, React Native, or Expo project

Supported platforms:
  • React (Web) ✅
  • React Native ✅
  • Expo ✅
3

A Replyke project

Create a project in the Replyke Dashboard if you haven’t already.

No installation required — npx always uses the latest version:
npx @replyke/cli init

Global Installation (Optional)

npm install -g @replyke/cli
Then use without npx:
replyke init
replyke add comments-threaded
The rest of this documentation uses npx @replyke/cli to stay version-agnostic, but replyke works identically when installed globally.

Initializing Your Project

Run the init command from your project root:
cd your-react-app
npx @replyke/cli init

Interactive Prompts

Question: “Which platform are you using?”Options: React (Web) · React Native · ExpoDetermines which component variants and dependencies are used.
Question: “Which styling approach do you prefer?”Options:
  • Tailwind CSS — Uses utility classes (bg-white dark:bg-gray-800)
  • Inline Styles — Uses style objects (style={{ backgroundColor: '...' }})
Choose Tailwind if your project already uses Tailwind CSS. Otherwise choose Inline Styles.
Question: “Where should components be installed?”Default: src/componentsThe directory where CLI components will be copied. You can use any path.

What Happens During Init

  1. Detects your project type from package.json
  2. Creates replyke.json in your project root
  3. Checks for required peer dependencies and offers to install missing ones

The replyke.json File

After initialization, a replyke.json file is created in your project root:
{
  "platform": "react",
  "style": "tailwind",
  "typescript": true,
  "paths": {
    "components": "src/components"
  },
  "aliases": {
    "@/components": "./src/components"
  }
}
See Configuration for a full reference.

Installing Dependencies

The CLI checks for required peer dependencies and prompts to install them if missing. React (Web):
npm install @replyke/react-js
React Native:
npm install @replyke/react-native
Expo:
npm install @replyke/expo
These packages are required. Components use them for data fetching, authentication, real-time updates, and core functionality.

Troubleshooting

Error: The Replyke CLI requires Node.js 18 or higher
Upgrade Node.js to v18 or higher.
Run the command from your project root directory where package.json is located.
  1. Press Ctrl+C to cancel
  2. Clear npx cache: npx clear-npx-cache
  3. Try again: npx @replyke/cli init
Delete replyke.json and run npx @replyke/cli init again, or manually edit the file and re-run add commands.

Next Steps

Quick Start

Add your first component in under 5 minutes

Configuration Reference

Understand every option in replyke.json

Threaded Comments

Add Reddit-style threaded comments

Social Comments

Add Instagram-style social comments