Keelung's train station's South & North Terminal area is a good place to start any tour on your own. From your ship, it's an interesting ten-minute walk along the waterfront. After passing by Starbucks and the local bus stops, cross the road and to the right, you'll find the "hop-on / hop-off" Tourist Bus T99 in front of the Keelung Tourist Information office which sells the tickets inside. Day tickets are NT 50 per route direction for a round trip.
So for NT 50-100, or NT150, you can travel all along the Keelung coast. Buy your ticket at the Keelung Visitor Information center at Gangxi street, where the bus originates. First go West between Keelung-Yehliu and then East from Keelung-Ruifang- and as far as Fulong beach, and back. The T99 bus (same number for both directions and routes) drops you off at the Maritime Plaza within sight of your ship, as do many of the regular buses.
Go West first ! to Yehliu, to see the Queen's head at the Geopark, which already opens at 08:30. Check out the Dawulun area stops for a hike. Then return to Keelung, have lunch in the night market; the food stalls are always open, 24/7 at Ren 3rd road.
If you want to see similar hoodoo rocks without the crowds, check out Keelung's Peace island (Heping Dao park) by Keelung bus 101.
When coming from the East wharves 2-3, start across from the "K" Hotel at Yi 1st road, the stop in front of the 7-Eleven.
If you're at East 4: first, cross the road toward the Evergreen hotel, continue along Xin 5th road to the bus stop at the intersection with Yi 1st road.
When coming from West 2-3-4, start at the Keelung City bus station, next to the OCAM museum. Just drop NT15 into the cash box, get off after some 20 minutes at the furthest point of the loop line at the stop called Heping Island Park. Except it is not in the park: still walk for 7 minutes.
Taxis are cheap, flag one down on the main roads near your ship and pay around NT 200/300 (by the meter) for 4 passengers. Starting fare NT 70.
Go East and travel along the coast to Ruifang train station. Switch to the Gold Fulong shuttle bus if you want to go much further along the coast to Fulong beach (a one hour trip each way if you have the time) and pass by Jiufen Old Street, Jinguashi Gold Museum, Golden Waterfall. Buy your NT50 ticket at the OKmart convenience store next to the Ruifang train station square.
If Jiufen or Jinguashi is your destination then take local bus 788 from Ruifang which goes through Jiufen and ends in Jinguashi and passes by the Gold Museum. Most shops open by 11 am - so this is a good route for the afternoon until sunset. You can take the 788 bus all the way back from Jiufen to the Keelung night market stop, next and final stop is Maritime Plaza.
The cost for 'two sections' on a regular bus is NT 30, the route takes about 50 minutes. Higher frequency (15-20 minutes), but more stops on this local commuter alternative. It follows that you could take the 788 (same number) from Keelung via Ruifang to Jiufen, but you might have to stand part of the way on winding roads depending on the hour of travel for a local experience. The circular bus route starts at the foot of the old blue pedestrian bridge: Keelung station, Renxiang clinic stop - look for Family Mart. This will offer you a fair chance at a seat. For East wharves, the closest stop "City Government" is next to Starbucks on Yi 1st road.
On the plus side: the T99 bus will save you time as it only stops at our area's interesting tourist spots, which are otherwise hard to reach. I have marked them in orange (West), purple (East) and gold (To Fulong) on my map.
On the minus side, it is a chicken and egg story: current low demand versus low frequency (and the fact that the East route does not reach Jiufen anymore) - so you must time your visits, or fill the gap with a really local bus ride making many stops. In that case, you must always flag down the bus at the stop and pay the local fare of NT 15 per section. You can also travel by train from Keelung to Ruifang, but you must change trains at Badu. It's slightly faster with more seats if you catch the trains on time.
Download the 'Keelung Bus Timetable' app to your mobile device to help you keep an eye on the buses and places around you.