coast-fire-calculator-cli
v1.0.2
Published
Interactive CLI to estimate your Coast FIRE age—enter your savings, investments, and goals to see when you can stop contributing and still reach financial independence.
Downloads
29
Maintainers
Readme
🚀 Coast FIRE Calculator CLI 🔥
🏝️ Calculate when you can coast to financial independence! 🎯 Enter your savings, investments, and goals to see when you can stop contributing and still reach FIRE.
✨ Features
- 📝 Interactive prompts for all key financial inputs
- 📈 Supports annual, quarterly, and monthly compounding
- 🌈 Colorful, user-friendly CLI output
- ⏳ Calculates the age you can stop investing and still reach your FIRE goal by age 70
📦 Installation
pnpm install🛠️ Usage
Run directly with npx:
npx coast-fire-calculator-cliOr if you have the project locally:
pnpm startor:
node index.js🧪 Testing
Run the test suite:
pnpm testRun tests in watch mode:
pnpm test:watchRun tests with coverage:
pnpm test:coverage📝 Committing Changes
This project uses Commitizen for standardized commit messages. To commit your changes:
pnpm commitThis will guide you through creating a conventional commit message with the following format:
type(scope): subject
body
footerCommit Types:
feat: New featuresfix: Bug fixesdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
🚀 Release Management
This project includes a comprehensive release system inspired by popular open-source libraries.
Quick Release Commands:
# Patch release (1.0.0 → 1.0.1) - Bug fixes
pnpm release:patch
# Minor release (1.0.0 → 1.1.0) - New features
pnpm release:minor
# Major release (1.0.0 → 2.0.0) - Breaking changes
pnpm release:major
# Pre-release versions
pnpm release:prepatch # 1.0.0 → 1.0.1-0
pnpm release:preminor # 1.0.0 → 1.1.0-0
pnpm release:premajor # 1.0.0 → 2.0.0-0
# Interactive release (asks for type)
pnpm releaseWhat the Release Script Does:
- 📋 Validation - Checks git status and validates release type
- 📝 Version Bump - Updates
package.jsonversion - 📚 Changelog - Generates/updates
CHANGELOG.md - 🏷️ Git Tag - Creates version tag (e.g.,
v1.0.1) - 📤 Commit - Commits all changes with proper message
- 🚀 Publish - Optionally publishes to npm
Release Workflow:
# 1. Make your changes
git add .
pnpm commit
# 2. Run tests
pnpm test
# 3. Release (choose appropriate type)
pnpm release:patch # or minor/major
# 4. The script will:
# - Bump version
# - Update changelog
# - Create git tag
# - Ask if you want to publish to npmIndustry Best Practices:
- Semantic Versioning: Follows
MAJOR.MINOR.PATCHformat - Conventional Commits: Uses standardized commit messages
- Keep a Changelog: Maintains detailed change history
- Git Tags: Creates version tags for easy reference
- Pre-releases: Supports alpha/beta/rc versions
💡 Example
? What is your current age? 25
? What is your target fire amount? 2000000
? What is your current amount of assets? 10000
? How much can you invest regularly? 500
? How often do you want to invest? (in months) 1
? What is your annual rate? (in %) 7
? How often is your investment compounded? Monthly📜 License
ISC
Enjoy your journey to financial independence! 🚀💰
