Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Chronicle

Config-driven documentation framework built on Next.js, Fumadocs, and Apsara UI.

## Features

- **Config-driven** — Single `chronicle.yaml` for all site configuration
- **Themeable** — Built-in themes: `default` (sidebar + TOC) and `paper` (book-style)
- **MDX** — Write docs in MDX with callouts, tabs, mermaid diagrams, and syntax highlighting
- **API docs** — Interactive OpenAPI documentation with "Try it out" panel
- **LLMs** — Auto-generate `/llms.txt` and `/llms-full.txt` for AI consumption
- **CLI** — `init`, `dev`, `build`, `start`, `serve` commands

## Quick Start

### Install

```bash
bun add @raystack/chronicle
```

Or run directly without installing:

```bash
bunx @raystack/chronicle init
```

### Initialize

```bash
chronicle init
```

Creates a `chronicle.yaml` and sample `index.mdx`.

### Develop

```bash
chronicle dev
```

Open [http://localhost:3000](http://localhost:3000).

### Build for production

```bash
chronicle build
chronicle start
```

## Contributing

We welcome contributions! Here's how to get started:

### Prerequisites

- [Node.js](https://nodejs.org/) >= 22
- [Bun](https://bun.sh/) >= 1.3

### Running Locally

1. Fork and clone the repository

```bash
git clone https://github.com/<your-username>/chronicle.git
cd chronicle
```

2. Install dependencies

```bash
bun install
```

3. Run the dev server

```bash
cd docs && bun ../packages/chronicle/bin/chronicle.js dev
```

Open [http://localhost:3000](http://localhost:3000) to see the docs site.

### Making Changes

1. Create a branch from `main`
2. Make your changes
3. Test locally from the `docs/` directory
4. Open a pull request

## License

[Apache-2.0](LICENSE)
23 changes: 23 additions & 0 deletions docs/chronicle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
title: Chronicle
description: Config-driven documentation framework

theme:
name: paper

navigation:
links:
- label: GitHub
href: https://github.com/raystack/chronicle

search:
enabled: true
placeholder: Search docs...

llms:
enabled: true

footer:
copyright: "© 2026 Raystack. All rights reserved."
links:
- label: GitHub
href: https://github.com/raystack/chronicle
84 changes: 84 additions & 0 deletions docs/cli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
title: CLI Commands
description: Chronicle CLI commands reference.
order: 2
---

# CLI Commands

Chronicle provides a CLI to initialize, develop, build, and serve your documentation site.

## init

Scaffold a new Chronicle project.

```bash
chronicle init [options]
```

| Flag | Description | Default |
|------|-------------|---------|
| `-d, --dir <path>` | Target directory | `.` (current directory) |

Creates a `chronicle.yaml` config file and a sample `index.mdx` in the specified directory.

## dev

Start the development server with hot reload.

```bash
chronicle dev [options]
```

| Flag | Description | Default |
|------|-------------|---------|
| `-p, --port <port>` | Port number | `3000` |
| `-c, --content <path>` | Content directory | Current directory |

## build

Build the site for production.

```bash
chronicle build [options]
```

| Flag | Description | Default |
|------|-------------|---------|
| `-c, --content <path>` | Content directory | Current directory |

## start

Start the production server. Requires a prior `chronicle build`.

```bash
chronicle start [options]
```

| Flag | Description | Default |
|------|-------------|---------|
| `-p, --port <port>` | Port number | `3000` |
| `-c, --content <path>` | Content directory | Current directory |

## serve

Build and start the production server in one step.

```bash
chronicle serve [options]
```

| Flag | Description | Default |
|------|-------------|---------|
| `-p, --port <port>` | Port number | `3000` |
| `-c, --content <path>` | Content directory | Current directory |

## Content Directory Resolution

The content directory is resolved in this order:

1. `--content` CLI flag (highest priority)
2. `CHRONICLE_CONTENT_DIR` environment variable
3. Current working directory (default)

The content directory must contain a `chronicle.yaml` file.
Loading