Here's a Python code for a command-line weather application using the OpenWeatherMap API:

Python
import requests

# Replace with your OpenWeatherMap API key
api_key = "YOUR_API_KEY"
base_url = "https://api.openweathermap.org/data/2.5/weather"

def get_weather_data(location):
  """Fetches weather data from the OpenWeatherMap API for a given location"""
  params = {
    "q": location,
    "appid": api_key,
  }
  response = requests.get(base_url, params=params)
  if response.status_code == 200:
    return response.json()
  else:
    print(f"Error: {response.status_code} - {response.text}")
    return None

def display_weather(data):
  """Presents weather information in a user-friendly format"""
  if data is None:
    return
  city = data["name"]
  temp = data["main"]["temp"] - 273.15  # Convert Kelvin to Celsius
  humidity = data["main"]["humidity"]
  wind_speed = data["wind"]["speed"]
  print(f"Weather in {city}:")
  print(f"  Temperature: {temp:.2f} °C")
  print(f"  Humidity: {humidity}%")
  print(f"  Wind Speed: {wind_speed} m/s")

def main():
  """Main program loop for user interaction"""
  while True:
    location = input("Enter a city name or zip code: ")
    weather_data = get_weather_data(location)
    display_weather(weather_data)
    play_again = input("Do you want to check another location? (yes/no): ")
    if play_again.lower() != "yes":
      break

if __name__ == "__main__":
  main()

print("Thanks for using the weather app!")