The many updates of TeamForge CLI v1.1
When I first created a Command Line Interface (CLI) to TeamForge almost 2 years ago it was something of a pet project. An experiment to see how easy it would be to create a more developer-friendly tool to interact with TeamForge. It very quickly became rather popular in our small inner circle, even though its usefulness was rather limited and it was something of a… well, let’s be nice and say proof of concept.
Then, last year I started to hear more demand for things the CLI had the potential of making easy, but given the early nature of the first version some of the things I wanted it to do I found would be hard to code in that version. And thus began work to create a completely new CLI. The first version was released back on December 15th. In short order it became rather popular, with features like project navigation, external editing, saved filters, upload/download, task automation, report writing, easy access to the TeamForge SOAP API including API documentation and much more.
Since that initial release I’ve been inundated with questions of, “how can I do this?”, or “does it do x?” We’ve come up with some nifty reports and utilities as simple CLI scripts. For example, we wrote a cross project dashboard, a closure rate line graph, a rough site-wide statistics report, a document manager mirroring tool and even a small script to delete a project piece by piece.
Out of all of this a number of potential new features made themselves apparent. And as of Version 1.1 of the CLI ( released yesterday ), almost all of those new features are now available. Here are some of the more notable improvements:
Template Engine – This is the ability to define a layout in a text file format of your choosing, and have the CLI gather relevant data from TeamForge and merge it into your template. I used this feature to create a mashup with a Google line graph tool and generate an artifact closure rate chart and then post that graph to a TeamForge project page.
Temporary Filters – When writing scripts with the CLI we found we often need to be able to define a filter that existed just for the duration of the script. So now in 1.1 there is a new tmpfilter command just for that purpose. Filter support is also expanded to task and commit filters.
Importing CSV Files – A great feature in the 1.0 CLI was the ability to export most anything from a TeamForge site into a CSV file. With 1.1 you can now import from a CSV file and then work with that data in the CLI. For example, mass creation of user accounts, planning folders or even updating existing objects.
Much More – The list is much longer but here is the short version: if/do/else/done, for ITEM in range, copy/merge objects, list field selection, output to tempfiles, versioncheck, silent running, jump to local files. The longer version is here: https://ctf.open.collab.net/sf/go/topc5835
And of course all the new commands are documented in our CLI Reference Guide.
The CLI, because it makes accessing and using the TeamForge API easier, opens up a whole new world of automation, reporting and simplified interaction with TeamForge. In the coming weeks I’ll be posting more examples of things you can do with the CLI. In the meantime, go ahead and download the CLI and let us know what you think and if you find any clever uses for it.