#How to default to bun and typescript?
1 messages · Page 1 of 1 (latest)
There isn’t a “global default language = X” switch, but you can push it pretty hard to prefer TypeScript for any little helper scripts it writes/runs.
What works best:
-
Add a rule to your agent’s
AGENTS.md(in that agent’s workspace) saying something like:- “When you need to write/run a script, use TypeScript (Node).”
- “Use
tsxto run.tsfiles.” - “Do not use Python unless I explicitly ask.”
-
Make TS actually runnable in the workspace, otherwise the model tends to fall back to Python because it’s “always available”:
- In your workspace folder, install a TS runner:
pnpm add -D typescript tsx @types/node
- Then the agent can do:
pnpm tsx scripts/foo.ts
- In your workspace folder, install a TS runner:
-
If your main complaint is the filesystem mess, consider enabling sandboxing so the temp files land in a sandbox workspace instead of littering your host FS: