Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
export async function triggerSync(op: 'sync' | 'push' | 'pull' | 'fetch'): Promise<void> {
const res = await fetch('/api/sync/trigger', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ op }),
});
if (!res.ok) {
throw new Error(`sync trigger failed: ${res.status}`);
}
}