noz-cli/CHANGELOG.md

4.6 KiB

Changelog

All notable changes to noz-cli are documented here.
Format: Keep a Changelog · Versioning: Semantic Versioning.


[Unreleased]

[0.2.0] — 2026-05-17

Added

REPL commands

  • mv <old> <new> — rename a note and atomically rewrite all inbound wikilinks and markdown links
  • mkdir <name> — create a folder by writing a _index.md; navigates into the new folder immediately
  • link <source> <target> — add a wikilink to the "Siehe auch" section (or create it); --both for bidirectional
  • search <query> — full-text search via Meilisearch; context-aware (defaults to current topic); --topic, --limit flags
  • templates — list available server-side note templates
  • new --template <name> <slug> — create a note from a template with {{title}}, {{date}}, {{topic}} placeholders
  • cat --raw <slug> — print raw markdown (default now renders via MarkdownRenderer)
  • clear — clear the terminal screen

PowerShell module

  • Get-NozGraph — all wikilink edges as NozGraphEdge objects; filterable by -Source / -Target
  • Find-NozNote — Meilisearch full-text search; -Topic, -Limit
  • Measure-NozGarden — garden-wide statistics: note counts by status/topic/lang, link count, orphan count
  • Set-NozNoteStatus — patch the status: frontmatter field in place; SupportsShouldProcess
  • Get-NozOrphans — notes with no incoming wikilinks; -Topic filter
  • Rename-NozNote — wraps NoteRenamer for pipeline use; -PassThru, -WhatIf
  • Get-NozTemplate — list server-side templates
  • Add-NozLink — add wikilinks between notes; -Both, -Section

Server API routes (noz Next.js app)

  • GET /api/cli/graph — full wikilink adjacency list from pre-built index
  • GET /api/cli/search — Meilisearch / local-search with ?q, ?topic, ?limit
  • PUT /api/cli/folders/[...path] — create _index.md for a folder
  • GET /api/cli/templates — list templates from _templates/
  • GET /api/cli/templates/[name] — fetch a single template body
  • PUT /api/cli/templates/[name] — create or update a template

Core library

  • NoteRenamer — fetches inbound edges, creates new note, rewrites links, deletes old slug
  • NoteLinkHelperAddLink() inserts wikilinks into existing sections or appends new ones; ApplyPlaceholders() for template rendering
  • NozApiClient.GetGraphAsync(), SearchAsync(), GetTemplatesAsync(), GetTemplateAsync(), PutFolderIndexAsync()

Templates

  • Four sample templates in content/noosphere/_templates/: rezept, buch-notiz, konzept, meeting

Fixed

  • walkNotes now skips directories with _ prefix (previously only filenames were checked — _templates/ content was indexed as regular notes)
  • Notes listing API now includes the date field

[0.1.0] — 2026-05-16

Added

  • Interactive REPL with topic-based navigation (cd, ls, ls -la, tree)
  • cat — render a note with MarkdownRenderer (headings, blockquotes, code blocks, inline formatting)
  • edit — open note in terminal editor (nano/vim) or VS Code / Zed / Sublime (-c)
  • new — create a note with frontmatter template, open in editor
  • rm — delete a note from server
  • sync — pull notes from server to local directory (parallel downloads, SHA-256 hash diffing, --all, --dry-run)
  • push — push local .md files to server with slug validation
  • status — diff between a local folder and the server
  • config — view and set editor / code_editor preferences
  • version — print version and git hash
  • help — list all commands with usage
  • exit / quit / q — quit the REPL
  • JSON note cache (~/.cache/noz/notes.json) — instant startup, background refresh, chmod 600, atomic write
  • Cache age shown in startup stats line ("vor 5 Min.")
  • Ctrl+C: idle → exit REPL; during command → cancel command only
  • Native AOT binary for macOS arm64 (~7.6 MB, no runtime required)
  • Tab completion for commands, slugs, and folder segments
  • SlugGuard — path traversal prevention for all slug inputs and file operations
  • MarkdownRenderer — segment-based inline escaping (prevents Spectre markup injection from note content)
  • PowerShell module Noz with Get-NozNote, Get-NozNoteContent, Set-NozNote, New-NozNote, Remove-NozNote
  • xUnit test suite (52 tests): SlugGuardTests, ReplContextTests, NotesCacheTests, NoteRenamerTests, NoteLinkHelperTests
  • Forgejo Actions CI pipeline (.forgejo/workflows/ci.yml): build + test on every push/PR
  • Version string from AssemblyInformationalVersion with embedded git short hash