Skip to main content

Programmatic usage

Mk Notes can be used programmatically in your Javascript/Typescript projects.


The library exposes a MkClient class that allows you to use the main functionalities of Mk Notes directly inside you code.

import { MkClient } from 'mk-notes';

const client = new MkClient({
notionApiToken: 'YOUR_NOTION_SECRET',
});

client.previewSynchronization({ inputPath: './notes/' }).then(console.log);

See the API documentation for more information on the methods available.