Linux setup tool for Kali Linux
Branch: master
Clone or download
Latest commit 3404da0 Sep 6, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Fix readme Sep 1, 2018
bare-config.json Add a lot more Jun 26, 2018
config.json Update config.json and add shortcut to readme Aug 10, 2018 Fix namespacing Sep 6, 2018


Linux setup tool for Kali Linux.

Are you tired of configuring and reconfiguring your Kali box across computers? Or getting things back "just the way you like it" after a VM dies or your hard-drive is wiped? Then maybe this is the tool for you!

mykali is a Kali linux configuration tool for quickly getting the box up to scratch just the way you like it.

All you have to do is keep the config.json up to date with your desired configuration and you can run it quickly and easily on other boxes to get them up to scratch.

So far it has the capability to:

  • Set up the /etc/apt/sources.list to check a source is configured.
  • Fully update and upgrade Kali.
  • Install VMWare tools if in a VMWare VM.
  • Install a user configured list of apt packages.
  • Install a user configured list of python pip packages.
  • Run custom user shell commands.
  • Clone a user configured set of Git repositories to a folder (such as /opt).
  • Run install commands on those repositories (such as pip install, ./ etc.).
  • Copy saved configuration files to a specified location (such as .bashrc files etc.).
  • Create a config.json starter file based on the current system, automatically adding git repositories, installed packages etc.

The tool can also be used to update Kali along with all the pip/Git tools.

There's also a roadmap of upcoming features at the bottom of the readme. Feel free to create issues for bugs/suggestions or and pull requests are welcome.


An example config.json is provided, in addition to a barebones copy at bare-config.json. This file installs and configures an install of Kali, and if the config_files section is filled then it will copy files from that directory the configured locations, e.g. copy saved .zshrc, .vimrc files to home.


The idea here is you have a google drive/dropbox/git/whatever repository with your dotfiles etc. and a config.json. On a fresh build you can then grab that repository, clone this tool and then run it, pointing at that directory and it will configure the Kali box accordingly.

The config.json is broken down into multiple sections which are applied in the following order:

  • kali-sources - The location of the apt sources file and the repository URL to add.
  • requirements - apt packages to install that are required my the script.
  • vm - Virtual Machine configuration, such as VMWare Tools.
  • packages - User defined apt packages to install.
  • pip installs - User defined python pip packages to install.
  • cmds - User defined additional commands to run.
  • git - Git repositories to install. Includes configuration for the parent install directory (defaults to /opt), any hosts to ssh-keyscan, the repository install directory, repository URL and any install commands for that repository (such as pip install, gem install etc.).
  • config_files - Any files to copy from the config_files directory and where to. The configuration is in the form of the target directory and then a list of files to place in that directory.


To get help run the script without args or with the -h or --help option:

# ./
usage: [-h] [-r | -u | -c | -m] [-d DIRECTORY]

A Kali Linux configuration tool

optional arguments:
  -h, --help            show this help message and exit
  -r, --run             run the setup with the current configuration
  -u, --update          just update existing configuration. Updates Kali, pip
                        installs and Git repositories/installations. The
                        update command assumes the run command has been
                        completed successfully at least once.
  -c, --config          display the current configuration file
  -m, --make            makes a new config.json file based off the current
  -d DIRECTORY, --directory DIRECTORY
                        specify the directory containing the config.json file
                        and config_files directory.

If you don't want to run it from the repository directory every time, you can create a shortcut your path. E.g. create this file with execute permissions: /usr/local/bin/mykali

python2 /opt/mykali/ $*

Then just run mykali.

To view the current config, run the script with -c or --config:

# mykali --config
	"kali-sources" : {
		"sources-file" : "/etc/apt/sources.list",
		"repo" : "deb kali-rolling main contrib non-free"
	"requirements" : [
	"vm" : {
		"is_vmware" : true
	"packages" : [
	"pip_installs" : [
	"cmds" : [
		"ln -s /usr/share/wordlists /wordlists",
	"git" : {
		"install_dir": "/opt",
		"ssh_keyscans" : [

		"repos" : [
				"directory" : "aquatone",
				"url" : "",
				"install_cmds" : [
					"gem install aquatone"
				"directory" : "discover",
				"url" : "",
				"install_cmds" : [
				"directory" : "linenum",
				"url" : ""
	"config_files" : {
		"config_file_dir" : "/opt/configfiles",
		"targets": [
				"target_dir" : "~",
				"files" : [
				"target_dir" : "~/.oh-my-zsh/themes",
				"files" : [

To run the script with the current configuration in the script's directory use the -r or --run option:

mykali --run

To run the script and specify the directory holding the config.json use the -d or --directory option:

mykali --run --directory ~/Downloads/config

To just have the script update Kali plus the installed pip tools and Git repositories, use the -u or --update option:

mykali --update --directory ~/Downloads/config

To create a template config.json based on the current system, use the -m or --make option:

mykali --make

This will ask the user a few questions and then generate a the file with the git repositories, packages and so on installed on the current system added to the file. The result it not a finished file however, and should be manually checked! For example, install commands for git repositories are not added, and will have to be added manually.

The only caveat for this is that, on standard Kali linux, a lot of the pre-installed tools count as 'manually installed' so these will be listed in the packages, but can be removed from the final file if not required.


  • Have the script check the /etc/apt/sources.list is up to date (in case install from CD)
  • Have the script update Kali
  • Have the script clone a configurable list of git repos
  • Have the script install tools from the distro repos
  • Have the script run any necessary extra install commands for the git repos, such as pip/setup/extra linking
  • Have the script take a directory parameter for backed up config directories
  • It's a bit daft we need an install script to install stuff so remove that
  • Have the script be able to run custom commands from the configuration file
  • Have the script be able to manage installing config files (.zshrc, .bashrc etc)
  • Install pip packages
  • ssh-keyscan repository sites (Github etc.)
  • If a VM install VMware tools (currently only VMWare)
  • Another tool for mass updating git repositories
  • Have Git check for updates before pulling and rebuilding
  • Have the script handle environment variables for paths etc.
  • Create a secondary tool for looping through an existing /opt directory (or wherever) and adding the repos to the config.json
  • Set the resolution (Currently possible via a command.)
  • Install a background/wallpaper (very important!) (Currently possible via a command.)
  • Look into a host script for VMs which will configure the VM appropriately (bridged/NAT'd etc)
  • Set shell (Currently possible via a command.)
  • Change root password (from prompt, not config.json! Currently possible via a command.)