Plan your next night under the stars—from your terminal.
Find golden hour, moon-free darkness, and where the planets will be. Solunatus combines a live sky dashboard, photography calendars, and a Rust astronomy library. Core calculations run locally, without an account or API key.
Get started · Plan a night · Observing recipes · Rust API
Preview of the new --tonight command on main; install from source below to try it. This feature is not in crates.io v0.6.1 yet. How the preview is generated.
| Your question | Solunatus gives you |
|---|---|
| When should I set up the camera? | Evening golden hour and blue hour, sunset, and astronomical twilight. |
| When does the Moon stop lighting up the sky? | A moon-free dark window: Sun below −18°, Moon below the horizon, with a 15-minute moon-glow buffer. |
| Where are the planets? | Altitude, azimuth, approximate magnitude, and rise/set times for Mercury through Neptune. |
| Can I plan ahead? | Dates, timezones, and HTML, JSON, or iCalendar exports. |
| Can I use it at my observing site? | Coordinates and an IANA timezone, or a built-in database of 570+ cities. |
The interactive dashboard includes an altitude chart and a red-text night mode. JSON output and single-event queries also work in scripts. Weather, terrain, and light pollution are not modeled; a dark window is an astronomical opportunity, not a clear-sky forecast.
With Rust and Cargo installed:
cargo install --locked solunatus
solunatus --city "Tucson"This opens the live dashboard. Press g for the Sun/Moon altitude chart, s for settings and night mode, r for reports, and q to quit.
Prefer a download? v0.6.1 provides Linux x86_64 and ARM64 archives with SHA-256 checksums. macOS and Windows users can install with Cargo. See the installation guide.
The examples using --tonight require the current main branch:
git clone https://github.com/FunKite/solunatus.git
cd solunatus
cargo install --locked --path .
solunatus --city "Tucson" --tonightLatest stable Rust is recommended; the current minimum is Rust 1.91. The minimum may increase in a future minor release.
# Coming evening through the following morning
solunatus --city "Tucson" --tonight
# Plan a trip to a particular observing site
solunatus --lat 36.24 --lon=-116.82 --tz America/Los_Angeles \
--date 2026-10-10 --tonight
# Save a machine-readable plan
solunatus --city "Tucson" --date 2026-10-10 --tonight --json > night.json--tonight prints one report and exits. It runs offline and does not save settings. The plan covers local noon on the chosen date to local noon the next day, including daylight-saving changes. Moon and planet positions are labeled with their snapshot time; the report does not imply that a planet stays up all night.
These commands also work in v0.6.1.
solunatus --city "Lisbon" --next golden-dusk-start --format human
solunatus --city "Lisbon" --next astronomical-dusk --format isosolunatus --city "Tucson" --calendar \
--calendar-start 2026-10-01 --calendar-end 2026-10-31 \
--calendar-format ics --calendar-output tucson-october.icsImport the file into a calendar app for sunrise, sunset, moonrise, moonset, and quarter lunar phases. Use --calendar-format html for a printable table or json for data.
solunatus --city "Sydney" --no-prompt
solunatus --city "Sydney" --json
solunatus --lat=-33.8688 --lon 151.2093 --tz Australia/SydneyThe dashboard and regular snapshots check network time by default. For fully offline use, set SOLUNATUS_SKIP_TIME_SYNC=1; --tonight and --next already skip that check. Optional USNO validation and AI insights require network access when explicitly used.
Solar calculations use NOAA-based methods; lunar calculations use Meeus-based methods. Planet positions use Keplerian elements with major perturbations. The repository includes JPL Horizons reference tests at three epochs spanning 1990–2049, plus scheduled planet and USNO comparisons.
These are approximations for observing and photography planning. Reference tests are specific samples, not a guarantee of uniform accuracy across all dates and locations. Near the poles, a rise/set or twilight crossing may not occur. See accuracy and verification.
[dependencies]
solunatus = "0.6.1"
chrono = "0.4"
chrono-tz = "0.10"use chrono::Local;
use chrono_tz::America::Phoenix;
use solunatus::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let site = Location::new(32.2226, -110.9747)?;
let now = Local::now().with_timezone(&Phoenix);
if let Some(sunset) = calculate_sunset(&site, &now) {
println!("Sunset: {}", sunset.format("%H:%M %Z"));
}
Ok(())
}API documentation · Runnable examples
The default build includes usno-validation and ai-insights. Core astronomy, the dashboard, and the night planner work without either:
# Published release without optional integrations
cargo install --locked solunatus --no-default-features
# Current source, including the night planner, without optional integrations
cargo install --locked --path . --no-default-featuresOptional AI insights use a local Ollama server; they are not needed for any calculation. The optional parallel feature accelerates multi-day calendar generation.
Settings live in ~/.solunatus.json. Use --no-save to avoid saving them. Generate shell completions with solunatus --completions zsh and a man page with solunatus --manpage.
Found a timing discrepancy? Report the location, date, and comparison source. Missing something in your field workflow? Describe what you want to plan.
If Solunatus helps you plan a night out, star the repository to help other observers find it.
Feedback guide · Documentation · Changelog · Security · MIT license
cargo build --locked
./scripts/safe_local_test.sh