Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

srctool: Tool to manage source code parsers

Build Status GoDoc GoWalker

srctool is a command line tool to manage source code parsers. It is able to download parsers from a web server, install them and run them. In short, it is a manager for source code parsers.


Install from source

Assuming you have Go installed and your $GOPATH correctly set, you can simply issue the following command:

go get

Make sure that $GOPATH/bin is in the $PATH.

Install a binary version

Binary for the latest version can be found here.


The command srctool help provides a short description of all available options.


Before doing anything, you must first create a configuration file. To do so, issue:

srctool config

This will create a default configuration file located in $XDG_CONFIG_HOME/srctool/srctool.conf

If the $XDG_CONFIG_HOME environment variable is not set, it will use the $HOME/.config directory.

By default, the download server URL is You can change this value with the config command:

srctool config --server-url ""

Install language parsers

The command srctool list -r lists all compatible parsers available on the download server. For installing them, just issue the following command:

srctool install [language]

Parse projects

The main purpose of srctool is to parse source code. After installing at least one parser, issue the following command:

srctool parse [project path]

This will parse the whole project with each installed parser and merge all the output to produce a final JSON.

Running your own download server

Running your own download server requires nothing more than a HTTP server (nginx, apache, lighttpd, ...). The only requirement is to keep the following structure for the files organization:

├── darwin
│   └── amd64
│       ├──
│       └──
├── dragonfly
│   └── amd64
│       ├──
│       └──
├── freebsd
│   ├── 386
│   │   ├──
│   │   └──
│   └── amd64
│       ├──
│       └──
├── linux
│   ├── 386
│   │   ├──
│   │   └──
│   └── amd64
│       ├──
│       └──
├── netbsd
│   ├── 386
│   │   ├──
│   │   └──
│   └── amd64
│       ├──
│       └──
└── opendbsd
    ├── 386
    │   ├──
    │   └──
    └── amd64

The folder tools/ of the project contains several useful scripts for managing the MD5SUMS file, cross compiling the Go parser, etc. See tools/ for more information.


Tool to manage source code parsers




No packages published
You can’t perform that action at this time.