# Documentation

Complete guide to getting started with Doclific

## Installation

### Quick Install

Install Doclific with a single command

**Prerequisites:** Doclific requires `node` and `npm` to be installed on your system. The AI integration feature automatically adds skills to `~/.cursor` and `~/.claude` directories, which requires Node.js and npm to function properly.

Make sure you have Node.js and npm installed before proceeding:

```
node --version
npm --version
```

```
curl -fsSL https://raw.githubusercontent.com/muellerluke/doclific/main/scripts/install.sh | bash
```

This will download the latest release for your platform, install the binary to `/usr/local/bin` (or `~/.local/bin` if you don't have write permissions), and set up the frontend build files.

**Note:** Make sure `~/.local/bin` (or `/usr/local/bin`) is in your `PATH` if it's not already.

### Windows Installation

Windows users need to use WSL (Windows Subsystem for Linux)

**Prerequisites for Windows:**

1. Install and set up **WSL (Windows Subsystem for Linux)** if you haven't already. You can install it by running `wsl --install` in PowerShell as Administrator.
2. Install **wslu** in your WSL distribution:
   ```
   sudo apt install wslu
   ```
3. Enable **interoperability** between Windows and WSL. This is typically enabled by default, but you can verify or enable it by running:
   ```
   wsl --set-default-version 2
   ```
   And ensure interoperability is enabled in your WSL distribution's config.

Once WSL is set up with wslu installed and interoperability enabled, you can run the standard installation command from within your WSL terminal.

## Commands

### `doclific` Start Server

### `doclific init` Initialize

### `doclific get [key]` Get Config

### `doclific set [key] [value]` Set Config

### `doclific version` Version

### `doclific update` Update

## Configuration

### Config File Location

Doclific stores configuration in `~/.config/doclific/config.json`

You can manage it using the `get` and `set` commands, or edit the file directly.

### AI Integration

Automatic AI assistant integration for documentation creation and editing

Doclific automatically integrates with AI assistants by adding documentation skills to your Cursor and Claude AI configurations. This enables AI-powered documentation creation and editing directly through your preferred AI assistant.

**How it works:** When you install Doclific, it automatically adds the necessary skills and instructions to:

- `~/.cursor` - For Cursor AI integration
- `~/.claude` - For Claude AI integration

**Requirements:** This feature requires Node.js and npm to be installed on your system. The installation script will verify these dependencies are available.

Once installed, you can use your AI assistant (Cursor or Claude) to help create and edit documentation using Doclific's features, including ERD diagrams, whiteboards, and code snippets.

## Key Features

### ERD Diagramming

Create Entity Relationship Diagrams to visualize your database schema

Doclific includes powerful ERD diagramming capabilities. You can create detailed Entity Relationship Diagrams directly within your documentation. With AI integration, your Cursor or Claude assistant can help generate ERDs based on your codebase structure, making it easy to visualize database relationships and schema designs.

### Whiteboarding

Document architecture and system designs with interactive whiteboards

Use the built-in whiteboarding feature to create visual architecture diagrams, system designs, and flowcharts. Perfect for documenting complex systems, planning new features, and visualizing how different components interact in your codebase.

## Usage

### Quick Start Guide

1. **Initialize a project:**
   ```
   cd /path/to/your/project
   doclific init
   ```
2. **Start the server:**
   ```
   doclific
   ```
3. **Open the web interface:** The browser will open automatically, or navigate to `http://localhost:6767`
4. **Create documentation:** Use the Notion-like editor to create and edit your documentation. Use the slash menu (/) to add blocks, ERD diagrams, whiteboards, and more to visualize your architecture.
5. **Use AI assistance:** Doclific automatically integrates with Cursor and Claude AI assistants. The skills are added to `~/.cursor` and `~/.claude` during installation, enabling AI-powered documentation creation and editing through your preferred AI assistant.

## Project Structure

### Documentation Folder Structure

After running `doclific init`, your project will have:
```
 your-project/
 └── doclific/
 └── [documentation folders]/
 ├── config.json
 └── content.mdx
```

Each documentation folder contains:

- `config.json`: Metadata (title, icon)
- `content.mdx`: The documentation content in MDX format

## Demo

### Doclific Walkthrough - YouTube

[Doclific Walkthrough](https://www.youtube.com/watch?v=q9UNDLQzjFI)

## Ready to get started?

Install Doclific and start documenting your codebase today.
