From mediawiki.org
MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
Release status: experimental
'Beware of Spies' (cropped).jpg
Implementation API
Description Provides spies for Scribunto.
  • John Erling Blad (Jebladtalk)
Compatibility policy Master maintains backward compatibility.
Database changes No
License GNU General Public License 2.0 or later
Translate the Katsa extension

Check usage and version matrix.

Katsa provides a framework for spies.


Katsa depends on modules from the Scribunto extension.

  • Download and place the file(s) in a directory called Katsa in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php :
    wfLoadExtension( 'Katsa' );
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.


The workflow for spies is to define a graph, and then call on that graph. The definition is done once, but the graph can be reused several times.

local spy = require 'spy'
local carp = spy.newCarp()
local cluck = spy.newCluck()
local croak = spy.newCroak()
local confess = spy.newConfess()

local h = {}

function h.carp()
	carp 'carp carp carp'             -- this will log a one-liner in the console
	cluck 'cluck cluck cluck'         -- this will log a full stack trace
	croak 'croak croak croak'         -- should just bug out and print a one-liner (but Scribuntos implementation of error() is weird)
	confess "confess confess confess" -- bug out and print a full stack trace

return h

For further help, see the generated LDoc documentation.


For recreating the Vagrant-based development environment, see Katsa: Topics/Vagrant.

See also[edit]