A beautiful command-line interface for checking weather conditions and forecasts using Tomorrow.io's Weather API.
- 🌡️ Get current weather conditions
- 🔮 View weather forecasts
- 🎨 Beautiful ASCII art weather representations
- 🌍 Support for both metric (°C) and imperial (°F) units
- 💾 Save your preferences for city and units
- Node.js (v14 or higher)
- npm or yarn
- Tomorrow.io API key (Get one here)
- Clone this repository:
git clone <your-repo-url>
cd weather-cli- Install dependencies:
npm install- Create a
.envfile in the root directory and add your Tomorrow.io API key:
WEATHER_API_KEY=your_api_key_here- Build the project:
npm run build- Link the CLI globally:
npm linkBefore first use, configure your default city and preferred unit system:
weather initThis will prompt you to:
- Enter your city name
- Choose your preferred unit system (metric or imperial)
To get current weather conditions:
weather nowTo see the weather forecast:
weather forecastYou can temporarily override your default settings using command options:
weather now --city "London" --units metric
weather forecast --city "New York" --units imperialFor help with any command:
weather --help
weather now --help
weather forecast --helpWEATHER_API_KEY: Your Tomorrow.io API key (required)
MIT