Skip to content

Core Features and Use Cases

Authentication

Secure OAuth2 Flow

The CLI tool implements a secure OAuth2 authentication flow with Strava:

  1. Initial Authentication

    • Run strava login to start the authentication process
    • A browser window opens for Strava authorization
    • After authorization, tokens are securely stored in your system keychain
  2. Token Management

    • Access tokens are automatically refreshed when expired
    • Tokens are stored securely using the system keychain
    • Run strava logout to clear stored tokens

Use Cases

  • First-time Setup: New users can quickly authenticate with their Strava account
  • Token Refresh: Seamless token refresh without user intervention
  • Security: Secure token storage prevents unauthorized access

Activity Management

Viewing Activities

bash
# List recent activities
strava activities

# Get latest activity
strava latest

# View activities with custom formatting
strava activities --format json

Creating Activities

The create command provides an interactive interface:

  1. Time Input

    • Choose between start or end time
    • Flexible time input formats
    • Automatic timezone handling
  2. Activity Details

    • Distance input in kilometers or miles
    • Speed calculations
    • Sport type selection
    • Activity name and description
  3. Bike Selection

    • Manual bike selection for rides
    • Support for multiple bikes
    • Basic bike type matching

Use Cases

  • Manual Entry: Create activities for workouts not tracked by devices
  • Correction: Fix incorrect activities from other devices
  • Planning: Pre-plan activities for future dates
  • Bulk Creation: Create multiple activities in sequence

Bike Integration

Bike Selection

The tool provides basic bike selection functionality:

  1. Activity Type Detection

    • Road rides
    • Mountain bike rides
    • Gravel rides
    • Commute rides
  2. Bike Management

    • List of registered bikes
    • Manual bike selection
    • Support for multiple bikes

Use Cases

  • Commute Tracking: Select appropriate bike for commute rides
  • Training Rides: Choose bike for training activities
  • Multi-bike Setup: Manage activities across multiple bikes

Offline Support

Creating Activities Offline

The tool allows you to create activities without an internet connection:

  1. Local Storage

    • Activities are stored locally
    • Automatic sync when online
    • Conflict resolution
  2. Data Validation

    • Local validation of activity data
    • Error prevention
    • Data consistency checks

Use Cases

  • Remote Areas: Create activities without internet access
  • Travel: Plan activities while traveling
  • Backup: Local backup of activity data

Privacy and Security

Activity Privacy

  • Default privacy settings for manual entries
  • Basic visibility options
  • Secure data handling

Use Cases

  • Private Activities: Create activities with restricted visibility
  • Public Sharing: Share specific activities publicly
  • Data Protection: Secure handling of sensitive information

Best Practices

Activity Creation

  1. Time Management

    • Use end time for activities with known duration
    • Use start time for activities with known start
    • Consider timezone differences
  2. Data Accuracy

    • Double-check distance and speed calculations
    • Verify bike selection
    • Review activity details before submission
  3. Privacy Considerations

    • Review privacy settings
    • Consider activity visibility
    • Protect sensitive information

Use Cases

  • Training Log: Maintain accurate training records
  • Social Sharing: Share appropriate activities
  • Data Analysis: Ensure data quality for analysis

Current Limitations

  1. Bike Integration

    • Basic bike selection without smart recommendations
    • Manual bike type matching
    • No automatic bike suggestions based on activity type
  2. Privacy Settings

    • Limited privacy options due to API restrictions
    • Some visibility settings not available through the API
    • Basic privacy controls only
  3. Activity Management

    • No bulk editing capabilities
    • Limited activity modification options
    • Basic activity type support