nopy: add init command with bundled NOPY.LLM.md guide

`nopy init` writes a starter .nopyrc.json and NOPY.LLM.md — an LLM-facing
usage guide covering cubes, config, variables, sessions, and pyinfra — into
the working directory. Existing files are skipped unless --force. The guide
ships as dist/templates/NOPY.LLM.md, resolved relative to the module so it
works from source and from an installed package alike.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ce5atB2tXDXyz2jd9s1bqE
This commit is contained in:
Benjamin Diedrichsen
2026-09-02 13:06:42 +02:00
co-authored by Claude Fable 5
parent 4fa69cce0d
commit f1cc9effa0
9 changed files with 684 additions and 2 deletions
+1 -1
View File
@@ -43,7 +43,7 @@
},
"scripts": {
"clean": "rm -rf dist .tsbuildinfo",
"build": "tsc && cp src/cubes/*.mjs dist/cubes/",
"build": "tsc && cp src/cubes/*.mjs dist/cubes/ && mkdir -p dist/templates && cp src/templates/*.md dist/templates/",
"prepack": "pnpm run build",
"link:local": "pnpm run build && npm link",
"nopy": "tsx src/nopy.cli.ts",