#!/usr/bin/env -S uv run --script # /// script # requires-python = ">=3.11" # dependencies = ["httpx>=0.27.0", "textual>=1.0.0"] # /// """snotes CLI — TUI + template launcher for the snotes notes app. Install: curl -fsSL //cli | bash Config: ~/.config/snotes/config.json """ from __future__ import annotations import json import os import re import shlex import subprocess import sys import tempfile from dataclasses import dataclass from datetime import date, datetime, timedelta from pathlib import Path import httpx USAGE = """\ snotes — command-line client for the snotes notes app usage: snotes open the TUI (recent notes, list, search) snotes recent [-n N] print recent notes (default 20) snotes find open the TUI with a search for snotes new create a note in $EDITOR snotes templates list templates (a note containing $name defines one) snotes