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.
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
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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes using Conventional Commits
- Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- AM4 Helper - Data source
- Rich - Terminal UI framework
- Typer - CLI framework
Related Projects
- AM4 Helper - Web-based AM4 tools
- AM4 Bot - Discord bot for AM4
Support
If you encounter any issues or have questions:
Sources
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77426d04e891d89c6d1cb4e77264c9b15c5de7eaf340d18f95d82626cd60b7ee
|
|
| MD5 |
f134956eacb1f7d5aad598bed9df6cc1
|
|
| BLAKE2b-256 |
e076070fb43bbaec398df7fabeb4421615a485e4f7f84df6a4626d9122081da8
|
Provenance
The following attestation bundles were made for am4_prices-0.1.0.tar.gz:
Publisher:
release-pipeline.yml on barcister/am4-helper-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
am4_prices-0.1.0.tar.gz -
Subject digest:
77426d04e891d89c6d1cb4e77264c9b15c5de7eaf340d18f95d82626cd60b7ee - Sigstore transparency entry: 836730602
- Sigstore integration time:
-
Permalink:
barcister/am4-helper-cli@19088da88c6619fbdfb71293b704c8f833eb58a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/barcister
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pipeline.yml@19088da88c6619fbdfb71293b704c8f833eb58a7 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d987d2d8344ce2f25d6b88e8523c6c8b77db21b0ca8ab9187082ee885142d412
|
|
| MD5 |
33466343db2e80076249d58feb35f22f
|
|
| BLAKE2b-256 |
ab05d50364b1459233dc4c7313747cf6e161419acdf5e514ee3bf6b3b0d5106e
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
am4_prices-0.1.0-py3-none-any.whl -
Subject digest:
d987d2d8344ce2f25d6b88e8523c6c8b77db21b0ca8ab9187082ee885142d412 - Sigstore transparency entry: 836730675
- Sigstore integration time:
-
Permalink:
barcister/am4-helper-cli@19088da88c6619fbdfb71293b704c8f833eb58a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/barcister
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pipeline.yml@19088da88c6619fbdfb71293b704c8f833eb58a7 -
Trigger Event:
workflow_dispatch
-
Statement type: