7 ms·
Show HN: ppl - The Command Line Address Book
- h2s 14y agoThis has been my side project for the last month or so. It's a "scratch your own itch" type of deal, because I wanted a CLI address book and there didn't seem to be one. I tried really hard to find an existing one, but I'd be interested to hear if I messed up and accidentally reinvented the wheel.
- jondot 14y agoLooks great! Reminds me of when I built Logbook - store notes on Gists from CLI. The mindset is amazingly the same :) Though I offloaded most of the CLI processing to Thor, and didn't build Command/CLI abstraction into it. You might even find it useful: https://github.com/jondot/logbook https://github.com/jondot/logbook
- StavrosK 14y agoI like it! Can't say I have much use for it, but it's nice.
- telemachos 14y agoThere's abook[1], but yours seems different in design. (Main difference at a glance: Yours doesn't work on captured interface. So in that sense, yours is more Unixy.) One nice thing about abook is that it integrates nicely with mutt (which I see someone has already asked you about and you're working on). One thing that might be nice would be an abook to ppl exporter. abook saves its information in a flat file at ~/.abook/addressbook with items like the following: # abook addressbook file [format] program=abook version=0.5.6 [0] name=Someone Somewhere email=someone.somewhere@gmail.com [1] name=Another Person email=another_person@yahoo.com nick=Another [3] name=Detailed Somebody email=somebody@details.org address=2222 Main Street city=New Somewhere state=NY zip=10011 phone=212-111-1111 nick=person notes=Birthday May 14th It shouldn't be too hard to convert that, but I'm not sure (yet) about how you're storing information. (You mention vcard, but I'm not familiar with the details of that.) [1]: http://abook.sourceforge.net/ http://abook.sourceforge.net/
- tammer 14y agoI entirely concur. abook is great, but I've always wanted something that worked a bit more like this project. Great work!
- h2s 14y agoYou have described exactly the two things about abook that have always put me off using it and drove me to build this. The ncurses UI works well but isn't what I want, and the "Yet Another File Format" addressbook format isn't very interoperable. You're right that an exporter shouldn't be hard to build. Might get on that once some bugs and other features are out of the way!
- telemachos 14y agoOne issue that will come up with any exporter: abook can handle multiple entries for each category, and (I think?) ppl can't yet. So, at the moment, I'm not sure there's a way to export without losing some information. Anyhow, I will definitely keep an eye on ppl. Looks like a very good start.
- engtech 14y agoawk script to convert abook to vcf vcard (found with a search, haven't tried it out) http://blog.karssen.org/2010/05/24/script-that-converts-a-squirrelmail-address-book-to-vcf-format/ http://blog.karssen.org/2010/05/24/script-that-converts-a-sq...
- antihero 14y agoDoes it sync with Google contacts/my phone?
- chalst 14y agoNo. See https://github.com/h2s/ppl/issues/5 https://github.com/h2s/ppl/issues/5 The semantics of contact data exposed via the Contacts API is supposed to be quite close to vcard, which would make pushing data from Google Contacts to your Git vcard repository reasonably easy, but the other way could be hairy.
- chanux 14y agoThank you for this. abook had something not right about it. This seems to have made contact management in CLI simple an amazing.
- n0nick 14y agoLooks very cute, and might be useful (not having to leave the terminal is always good), but I think I speak for many others saying that I don't want to start a new address book from scratch, let alone one that won't sync into my other devices. So my suggestion for the killer feature here is an ability to sync with some major service provider such as iCloud or Google (preferably both / some standard protocol?). I'd love to help the development of such a feature.
- h2s 14y agoVery cool idea. It would probably be 100x more useful if it was easy to sync with other address books, I think I agree with you there. Perhaps this should be a priority. And any help you can give would be most welcome. I think the reason I didn't find starting a new address book from scratch to be a problem for my own "itch" is that the previous non-existence of a CLI address book had always prevented me from building up any decent amount of data in any other place!
- n0nick 14y agoCool, I'll open an issue on GitHub and I hope I'll have time to do some research for this over this weekend or the next one.
- udp 14y agoNice - and not just for us CLI buffs. This would make a very good backend for a GUI address book application.
- 7h0ma5 14y agoAn interface to mutt would be awesome. http://www.mutt.org/doc/manual/manual-4.html#ss4.5 http://www.mutt.org/doc/manual/manual-4.html#ss4.5
- h2s 14y agoAgreed, and this shouldn't be too difficult to do either. Watch this space: https://github.com/h2s/ppl/tree/mutt https://github.com/h2s/ppl/tree/mutt
- koralatov 14y agoBeat me to it; I was going to suggest exactly that. Keeping everything in one place, accessible via the shell, would be perfect, and this looks less awkward than maintaining a separate aliases file.
- h2s 14y agoIt's in! http://ppladdressbook.org/documentation/commands/mutt/ http://ppladdressbook.org/documentation/commands/mutt/ Thanks for the suggestion. The link was helpful because I could tell in moments how easy it would be to get started with this.
- asveikau 14y agoIs it me or was that some pretty fast turnaround? Kudos to you, sir.
- mehulkar 14y agoMaybe too much, but how about a `txt` or `email` command to send short messages to contacts?
- bussetta 14y agoAnyone facing this issue? "ERROR: While executing gem ... (NoMethodError) undefined method `call' for nil:NilClass"
- h2s 14y agoNobody's reported this one yet! There's a bug tracker at https://github.com/h2s/ppl/issues/new https://github.com/h2s/ppl/issues/new if you're feeling generous with your time. I could do with knowing what command you're running, what version of Ruby you're on, and whether you're running it inside an initialized address book repo. Sorry about the bug by the way :(
- bussetta 14y agoThanks! More than happy to try it out. :) I'll get the details in the bug tracker. Thanks again!
- lloeki 14y agoOf interest to me: split front-end and back-end, then interface with Contacts.app on Mac via AppleScript, whose dictionary of actions is similar but obtuse to use directly.
- skram 14y agoAgreed. I'd use this in an instant if it would read from my Mac Address Book which syncs w/ iCloud and all my devices (as well as corporate Exchange server)
- ing33k 14y agovery cool thing .. I will start using it
- knes 14y agoTo search my adress book without leaving the keyboard I use Alfred app[1] ( on Mac ). It is a god send. [1]http://www.alfredapp.com/ http://www.alfredapp.com/
- klibertp 14y agoNow I'm wondering why didn't I do this... The "address book" app is an equivalent of hello world for me when I'm starting to learn some language. I probably implemented some kind of address book in, like, 9 different languages (the first one in QBasic :)) now? All CLI driven, of course. I guess I never had enough of contacts to put in there to notice its usefulness. Kind of sad, actually.
- glogla 14y agoNice work. The page is giving me kind of cognitive dissonance, because it looks very startupy, and I would expect something about pricing, free plans, connection to facebook, or links to Android and iOS app store ... but this is an honest to god, desktop command line application.
- nicky0 14y agoThere seems to be no command for adding the contact's postal address.
- h2s 14y agoNope, not yet. But it's easy to add and will be in there soon enough. In fact it's already listed in the roadmap at http://ppladdressbook.org/development/roadmap/ http://ppladdressbook.org/development/roadmap/!
- h2s 14y agoIt's in now! http://ppladdressbook.org/documentation/commands/post/ http://ppladdressbook.org/documentation/commands/post/
- strawberrysauce 14y agolooks awesome.. which bootstrap theme is this?
- hxseven 14y agoThe URL of the bootstap CSS file indicates that it is flatstrap: http://littlesparkvt.com/flatstrap/ http://littlesparkvt.com/flatstrap/
- strawberrysauce 14y agoi did take a look at it, but they look quite different... has he customized flatstrap? or is it some out of the box theme? basically, where did 2.css come from?
- h2s 14y agoYeah I customised flatstrap (colors and fonts mainly). 2.css is part of the little CSS build process I came up with for this site. There are a bunch of LESS files in a directory (https://github.com/h2s/ppladdressbook.org/tree/master/_stylesheets/ppl https://github.com/h2s/ppladdressbook.org/tree/master/_style...). Then there's a rake task to build them into {{site.version}}.css. This means I can update the CSS, bump the version number, run jekyll, and push the changes live being certain that there won't be any annoying caching issues stopping people from getting the updated CSS.
- strawberrysauce 14y agonice! n thanks..
- poiuisdfkjhdsf 14y agoThe unique identifier should be optional (after all, people already have pretty unique-enough identifier).
- keithpeter 14y agoLike others, I am impressed with this app and the fact it is written for the command line. As the author is posting here: why using ruby, a language which seems to be missing from many Linux distributions and which needs to be installed. Why not C or Python or Perl? Present everywhere?
- h2s 14y agoI thought about this a bit. I considered using C, but decided against it in the end. C lost out because I wanted to use this project as an opportunity to try out full-on TDD, and C's automated testing tools seemed like a pain. I also wanted to build something that I could release relatively quickly to validate the idea. Not to mention my eagerness to be able to use it for my own address book needs. I'm not very experienced with C so it probably would have taken me six months to get to this point instead of one. As it stands, the main downside has been that I've encountered a lot of Rubygems-related woes resulting from the choice. Some earlier versions of Ruby are still very commonly installed on peoples' computers and don't work with ppl because they lack certain methods. I'd rather that than another five months of the app not even existing. I wouldn't be averse to a C port, if the stars aligned just right so that it was both necessary and possible. For now I'm hoping Ruby will suffice!
- omaranto 14y agoIt would probably be much easier to port to Perl or Python than to C. I think both Perl and Python are already installed on enough computers that no-one would have commented on the issue, unlike what happened with Ruby.
- andrewcooke 14y agoit seems like this could be generalised to arbitrary rdf triples in some way and used as an interface to a general graph of information. have you considered something like that? it seems like it would start to get complex when you need to distinguish between nodes with the same name...
- v33ra 14y agoI don't get the 'decentralized' part. Can I do a pull/push-like commands to a different repo from this app?
- h2s 14y agoIt uses git, so you can keep your address book on as many different computers as you want and use commands such as "git push" and "git pull" to handle the synchronisation. There are no built in "ppl push" commands or anything like that at the moment. I was wary of tempting YAGNI and the inner platform effect until some valid use case becomes clear.
- shad0wfax 14y agoReally nice! I can Create a remote repo on Dropbox and have a cloud based service :)
- keithpeter 14y agohttp://onethingwell.org/post/457674798/a-poor-mans-notational-velocity http://onethingwell.org/post/457674798/a-poor-mans-notationa... You can do that easily enough with bash :-)
- tucosan 14y agoVery nice. But how would i get my existing contacts into ppl? Typing them all in would be a chore. An import function bout be quite neat to make a transition from other addressbooks feasible.
- _glass 14y agoFor a short while I was using grep and a text file as an address book mostly because like this I could easily add in free form. The reason why I switched to a AddressBook.app and Google Contacts solution is the synchronization.
- contingencies 14y agoThings I like are codename-per-contact and the fact that there's a command line tool supplied with exit codes. I don't like almost everything else, including the syntax ('ppl phone alice 12345' feels icky and against-the-grain to me), the use of (slow?, and) dependency-heavy git, the redefinition of on-disk format, the lack of formal data-description, the lack of customization for such, trying to do more than one thing well (versioning/diffing/merging/branching = git's job, not yours... keep that out of scope), the lack of meaningful, nontrivial use cases. (What problem does this solve, in the real world, except your itch? If you'd included GPG key, included autopopulation support based on directory lookups or some mature script system, helped people migrate contacts off Gmail and in to private git-based cloud hosting with hooks to preload their FirefoxOS beta with privacy-enhanced contact solution, I would have been more impressed) Why not do something different like 'ppl alice --phone=12345' (set) and 'ppl alice --phone' or 'ppl phone <alice' or 'ppl -f %phone <alice' (get). In general taking input via pipes is better than adding mandatory arguments. Better yet, stuff the command line syntax thinking entirely for the moment and focus on JSON. Spec the JSON Schema instead of the interface to it, focusing on data, and how it might differ in different use cases / environments (eg. countries). Some argue that if you get your understanding of the data right, the program is right. By way of contrast, right now I suspect a lot of the hassle of such a program is going to be things like (0) trying to do too many things, succeeding at none of them (1) yet another definition of what a phone number, address, etc. is that is not going to work for everyone (2) some developer second-guessing what i, the user, want or have to accept in terms of duplicate input, normalization, whitespace significance, etc. (3) non-i18n interface (4) let me smoke my unixpipe, dammit! I dunno, I'm just playing devil's advocate, but there's probably some value in that rant.
- HugoDias 14y agoThere are some way to access this data with any programming language? like phyton or ruby ? Very interesting..
- MortenK 14y agoVery nice work, congrats on the release