feat: add prompt file

2026-10-12_store-dotenv-by-default-in-current-folder.md
This commit is contained in:
Janik von Rotz committed 2026-10-12 17:06:45 +02:00
1 parent 5a43e96c0f
commit eb60b3107f
1 file changed
+52
@@ -0,0 +1,52 @@
---
commit_ref: 578794065fe194b11e28a7484c3dde6b0a0e138d
title: "Store dotenv by default in current folder"
author: "Janik von Rotz <login@janikvonrotz.ch>"
state: completed
date_completed: 2025-10-12
model: moonshotai/Kimi-K2.6
input_tokens: 34967
output_tokens: 8866
---
# Store dotenv by default in current folder
Note: @Clanker refers to the "ai agent" (you) who is working on this prompt file.
@Clanker when working on this prompt file, make sure to:
- Read context and task section first
- Prepare a list of todos
- Update the todo list while working on task
## Context
@Clanker Read the `AGENTS.md` and `README.md` to get an understanding of the project.
## Task
The command `task create-dotenv` creates a new dotenv file from template and stores in the `TASKFILE_DOTENV_DIR`.
Instead of making this the default, I want to have parameter -g / --global. This makes the dotenv "globally" available to other taskfile scripts.
Remove the special case for `secrets` template.
Document this flag in `library.md`.
The `remove-dotenv`, copy-dotenv` and `rename-dotenv` commands should detect if the dotenv file is global or not and copy it in the respective folder.
## Worklog
Modified `bin/create-dotenv` to store `.env` files in the current directory by default.
Added `-g` / `--global` flag to store files in `TASK_DOTENV_DIR` instead.
Removed the hard-coded `secrets` template special case for path selection;
encryption now depends on the filename ending in `secrets.env` regardless of template.
Updated `docs/library.md` and `task.template` to document the new `-g` flag.
Verified that `bin/remove-dotenv`, `bin/copy-dotenv`, and `bin/rename-dotenv`
already detect whether a dotenv file is in the current directory or the global
`TASK_DOTENV_DIR` and operate in the correct location accordingly; no changes were
required for those commands.
All modified scripts pass shellcheck.