deno-cli-template/AGENTS.md
2025-12-18 11:40:05 +07:00

756 B

AGENTS.md

Nix

  • Enter a dev shell with nix develop
  • Assume nothing will work outside of the shell
  • See/edit flake.nix for relevant concerns

Deno

  • Manage dependencies with deno add and deno remove in ./src directory
  • Deno maintains its own deno.lock which Nix picks up
  • IMPORTANT: never use JSR dependencies, only NPM
  • Example: deno add npm:chalk then import chalk from "chalk"; in .ts files

Project conventions

  • Entry points are CLI subcommands (./src/main.ts)
  • Use @stricli/core for CLI
  • Prefer to do things by running shell commands via dax-sh
  • Verbosity implies $.setPrintCommand(true) for dax-sh to output what it runs
  • Logs always go to stderr so that stdout can be redirected to a file safely