Skip to main content
Glama
EtherPK

EtherPK

Official
README.md
# EtherPK Client

[![Build and release](https://github.com/appsoftwareltd/etherpk-client/actions/workflows/build.yaml/badge.svg?branch=main)](https://github.com/appsoftwareltd/etherpk-client/actions/workflows/build.yaml)
[![npm](https://img.shields.io/npm/v/@appsoftwareltd/etherpk-mcp?label=npm)](https://www.npmjs.com/package/@appsoftwareltd/etherpk-mcp)
[![Discord](https://img.shields.io/badge/Discord-join%20the%20community-5865F2?logo=discord&logoColor=white)](https://discord.gg/m9vScxQzvp)

The source of the [EtherPK](https://etherpk.com) Client and Headless Client, available under the
[Elastic License 2.0](LICENSE).

[Try the demo](https://app.etherpk.com/demo) from [etherpk.com](<https://etherpk.com>). It runs in your browser and needs no account (data remains in your browser).

## One Markdown Notes App For Everything

**Fast, Private, Secure Knowledge Management**

Write, think, link your ideas, manage tasks, hand work to AI agents, publish to the web. Your data
stays yours.

EtherPK is a notes app and PKMS with a lot to offer.

- Long-form prose and outliner features in the same documents
- Robust wikilinking and aliasing
- Plain local markdown files, or Sync+ with export
- Task management and Kanban boards
- PDF and EBook Reader
- Document Versioning
- Real-time collaboration
- Quick Notes, with sharing from other apps
- End-to-end encryption
- Static site publishing
- AI agent integration
- Source-available Client

**Document Editor (Prose and Outliner Blocks)**

![The EtherPK Client in the dark theme: a page in the editor, with prose, headings and an outline of bullets full of wikilinks, and the page's Backlinks beside it](.github/assets/etherpk-page.webp)

**Task Kanban View**

![A Kanban board of the tasks about one concept, gathered from across the graph, with the chosen task shown in its journal entry below the board](.github/assets/etherpk-kanban-board.webp)

**Handing a Task to a Coding Agent**

![An animation, sped up: tasks typed into a note, the Kanban board, the task editor with a picture and a comment added, an agent instruction copied, Claude Code working through the task in a terminal, the card in Test with its subtasks ticked, and the Agents tab in Settings](.github/assets/etherpk-task-handoff.gif)

**Aggregate Map View**

![A Map View of the gardens noted under one concept across the graph, on one map with a list beside it grouped by document](.github/assets/etherpk-maps.webp)

**Graph View**

![The EtherPK Client in the dark theme: the demo graph in the whole Graph View, its list of hubs, and the Backlinks pane](.github/assets/etherpk-graph-view.png)

EtherPK is a personal knowledge base in plain Markdown. Journal entries hold daily thinking, pages
hold what outlives a day, and `[[wikilinks]]` tie them into a knowledge graph. The **Client** is the
editor: a SvelteKit app that opens a graph from a folder on your device, or from a Sync Server
that stores graphs end-to-end encrypted and cannot read them. It also edits any folder of Markdown
files where it is, as a Plain Folder, without making it a graph. The **Headless Client** is the same
engine without an editor: an MCP server that gives an AI agent one of your graphs.

User documentation is at <https://docs.etherpk.com>.

A graph folder is written in the **EtherPK Format**: Markdown files a person and a coding agent
can both read and write. Its [specification](https://docs.etherpk.com/etherpk-format) says how a
program reads and writes one, and [`format/`](format/README.md) holds an example folder with the
result a reader gets from that folder.

## Licence

The Elastic License 2.0 lets you use, copy, modify and self-host this software. It does not let you
offer it to others as a hosted or managed service. It is a source-available licence, not an open
source one.

The EtherPK Format's specification, its example folder, the EtherPK section of `AGENTS.md` and the
agent skill's starter folders are under the [MIT License](format/LICENSE).

## Contents

| Path | Contents |
| --- | --- |
| `apps/client` | The Client |
| `apps/mcp` | The Headless Client / MCP Server, published to npm as [`@appsoftwareltd/etherpk-mcp`](https://www.npmjs.com/package/@appsoftwareltd/etherpk-mcp) ([README](apps/mcp/README.md)) |
| `packages/shared` | Code the Client shares with the Sync Server: the sync protocol, UI components and auth pages |
| `packages/themes` | The site themes the publisher bundles |
| `packages/extension-api` | The Extension API every EtherPK extension is written against, MIT licensed, published to npm as [`@appsoftwareltd/etherpk-extension-api`](https://www.npmjs.com/package/@appsoftwareltd/etherpk-extension-api) |
| `extensions` | The extensions that come with the Client: Agent Chat, Excalidraw drawings, the Graph View, Kanban boards and maps |
| `format` | An example graph folder in the EtherPK Format, and the result a program gets from reading it ([README](format/README.md)) |
| `skills/etherpk` | The agent skill: how an AI agent makes, edits and publishes EtherPK graph folders ([SKILL.md](skills/etherpk/SKILL.md)) |

## Run it

### Docker image

```bash
docker run --rm -p 3000:3000 ghcr.io/appsoftwareltd/etherpk-client:latest
```

Every tag is listed on the image's
[package page](https://github.com/appsoftwareltd/etherpk-client/pkgs/container/etherpk-client).

Open <http://localhost:3000>. With no settings the Client works with graph folders on your
device and offers a **Custom server** form for connecting to a Sync Server by its address. The
settings it reads are listed, with their defaults, in
[`apps/client/.env.example`](apps/client/.env.example) - pass them with `--env-file`.

An example Docker Compose file is in
[Running EtherPK With Docker](https://docs.etherpk.com/running-etherpk-with-docker).

### Node bundle

Each release attaches `etherpk-client-<version>.tar.gz`, which runs on Node.js 24 or later on
Windows, macOS and Linux, with nothing to install:

```bash
tar -xzf etherpk-client-<version>.tar.gz
cd etherpk-client
HOST=127.0.0.1 PORT=3000 node build
```

The full guide, including Windows commands, is
[Running EtherPK On Your Own Device](https://docs.etherpk.com/running-etherpk-on-your-own-computer).

### Headless Client / MCP Server

Published to npm as
[`@appsoftwareltd/etherpk-mcp`](https://www.npmjs.com/package/@appsoftwareltd/etherpk-mcp).

```bash
npx @appsoftwareltd/etherpk-mcp --help
```

Setup for each kind of graph is in [`apps/mcp/README.md`](apps/mcp/README.md).

### Agent skill

The `etherpk` skill teaches an AI agent (Claude Code, Codex, Cursor and the others the
[skills CLI](https://github.com/vercel-labs/skills) supports) to make a blog, docs site or wiki
folder in EtherPK's format inside any project, to write and edit its pages, to check it with a dry
run of the publish, and to publish it. For a synced graph it sends the agent to the Headless
Client's tools. Install it in the project the agent works in:

```bash
npx skills add appsoftwareltd/etherpk-client
```

Add `-g` to install it for every project. The skill is installed from this repository's `main`
branch, and `npx skills add appsoftwareltd/etherpk-client#v<version>` pins it to a release.
`npx skills update` brings it up to date.

## Build from source

You need Node.js 24 or later and pnpm - `corepack enable` provides the pnpm version that
`package.json` names.

```bash
pnpm install --frozen-lockfile
pnpm dev          # the Client on http://localhost:5173
pnpm check        # type check
pnpm lint
pnpm test         # Vitest unit suites
pnpm build        # the Client and the Headless Client
docker build -f apps/client/Dockerfile -t etherpk-client .
```

Copy `apps/client/.env.example` to `apps/client/.env` to change the development settings.

To develop an extension against the Client, build it and start the development server with its
folder named in `ETHERPK_DEV_EXTENSIONS` (several are separated by commas). It is loaded like an
extension the Client ships, and one with the same id replaces it:

```bash
ETHERPK_DEV_EXTENSIONS=/path/to/my-extension pnpm dev
```

## Versions and releases

- Every commit on `main` publishes images tagged `edge` and `sha-<commit>`. The image of a commit
  that is not a release is deleted after 30 days, except the newest three, so pin a version tag.
- A release is a `v<version>` tag. It publishes images tagged `<version>`, `<major>.<minor>` and
  `latest`, a GitHub Release with the Node bundle attached, and `@appsoftwareltd/etherpk-mcp` and
  `@appsoftwareltd/etherpk-extension-api` at the same version on npm.
- The Client and the Headless Client share one version number with EtherPK's Sync Server, and
  only matching versions are tested together. A Client and a Sync Server on different sync
  protocol versions refuse to sync, and the Client says which side needs upgrading.
- [CHANGELOG.md](CHANGELOG.md) lists what changed in the Client and the Headless Client in each
  release.

## How this repository is maintained

This repository is a one-way copy of App Software's private EtherPK repository, exported on every
change there. Each commit here is one export - its `GitOrigin-RevId` trailer names the private
commit it came from. Code comments cite design records (`ADR 0072`) and glossary terms
(`[[Knowledge Graph]]`) that live in the private repository and are not published here.

Issues are welcome. Pull requests are not merged here - [CONTRIBUTING.md](CONTRIBUTING.md) explains
why and what happens instead. Report security issues as [SECURITY.md](SECURITY.md) describes.