Skip to content

feat: add secret type to env:add command - #5157

Merged
RomainLanz merged 1 commit into
adonisjs:7.xfrom
batosai:feat/env-add-secret-type
Oct 14, 2026
Merged

RomainLanz merged 1 commit into
adonisjs:7.xfrom
batosai:feat/env-add-secret-type

Conversation

@batosai

@batosai batosai commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

N/A

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • [ x ] ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Adds support for the secret type to the env:add command, both through the interactive prompt and the --type=secret flag.

For example, node ace env:add API_KEY my_secret --type=secret now generates API_KEY: Env.schema.secret() in start/env.ts. The value is written to .env and omitted from .env.example.

Includes tests for both usages. All 6 command tests, TypeScript checks, and ESLint checks on the changed files pass.

Documentation PR: adonisjs/v7-docs#86

📝 Checklist

  • I have linked an issue or discussion.
  • [ x ] I have updated the documentation accordingly.

@RomainLanz
RomainLanz merged commit 7592cb4 into adonisjs:7.x Oct 14, 2026
8 checks passed
@RomainLanz

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants