Icon Using the command line interface

The command line interface, tide, supports a number of modes that cannot be accessed with the interactive client. It can run without X-windows, and unlike the interactive client, it can easily be invoked from shell scripts.

The minimal usage is simply to specify a location with -l. The default mode is plain, and the default format is text:

$ tide -l "anchorage, al"
Anchorage, Alaska
61.2383° N, 149.8883° W

1998-05-31  6:42 PM AKDT   1.14 feet  Low Tide
1998-05-31 11:18 PM AKDT   Sunset
1998-06-01 12:54 AM AKDT  27.40 feet  High Tide
1998-06-01  4:35 AM AKDT   Sunrise
1998-06-01  7:17 AM AKDT   6.60 feet  Low Tide
1998-06-01 12:49 PM AKDT  23.89 feet  High Tide
1998-06-01  5:44 PM AKDT   First Quarter

The non-interactive client supports all of the command line switches related to settings which are described in a later section. In addition, it supports the following.

-b "YYYY-MM-DD HH:MM"
Specify the begin (start) time for predictions using the ISO 8601 compliant format shown above. The timestamp is in the local time zone for the location, or in UTC if the -z setting is engaged. If no -b is supplied, the current time will be used.
-e "YYYY-MM-DD HH:MM"
Specify the end (stop) time for predictions using the ISO 8601 compliant format shown above. The timestamp is in the local time zone for the location, or in UTC if the -z setting is engaged. If no -e is supplied, the end time will be set to four days after the begin time. NOTE: For graphs, the end time is determined by the TTY width and aspect, not by this switch.
-f h|p|t
Specify the output format as HTML, PNG, or text. See the modes page for legal modes and formats. The default is text.
-l "Location Name"
Specify a location for tide predictions. (Please read Important note about the -l switch.)
-m b|c|g|l|p|r|s
Specify mode to be banner, calendar, graph, list, plain, raw, or stats. See the modes page for legal modes and formats. The default is plain.
-ml [-]N.NN(ft|m|kt)
Specify the mark level to be used in predictions. The predictions will include the times when the tide level crosses the mark. Example usage: -ml -0.25ft Some subordinate stations won't take this option.
-o "filename"
Redirect output to the specified file.
-s "HH:MM"
Specify the step interval, in hours and minutes, for raw mode predictions. The default is one hour.
-v
Print version string and exit. Please note that versions marked as DEVELOPMENT versions are not really versioned; they are work in progress and will change without warning.