Install Kinogaki Core
There are three ways to install Kinogaki Core. The current version is 0.1.0.
With a coding agent
Point your agent at agent.kinogaki.com and paste:
Read agent.kinogaki.com and install Kinogaki Core into my project.
The agent reads the download URLs, checksums, and build flags from that page, pulls the library and headers, checksum-verifies them, and wires up the include and link flags. This works for both the C++ library and the Python package.
With pip
The package bundles the native library, so one command installs everything:
pip install kinogaki
import kinogaki as kg
doc = kg.Document()
doc.load("notes.md") # normalize a Markdown file into the document model
print(doc.to_string()) # the .prisma text
With C++ by hand
Core ships as a universal macOS static library (arm64 + x86_64) plus its headers, in one .tar.gz. A static library is plain object code that links into your binary. Core stands on the C++ standard library alone, with the codecs built in.
Download and verify:
curl -fsSLO https://cdn.kinogaki.com/kinogaki-core/0.1.0/kinogaki-core-0.1.0-macos.tar.gz
echo "b3ca00d397fc1fca162f7970b0daa7867bde6058d5eb9695789e13baf78eab35 kinogaki-core-0.1.0-macos.tar.gz" | shasum -a 256 -c -
tar -xzf kinogaki-core-0.1.0-macos.tar.gz
The archive unpacks to:
kinogaki-core/
include/kinogaki/… the headers: Document.h, Codecs.h, Serialize.h, …
lib/libkinogaki-core.a the prebuilt universal static library
Add the include path and link the archive with any C++20 compiler:
c++ -std=c++20 -Ikinogaki-core/include app.cpp -Lkinogaki-core/lib -lkinogaki-core -o app
Everything is under the kinogaki:: namespace and the kinogaki/ include root. A one-file check:
#include "kinogaki/Document.h"
#include <cstdio>
using namespace kinogaki;
int main() {
Document doc;
doc.append(Path("/hi"), "note").set("msg", Str("it works"));
std::printf("%s", doc.toString().c_str());
}
Build from source instead
Useful on other platforms, or to track main:
git clone https://github.com/kinogaki/kinogaki-core
cd kinogaki-core && ./build.sh
build.sh is a single shell script that compiles the library and runs the test suite.