Files
git.taskfile.build/prompt.md
T
Janik von Rotz 01c3a74954 feat: add global flag to create-dotenv and change default storage location
- Modify `bin/create-dotenv` to store `.env` files in the current directory by default.
- Add `-g` / `--global` flag to store files in `TASK_DOTENV_DIR` instead.
- Remove hard-coded `secrets` template special case for path selection; encryption now depends on the filename ending in `secrets.env`.
- Update `docs/library.md`, `task.template`, and `prompt.md` to reflect the new behavior and flag.
- Verify that `remove-dotenv`, `copy-dotenv`, and `rename-dotenv` correctly handle both local and global paths.
2026-10-12 08:38:42 +02:00

1.8 KiB

title, author, state, date_completed, model, input_tokens, output_tokens
title author state date_completed model input_tokens output_tokens
Store dotenv by default in current folder Janik von Rotz <login@janikvonrotz.ch> completed 2025-10-12 moonshotai/Kimi-K2.6 34967 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-dotenvandrename-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.