- env-secrets: A Node.js CLI tool that retrieves secrets from vaults and injects them as environment variables
- Repository: https://github.com/markcallen/env-secrets
- Issue Tracking: Uses GitHub issues for feature requests and bugs
- Strict Mode: Enabled, use proper types, avoid
any - Type Definitions: Prefer interfaces over types for object shapes
- Generic Types: Use when appropriate for reusable components
- Order: Group by: external libraries, internal modules, relative imports
- Style: ES6 imports (
import/export) - Barrel Exports: Use index files for clean import paths
- Prettier: Default config (.prettierrc), 2-space indentation
- Line Length: Let Prettier handle line wrapping
- Trailing Commas: Use in objects and arrays
- Variables/Functions: camelCase
- Components/Types: PascalCase
- Constants: UPPER_CASE
- Files: kebab-case for files, PascalCase for components
- Husky is configured for pre-commit hooks
- lint-staged runs prettier and eslint on staged files
Always run quaity checks after creating or modifing files
- Linting:
yarn lint- runs ESLint with TypeScript support - Formatting:
yarn prettier:fix- formats code with Prettier - Type Checking:
yarn build- compiles TypeScript and checks types
Always run unit tests after creating or modifying files.
Always start Docker Compose LocalStack and run end to end tests before pushing code to a remote git repository.
- Unit Tests: Jest framework, located in
__tests__/ - E2E Tests: Located in
__e2e__/ - Coverage: Run
yarn test:unit:coveragefor coverage reports - Test Commands:
yarn test- runs all testsyarn test:unit- runs unit tests onlyyarn test:e2e- builds and runs e2e testsdocker compose up -d localstack- start LocalStack for e2e tests
src/ # Source code
├── index.ts # Main entry point
├── aws.ts # AWS Secrets Manager integration
└── types.ts # TypeScript type definitions
__tests__/ # Unit tests
__e2e__/ # End-to-end tests
docs/ # Documentation
website/ # Documentation website
dist/ # Compiled output (generated)
- AWS SDK: For Secrets Manager integration
- Commander: CLI argument parsing
- Debug: Debug logging support
- TypeScript: 4.9.5 with strict mode
- ESLint: Code linting with TypeScript support
- Prettier: Code formatting
- Jest: Testing framework
- Husky: Git hooks
- lint-staged: Pre-commit linting
yarn build # Build the project
yarn start # Run the built application
yarn lint # Run ESLint
yarn prettier:fix # Format code with Prettier
yarn test # Run all tests
yarn test:unit # Run unit tests only
yarn test:e2e # Run e2e testsyarn prettier:check # Check formatting without fixing
yarn test:unit:coverage # Run tests with coverage- Run
yarn prettier:fix && yarn lintto ensure code quality - Run
yarn testto ensure all tests pass - Run
docker compose up -d localstackand thenyarn test:e2ebefore pushing - Update tests for new features or bug fixes
- Update documentation if needed
- Create a feature branch from
main - Make your changes following the code style guidelines
- Add tests for new functionality
- Ensure all CI checks pass
- Submit a pull request with a clear description
- Always request a GitHub Copilot review on every new pull request
- After requesting Copilot review, wait 5 minutes and check for review comments
- If no Copilot review is present yet, wait another 5 minutes and check again
- Create a plan to address Copilot feedback, but evaluate each suggestion critically and do not accept recommendations blindly
- Node.js 20.0.0 or higher (see .nvmrc)
- Yarn package manager
- AWS CLI (for testing AWS integration)
- Homebrew (macOS/Linux) with
awscli-localinstalled:brew install awscli-local
git clone https://github.com/markcallen/env-secrets.git
cd env-secrets
yarn install
brew install awscli-local
yarn build