There was pressure for Ireland to declare war after the US did, but DeValera refused.
A token declaration of war could have sufficed (similar to what many Latin American nations did, or what Turkey did in 1945). Dev could have agreed that US planes be based in Ireland for ASW patrols, but asked for the British to not do it. He could also make it known that those Irish who wanted to, could enlist in the US or UK armies and fight the Germans. But he could have also made a distinction like the Australians did between a volunteer expeditionary force that could fight overseas (which would be the enlist in the other power's military option), and a home force which would only fight if Ireland was invaded (the regular Irish army). That could have kept the Irish army at home and not engaged in any overseas fighting.
That would have been the least costly option politically, and it would have paid off big postwar (US economic aid plus return of the Six Counties to the Free State). The only cost to Ireland would have been slightly higher casualties if Irish ships close to home were sunk by U-Boats, and perhaps a great percentage of Irish serving in overseas armies and thus higher casualties. The first could be mitigated by a prudent countdown to becoming a belligerent (such as warn all Irish in Europe that they should return home some weeks before DoW, suspend boats leaving harbor 24-48 hours before DoW), and the second would be outside his control anyway.
In hindsight, this probably would have been the best option.