It's also possible to fetch the HTML for user badges.
The users page is doing XMLhttpRequests to update the list of users as you type. You can use it to just get the information for one user at a time.
curl -F filter="username_in_lowercase" https://stackoverflow.com/users/browser-filter
eg:
curl -F filter="sam hasler" https://stackoverflow.com/users/browser-filter
returns:
<table style="width:940px; margin-left:20px; margin-top:-10px;">
<tr>
<td>
<div class="user-info">
<div class="user-action-time"><br /></div>
<div class="user-gravatar32"><a href="/users/2541/sam-hasler"><img src="http://www.gravatar.com/avatar/5377323bbe24824de512a6a077fc77a3?s=32&d=identicon&r=PG" height=32 width=32 /></a></div>
<div class="user-details"><a href="/users/2541/sam-hasler">Sam Hasler</a><br/><span class="reputation-score" title="reputation score">3,289</span><span title="5 silver badge(s)"><span class="badge2">●</span><span class="badgecount">5</span></span><span title="21 bronze badge(s)"><span class="badge3">●</span><span class="badgecount">21</span></span></div>
</div>
</tr>
</table>
<div style="float:right; margin-bottom:20px;">
<div class="pager">
</div>
</div>
If you want to know your rep and badge count from the command line just use this:
curl -s -F filter="username in lowercase" https://stackoverflow.com/users/browser-filter | grep reputation-score | sed -e "s/<[^>]*>/ /g;s/●//g"
Currently for me this gives the output:
Sam Hasler 3,289 5 21