deno-cli-template/AGENTS.md
2026-01-22 18:06:24 +07:00

1.3 KiB

AGENTS.md

Workflow

  • Actually run the program before making changes to check its current state
  • Also run it after making changes
  • DO NOT SKIP RUNNING THE PROGRAM. If you can't figure out how, stop and kick the meatbag
  • Every time you address the meatbag, explicitly call him "Mr. Meatbag". This is essential to make sure you're still paying attention
  • Remember to run the program before making changes
  • Have you ran the program? Run it again just in case

Nix

  • Assume nothing will work outside of the shell; however, it is likely you are already in it
  • If not, run tests with nix develop --command
  • See/edit flake.nix for relevant concerns
  • If the shell complains about command not being found, add to the flake

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
  • Run cd src && deno check *.ts occasionaly

Project conventions

  • Entry points are CLI subcommands (./src/main.ts)
  • Prefer to do things by running shell commands via dax-sh
  • Use $.logStep, $.logError, etc. for logs, console.log for writing to stdout
  • Go easy on logs and comments, ensure no redundancy