Configuration File
Thereplyke.json file is created in your project root during initialization. It stores your preferences and is used by the CLI when adding components.
File Location
Configuration Schema
Configuration Options
platform
Type: "react" | "react-native" | "expo"
Description: Specifies your application platform. This determines:
- Which component variants are available
- Which peer dependencies are required
- Platform-specific imports and syntax
style
Type: "tailwind" | "styled"
Description: Determines which styling approach to use for components.
Options:
- tailwind
- styled (Inline Styles)
Components use Tailwind CSS utility classes.Requires: Tailwind CSS installed in your projectExample component code:Best for:
- Projects already using Tailwind CSS
- Design systems based on Tailwind
- Developers who prefer utility-first CSS
Once you’ve added components with a specific style variant, switching requires re-installing the components. You can change
style in replyke.json and then delete and re-add components.typescript
Type: boolean
Default: true (detected automatically)
Description: Indicates whether your project uses TypeScript. This is automatically detected based on your project setup.
Examples:
.tsx files).
.jsx files).
The CLI auto-detects this from your
tsconfig.json or file extensions. You rarely need to change this manually.paths
Type: object
Description: Configures where different types of files should be installed.
Properties:
components- The directory where CLI components will be installed
src/components/comments-threaded/src/components/comments-social/
app/ui/components/comments-threaded/app/ui/components/comments-social/
Use a path relative to your project root. The CLI will create the directory if it doesn’t exist.
aliases
Type: object
Description: Path aliases used in component imports. These match your project’s path resolution configuration (tsconfig.json paths or webpack aliases).
Examples:
Make sure these aliases match your
tsconfig.json or bundler configuration. Mismatched aliases will cause import errors.Complete Example
Here’s a typicalreplyke.json for a React web app using Tailwind CSS:
Changing Configuration
Option 1: Edit Manually
You can editreplyke.json directly:
add commands to install components with the new configuration.
If you’ve already added components, you’ll need to delete them first:
Option 2: Re-initialize
Deletereplyke.json and run init again:
Platform-Specific Notes
React (Web)
Platform value:"react"
Required dependencies:
- ✅ Threaded comments
- ✅ Social comments
React Native
Platform value:"react-native"
Required dependencies:
- ⚠️ Threaded comments (in progress)
- ✅ Social comments
"styled" (inline styles) is supported. Tailwind support coming soon.
Expo
Platform value:"expo"
Required dependencies:
- ⚠️ Threaded comments (in progress)
- ✅ Social comments
"styled" (inline styles) is supported.
FAQ
Can I use both styling variants in the same project?
Can I use both styling variants in the same project?
No, the configuration applies to all components. Pick one approach and stick with it for consistency.
What if I delete replyke.json?
What if I delete replyke.json?
The CLI will error when you try to
add components. Simply run npx @replyke/cli init again to recreate it.Can I customize the configuration schema?
Can I customize the configuration schema?
No, the CLI expects this specific schema. However, you can request new options by opening an issue on GitHub.
Does this file affect my application at runtime?
Does this file affect my application at runtime?
No,
replyke.json is only used by the CLI during component installation. Your application doesn’t read or use this file.
