Skip to content

Advanced Usage

This guide covers advanced usage patterns, complex workflows, and best practices for using the Atom CLI effectively.

Automated Mining Operation

Here’s an example of a complex mining operation that includes fleet preparation and resource management:

Terminal window
# 1. Load fuel and other required resources
atom exec load-cargo "MyMiningFleet" \
--resources "FUEL_MINT,fixed,1000,fuel_tank" \
--resources "AMMO_MINT,fixed,500,ammo_bank"
# 2. Undock and start mining
atom exec undock "MyMiningFleet"
atom exec start-mining "MyMiningFleet" "RESOURCE_MINT"
# 3. Monitor cargo capacity and unload when needed
atom exec unload-cargo "MyMiningFleet" \
--resources "RESOURCE_MINT,max,0,cargo_hold"

Resource Management

  1. Efficient Loading

    • Use min-and-fill mode for critical resources to ensure minimum requirements while optimizing space
    • Example: RESOURCE_MINT,min-and-fill,100,cargo_hold
  2. Cargo Pod Optimization

    • Use specialized cargo pods (fuel_tank, ammo_bank) for their intended resources
    • Keep general cargo_hold for miscellaneous items

Fleet Operations

  1. Crew Management

    • Always maintain minimum required crew for operations
    • Use --allow-unload-required-crew with caution
    • Monitor crew efficiency in different operations
  2. Movement Optimization

    • Use subwarp for short distances
    • Use warp for long-distance travel
    • Plan routes to minimize fuel consumption

Error Handling

  1. Webhook Integration

    Terminal window
    # Set up webhook for operation monitoring
    atom exec start-mining "MyFleet" "RESOURCE_MINT" \
    --webhookUrl "YOUR_WEBHOOK_URL" \
    --webhookSecret "YOUR_SECRET" \
    --contextId "mining_operation_1"
  2. Common Issues and Solutions

    • If a transaction fails, check:
      • RPC endpoint status
      • Fee settings
      • Resource availability
      • Fleet status

Batch Operations

When performing multiple operations, group them efficiently:

Terminal window
# Example of efficient batch loading
atom exec load-cargo "MyFleet" \
--resources "RESOURCE_1,fixed,100,cargo_hold" \
--resources "RESOURCE_2,fixed,200,cargo_hold" \
--resources "FUEL,fixed,500,fuel_tank" \
--mipt 5 # Optimize transaction size