Whenever I've raised the issue with other developers they've been open to the idea, but to be perfectly honest I have no idea how you'd even go about starting something like that.
As with everything else hackers do, the way to learn would be to just do. If I were to do it, I'd start with a website and an outreach campaign. Sign people up to a mailing list, then create a membership structure and dues. Set some goals, and put governing procedures in place. Some endorsements from existing outfits like YCombinator itself and more traditional unions would help.
Eventually once you have enough money, you can create professional certification bodies. This is when you can really start ramping up your dues because then you'll be solving an actual industry problem. You could probably take a lot of money from big tech companies to help you out here once you're established.