Pricing Data Management
ExpressoTS CLI provides cloud cost estimation with dynamic pricing data that can be updated independently from the CLI. This ensures pricing information is always current without requiring CLI updates.
Overview
The pricing system features:
- Dynamic Pricing Data: Fetched from remote sources
- Multiple Sources: API, Remote JSON, and Local overrides
- Cascading Fallback: Ensures pricing is always available
- Community Updates: Anyone can submit pricing corrections
- Automatic Caching: 6-hour cache for performance
- Offline Support: Works without internet connection
Pricing Sources
Pricing data is fetched with cascading fallback:
- API Source - ExpressoTS Pricing API (planned)
- Remote JSON - GitHub-hosted pricing file
- Local Override - User's custom pricing (
~/.expressots/pricing.json) - Embedded Fallback - Built into CLI
This ensures you always get the most up-to-date pricing while maintaining offline functionality.
Cost Estimation Commands
Estimate Costs for a Provider
# Estimate for specific provider
expressots costs estimate aws
# With custom resources
expressots costs estimate aws \
--instances 2 \
--cpu 2 \
--memory 4 \
--storage 50 \
--bandwidth 500
Options:
--instances- Number of instances/replicas--cpu- CPU cores per instance--memory- Memory in GB per instance--storage- Storage in GB--bandwidth- Monthly bandwidth in GB--hours- Running hours per month (default: 720)
Compare Costs Across Providers
# Compare all providers
expressots costs compare
# With specific configuration
expressots costs compare \
--cpu 2 \
--memory 4 \
--storage 50
# Export as JSON
expressots costs compare --format json
# Save to file
expressots costs compare --output costs.json
Output shows providers sorted by cost (cheapest first):
Provider Service Monthly Cost Rank
--------------------------------------------------------
Fly Machines $15.23 Best
Railway Web Service $18.50 +$3.27
Render Web Service $21.00 +$5.77
GCP Cloud Run $24.80 +$9.57
...
Get Cost Optimization Recommendations
expressots costs optimize
Provides recommendations for:
- Right-sizing instances
- Using auto-scaling
- Reserved instances
- Spot/preemptible instances
- Storage optimization
- Provider migration savings
Show Pricing Details
# Show all provider pricing
expressots costs pricing
# Show specific provider
expressots costs pricing aws
Displays:
- Service name
- Pricing model (per-hour, per-month, usage)
- CPU, memory, storage, bandwidth costs
- Free tier information
- Data source and last verification date
Managing Pricing Data
Update Pricing Data
Fetch the latest pricing from remote sources:
expressots costs update
This command:
- Clears the local cache
- Fetches from API (if available)
- Falls back to Remote JSON
- Caches for 6 hours
- Shows update status and source
Show Pricing Information
expressots costs info
Displays:
- Pricing data version
- Last update timestamp
- Data source (api/remote/local)
- Cache age
- Available providers
Custom Pricing File
Create a local pricing override:
# Create custom pricing file
mkdir -p ~/.expressots
nano ~/.expressots/pricing.json
File format:
{
"version": "1.0.0",
"updated": "2026-01-15T00:00:00Z",
"providers": {
"aws": {
"serviceName": "ECS Fargate",
"model": "per-hour",
"basePrice": 0,
"cpuPerHour": 0.04048,
"memoryPerGbHour": 0.004445,
"storagePerGb": 0.10,
"bandwidthPerGb": 0.09,
"freeBandwidth": 100,
"notes": "Custom pricing for us-west-2"
}
}
}
The CLI will automatically use your custom file when available.
Supported Cloud Providers
AWS (Amazon Web Services)
Service: ECS Fargate
Model: Per-hour
Best for: Enterprise, high-scale applications
expressots costs estimate aws
GCP (Google Cloud Platform)
Service: Cloud Run
Model: Per-hour (scales to zero)
Best for: Serverless, variable workloads
expressots costs estimate gcp
Azure
Service: Container Apps
Model: Per-hour
Best for: Enterprise, Microsoft ecosystem
expressots costs estimate azure
Railway
Service: Web Service
Model: Usage-based
Best for: Developers, simple deployments
expressots costs estimate railway
Render
Service: Web Service
Model: Per-month
Best for: Startups, predictable pricing
expressots costs estimate render
Fly.io
Service: Machines
Model: Per-hour (scales to zero)
Best for: Edge computing, global distribution
expressots costs estimate fly
DigitalOcean
Service: App Platform
Model: Per-month
Best for: Small to medium projects
expressots costs estimate digitalocean
Heroku
Service: Eco Dyno
Model: Per-month
Best for: Rapid prototyping (expensive for production)
expressots costs estimate heroku
Contributing Pricing Updates
Process Overview
Pricing data is stored in the expressots/templates repository under cli-templates/pricing.json.
- Fork the repository
- Update pricing data with sources
- Verify from official provider websites
- Update
lastVerifieddate - Submit pull request
Example: Updating AWS Pricing
-
Visit official pricing page:
https://aws.amazon.com/fargate/pricing/ -
Update pricing.json:
{
"providers": {
"aws": {
"serviceName": "ECS Fargate",
"cpuPerHour": 0.04048,
"memoryPerGbHour": 0.004445,
"source": "https://aws.amazon.com/fargate/pricing/",
"lastVerified": "2026-01-15"
}
}
}
- Test locally:
# Use your fork
expressots templates repo set YOUR_USERNAME/templates
expressots costs update
expressots costs pricing aws
- Submit PR to main repository
Pricing Data Fields
Required:
serviceName- Name of the servicemodel- Pricing model: "per-hour", "per-month", or "usage"basePrice- Base monthly pricecpuPerHour- Cost per vCPU-hourmemoryPerGbHour- Cost per GB-hour of memorystoragePerGb- Cost per GB of storage per monthbandwidthPerGb- Cost per GB of bandwidthfreeBandwidth- Free bandwidth in GB
Optional:
freeCredits- Free credits for new usersnotes- Additional pricing notessource- URL to official pricing pagelastVerified- Date when pricing was last verified
Versioning
When updating pricing data:
- Patch (1.0.1): Minor price adjustments, corrections
- Minor (1.1.0): New providers added
- Major (2.0.0): Breaking changes to pricing structure
Update the version field in pricing.json:
{
"version": "1.1.0",
"updated": "2026-01-15T00:00:00Z"
}
Cost Calculation Examples
Basic Web Application
expressots costs compare \
--instances 1 \
--cpu 1 \
--memory 1 \
--storage 10 \
--bandwidth 100
Typical monthly costs:
- Fly.io: ~$5-10
- Railway: ~$10-15
- Render: ~$7-14
- GCP Cloud Run: ~$15-20
Medium Traffic Application
expressots costs compare \
--instances 2 \
--cpu 2 \
--memory 4 \
--storage 50 \
--bandwidth 500
Typical monthly costs:
- Railway: ~$35-45
- Render: ~$50-60
- GCP Cloud Run: ~$60-70
- AWS Fargate: ~$80-100
High-Scale Application
expressots costs compare \
--instances 5 \
--cpu 4 \
--memory 8 \
--storage 200 \
--bandwidth 2000
Typical monthly costs:
- AWS Fargate: ~$400-500
- GCP Cloud Run: ~$350-450
- Azure Container Apps: ~$375-475
Configuration
Pricing settings are stored in ~/.expressots/config.json:
{
"pricing": {
"sources": ["api", "remote", "local"],
"cacheTTL": 21600,
"customFile": null
}
}
Options:
sources- Array of sources to try (in order)cacheTTL- Cache time-to-live in seconds (default: 6 hours)customFile- Path to custom pricing file (overrides default location)
API Reference
Pricing Data Structure
interface PricingData {
version: string;
updated: string;
providers: {
[key: string]: ProviderPricing;
};
}
interface ProviderPricing {
serviceName: string;
model: "per-hour" | "per-month" | "usage";
basePrice: number;
cpuPerHour: number;
memoryPerGbHour: number;
storagePerGb: number;
bandwidthPerGb: number;
freeBandwidth: number;
freeCredits?: number;
notes?: string;
source?: string;
lastVerified?: string;
}
Troubleshooting
Pricing Data Not Updating
# Force update
expressots costs update
# Check current source
expressots costs info
Using Old Pricing
If you're seeing outdated pricing:
-
Clear cache:
rm ~/.expressots/cache/pricing.jsonexpressots costs update -
Check data version:
expressots costs info -
Verify source:
expressots templates status
Custom Pricing Not Loading
If your custom pricing file isn't being used:
- Check file location:
~/.expressots/pricing.json - Validate JSON: Use a JSON validator
- Check permissions: File must be readable
- Verify structure: Must match schema
# Test custom pricing
cat ~/.expressots/pricing.json
expressots costs update
expressots costs info
Best Practices
For Cost Estimation
- Use realistic resources: Match your actual usage
- Include bandwidth: Often forgotten but significant
- Consider free tiers: Factor in free credits
- Account for scaling: Estimate peak usage, not average
- Compare regularly: Prices change frequently
For Pricing Contributors
- Verify from official sources: Always link to pricing page
- Use consistent regions: Prefer US East/West for comparisons
- Update regularly: Set reminders to check quarterly
- Document assumptions: Note what's included/excluded
- Test calculations: Verify estimates match provider calculators
Examples
Find Cheapest Provider for Your App
# Your app specs
expressots costs compare \
--instances 2 \
--cpu 2 \
--memory 4 \
--storage 50 \
--bandwidth 500 \
--format json > costs.json
# View in order
cat costs.json | jq 'sort_by(.monthlyCost)'
Calculate Migration Savings
# Current Heroku cost
expressots costs estimate heroku --instances 4
# Compare alternatives
expressots costs compare --instances 4
# Get recommendations
expressots costs optimize
Budget Planning
# Export comparison for spreadsheet
expressots costs compare --format json > budget.json
# Or markdown for documentation
expressots costs compare --format markdown > budget.md
Related Commands
expressots templates- Template managementexpressots migrate- Migration guidesexpressots containerize- Container configurations