Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.


cartman is unavailable in PyPM, because there aren't any builds for it in the package repositories. Click the linked icons to find out why.

 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1.2 Failed View build log
Windows (64-bit)
0.1.2 Failed View build log
Mac OS X (10.5+)
0.1.2 Failed View build log
Linux (32-bit)
0.1.2 Failed View build log
Linux (64-bit)
0.1.2 Failed View build log
ISC License (ISCL, BSD/MIT compatible)
Lastest release
version 0.2.1 on May 26th, 2013



cartman is an overweight, immature, spoiled, outspoken, lazy, foul-mouthed, mean-spirited, racist, sexist, anti-semitic, xenophobic, sociopathic, narcissistic, and ill-tempered elementary school student living with his mother. Wait... wrong cartman.

cartman allows you to create and manage your Trac tickets from the command-line, without the need to setup physical access to the Trac installation/database. All you need is a Trac account.


Create a new ticket, that will open your $EDITOR:

$ cm new

View the content of a ticket:

$ cm view 1514

At a minimum you need to create a ~/.cartman/config file with the following:

base_url = http://your.trac.install/
username = tamentis
password = sitnemat
Configuration Options

Required Settings:

  • base_url
  • username
  • password

Optional Settings:

  • auth_type
  • verify_ssl_cert

The auth_type will force cartman to use the give authtication type. Currently supported auth values are: basic, digest. If not specified defaults to basic (which is the most unsafe option).

The verify_ssl_cert will force cartman to access an SSL site with a self-signed or invalid SSL certificate. Use this with care.

Command walk through
Report Listing

Dump a list of tickets on screen, without details:

$ cm report 1
#142. fix world hunger (bjanin@)
#159. ignore unpaid rent (bjanin@)
Ticket View

Show all the properties of a ticket:

$ cm view 1
List of Reports

Get a list of all the available reports with:

$ cm reports
System Properties

This will dump on screen all the Milestones, Components, Versions:

$ cm properties
Creating a ticket

Creating a ticket will work similarly to writing a new email in mutt, it loads your current $EDITOR and lets you edit the details of the ticket. Assuming all the parameters are correct, it will create the ticket as soon as you save and exit and return the ticket number. If your ticket does not appear valid (missing required field, inexistent Milestone, etc.) cartman will stop and lists each error and let you return to your editor:

$ cm new
-- opens your editor --

Found the following errors:
 - Invalid 'Subject': cannot be blank
 - Invalid 'Milestone': expected: Bug Bucket, Release 2, Release 3

-- Hit Enter to return to editor, ^C to abort --

The first parameter to cm is the owner of the ticket, it populates the To field by default:

$ cm new jcarmack

If your Trac has custom fields, you can use their identifier in the headers, e.g.:

story_id: 5123
iteration: 15

If you specify a template with -t, cartman will look for a matching file in the ~/.cartman/templates folder and will use it as a base for your ticket:

$ cm new -t sysadmin

You can define a default template in this same directory in order to set the template used by default (without -t).

Commenting on a ticket

Just like creating a ticket, adding a comment is just like mutt, your current $EDITOR will be loaded on a blank file for you to edit. Upon save and exit, cartman will commit this new comment and return silently, unless an error occurs:

$ cm comment 1

If the comment is short enough to fit on the command line, you may use the -m flag as such:

$ cm comment 1 -m "you forgot to call twiddle()"
View/Set the status of a ticket

View the current status of a ticket, and the available statuses:

$ cm status 1

Set a ticket as accepted:

$ cm status 1 accept

If you need to add a comment with this status change, you can use the -c flag, it will open your default editor:

$ cm status 1 reopen -c

You may also use the -m flag to define the comment in-line, without the use of an editor:

$ cm status 1 reopen -m "does not work with x = y"
Advanced configuration

If you are using vim as your default editor, you also might want to add email-like syntax highlighting to match the .cm.ticket extension:

autocmd BufNewFile *.cm.ticket setf mail

If you use multiple Trac sites, you can have multiple configurations in the same file using the section to separate the sites, here is an example:

base_url = http://other.trac.site/
username = tamentis
password = sitnemat
verify_ssl_cert = False

You would pass the -s parameter to cm to define which site to access:

cm -s other report 1

You may define all common configuration settings in the [DEFAULT] section.

  • Python 2.7+, 3.3+ (not 3.2, not 2.6)
  • python-requests 0.6 and above
  • Tested on Trac 0.12.5 and 1.0.1
  • Probably still works on 0.11, but untested.
  • Create a temp Trac for testing purpose (in virtualenv):

    $ pip install trac
    $ trac-admin testtrac initenv
    $ trac-admin testtrac permission add testuser TRAC_ADMIN
    $ htpasswd -b -c -m htpasswd testuser testpass
    $ tracd testtrac -p 8080 --basic-auth=testtrac,htpasswd,testrealm

0.2.1 (2013-05-23)

  • added the default template,
  • allow an owner to be specified, even with a template,
  • added v1.0 compatibility,
  • show Priority in cm properties,
  • fixed a bug lower-casing the properties after tokenized fuzzy match.
  • fixed bug in view if the ticket contains unicode.

0.2.0 (2013-05-03)

  • cm help now prints a list of commands (by goodwillcoding@webhippo.net),
  • add auth_type to the config (by goodwillcoding@webhippo.net),
  • basic debianization (by Ryan P. Kelly <rpkelly@cpan.org>),
  • added template support (in ~/.cartman/templates),
  • document how to hack on this thing,
  • move the configuration in a sub-directory,
  • added option to skip SSL cert validation,
  • added support for Trac 0.12,
  • match single tokens during fuzzy find,
  • python 3.3 support,
  • transmit ticket body with CRLF end of lines.

0.1.0 (2011-09-11)

Initial release.

Subscribe to package updates

Last updated May 26th, 2013

Download Stats

Last month:3

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.