Infisical / infisical

♾ Infisical is the open-source secret management platform: Sync secrets across your team/infrastructure and prevent secret leaks.
https://infisical.com
Other
12.59k stars 631 forks source link

feat: delimiter flag for export command #1822

Closed nettijoe96 closed 2 weeks ago

nettijoe96 commented 2 weeks ago

Description 📣

Creates new flags delimit and quota for the export command. delimit is currently only for CSV format. quota is only for .env formats. There are 2 flags rather than 1 because default handling is clearer and it allows for the possibility to extend delimit flag to .env for changing = in the future. Flags are permissive -- if format is not CSV or .env and a flag is provided, the flag is ignored and the command doesn't fail

Resolves: https://github.com/Infisical/infisical/issues/1103

Type ✨

Tests 🛠️

See unit tests in cli/cmd_test.go

Manually:

Screenshot 2024-05-13 at 3 14 21 PM
maidul98 commented 2 weeks ago

Hey @nettijoe96 custom formatting outisde of the predefined ones can be achieved with templates https://infisical.com/docs/cli/commands/export#infisical-export:template. I believe you can achieve what you added for this PR with templates. Let me know if you think otherwise.

nettijoe96 commented 2 weeks ago

@maidul98

Agreed!