Skip to main content

A sleek CLI client for Airline Manager 4 Fuel/CO2 prices

Project description

AM4 Prices ✈️

A sleek Terminal UI (TUI) client for displaying current and upcoming Fuel/CO2 prices in Airline Manager 4.

CI PyPI Python Version License

Features

  • 🎨 Beautiful TUI - Rich terminal interface with color-coded prices
  • 📊 Real-time Data - Fetches current fuel and CO2 prices from AM4 Helper database
  • 📈 Price Forecasting - Shows upcoming prices for the next 5 hours
  • Watch Mode - Auto-refresh prices at custom intervals
  • 🎯 Smart Indicators - Color-coded prices based on optimal buying ranges
  • 🔧 Configurable - Support for custom API endpoints and day selection
  • 🚀 Raycast Integration - Use directly from Raycast on macOS (see raycast/README.md)

Installation

Homebrew (macOS/Linux)

# Install directly from formula URL
brew install https://raw.githubusercontent.com/barcister/am4-helper-cli/main/Formula/am4-prices.rb

Or with tap (requires separate homebrew-am4-helper-cli repository):

brew tap barcister/am4-helper-cli
brew install am4-prices

pip

pip install am4-prices

pipx (Recommended)

pipx install am4-prices

Raycast (macOS)

Use AM4 Prices directly from Raycast with two options:

Option 1: Script Commands (Quick & Simple)

# After installing the CLI, copy scripts to Raycast
cp raycast/*.sh ~/Library/Application\ Support/Raycast/Scripts/

Option 2: Full Extension (Rich UI & Features)

cd raycast-extension
npm install && npm run build
# Then add to Raycast via Settings → Extensions

See RAYCAST.md for detailed comparison and setup guides.

From Source

git clone https://github.com/barcister/am4-helper-cli.git
cd am4-helper-cli
pip install .

Usage

Show Current Prices

Display current and upcoming prices:

am4-prices show

Show Prices for Specific Day

am4-prices show --day 15

Watch Mode (Auto-refresh)

Watch prices with automatic refresh every 60 seconds:

am4-prices watch

Custom refresh interval (in seconds):

am4-prices watch --interval 30

Custom API URL

Use a custom data source:

am4-prices show --url https://example.com/prices.json

⏰ Important: Timezone Handling

All price timestamps in AM4 are in UTC (indicated by the 'Z' suffix). The CLI automatically:

  • Uses UTC time to match current prices
  • Displays all times in UTC format
  • Correctly handles upcoming prices regardless of your local timezone

Example: If you're in EST (UTC-5) at 10:00 AM local time, the CLI shows prices for 15:00 UTC (3:00 PM UTC), which is the correct current time in the game.

No configuration needed - it just works! ✨

Price Guide

The TUI uses color coding to help you identify good buying opportunities:

Fuel Prices

  • 🟢 Green (Good): < $550
  • 🟡 Yellow (OK): $550-800
  • 🔴 Red (High): > $800

CO2 Prices

  • 🟢 Green (Good): < $130
  • 🟡 Yellow (OK): $130-150
  • 🔴 Red (High): > $150

Screenshots

AM4 Prices TUI

Development

Setup Development Environment

# Clone repository
git clone https://github.com/barcister/am4-helper-cli.git
cd am4-helper-cli

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -e ".[dev]"

Run Tests

pytest

Code Formatting

ruff format .
ruff check --fix .

Type Checking

mypy src/am4_prices

Data Source

Price data is sourced from the AM4 Helper project, which maintains a comprehensive database of historical and forecasted fuel/CO2 prices for Airline Manager 4.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes using Conventional Commits
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Related Projects

Support

If you encounter any issues or have questions:

Sources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

am4_prices-0.1.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

am4_prices-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file am4_prices-0.1.0.tar.gz.

File metadata

  • Download URL: am4_prices-0.1.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for am4_prices-0.1.0.tar.gz
Algorithm Hash digest
SHA256 77426d04e891d89c6d1cb4e77264c9b15c5de7eaf340d18f95d82626cd60b7ee
MD5 f134956eacb1f7d5aad598bed9df6cc1
BLAKE2b-256 e076070fb43bbaec398df7fabeb4421615a485e4f7f84df6a4626d9122081da8

See more details on using hashes here.

Provenance

The following attestation bundles were made for am4_prices-0.1.0.tar.gz:

Publisher: release-pipeline.yml on barcister/am4-helper-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file am4_prices-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: am4_prices-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for am4_prices-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d987d2d8344ce2f25d6b88e8523c6c8b77db21b0ca8ab9187082ee885142d412
MD5 33466343db2e80076249d58feb35f22f
BLAKE2b-256 ab05d50364b1459233dc4c7313747cf6e161419acdf5e514ee3bf6b3b0d5106e

See more details on using hashes here.

Provenance

The following attestation bundles were made for am4_prices-0.1.0-py3-none-any.whl:

Publisher: release-pipeline.yml on barcister/am4-helper-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page