Prototype for Secret Maryo Chronicles' level repository manager.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


SMC-GET – level repository manager for Secret Maryo Chronicles

smc-get - Library and command-line for managing SMC level packages.


Luiji Maryo (


Marvin Gülker (


Copyright (C) 2010-2011 Entertaining Software, Inc.


Copyright (C) 2011 Marvin Gülker


GNU General Public License (see COPYING)

Synopsis for use as a command-line tool

smc-get install mypackage
smc-get uninstall mypackage
smc-get help

Synopsis for use as a library

require 'smc_get'
#Initialize the library
  #From where to download packages
  #Where to install packages (your SMC installation)
#Get a package
pkg ="mypackage")
#Install it!
#...or remove it.


smc-get is a library and command-line tool for installing, uninstalling, etc. level packages from the Secret Maryo Chronicles Contributed Levels Repository.

Prototype Notice

This program is a prototype for functionality that will eventually be merged with Secret Maryo Chronicles. It is subject to change and should not be used for anything other then testing.


Using it as a command-line

smc-get's main purpose is to be used as a command-line utility. It should be executed in the syntax:


Where COMMAND is the command and PARAMATERS... are the parameters for that command.

To get help on the various commands, use the help command.

smc-get help [COMMAND]

Ommit the COMMAND if you want general usage information.

Configuration file

smc-get requires a configuration file when used as a commandline tool. By default it searches for smc-get.yml in the config/ subdirectory of your smc-get installation, then for smc-get-conf.yml in the user's home directory and then for the file specified via the -c commandline switch, if existant. Values set in later evaluated configuration files override those in prevously evaluated ones; see

smc-get help

for more explanation. If you want to use the CUI from your scripts, you can specify a config file via -c, but make sure it contains all possible options, otherwise those in the global or user-level config files may affect your program. See below for an example.

Be careful when using sudo, because it changes the environment variables. smc-get may not find your user-level configuration file when using sudo, because it derives the path from the USER environment variable which may get set to root when using sudo.

In the configuration file you can set some general options, look into the file which is quite self-explanatory. A sample configuration may look like this:

data_directory: "/usr/local/share/smc"
repo_url: ""

Using it as a library

smc-get, although mainly targetted at being a command-line utility, may also be used as a library. This is useful when, for instance, creating a GUI front-end.

To initialize the library, indicate which repository you are using and where you want smc-get to install the packages to (which is usually your SMC installation path)


For interacting with the SMC repository, smc-get exposes an object-oriented API centered around the SmcGet::Package class. After you initialized the library as explained above, you can query, install and uninstall packages.

pkg ="mypackage")

If the function fails, it will raise various exceptions. When creating a GUI, you should catch these exceptions and present them as message boxes.

rescue SmcGet::Errors::NoSuchPackageError
  alert 'No such package "mypackage"!'

All errors smc-get raises are subclasses of SmcGet::Errors::SmcGetError. That means, if you rescue from this exception, you can handle all package-related errors at once:

rescue SmcGet::Errors::SmcGetError => e
  alert e.message

Furhtermore, these error messages should have a pretty informative message set, so unless you want to localize the error messages you can just reach them through (the messages, not the whole exceptions, of course).

The configuration file only contains settings for the commandline user interface, so you don't need it here. If you want to use the CUI from your scripts, do

require "smc_get"
require "smc_get/cui"

cui =

The configuration file from the config/ directory will automatically be loaded as well as the user-level configuration file; you may specify another configuration file by placing the appropriate option in ARGV:


cui =


smc-get is licensed under the GNU General Public License. For more information, see COPYING.


This software was written by Entertaining Software, Inc. Visit us at

This software is hosted at GitHub. The project page can be found at

This software was written for Secret Maryo Chronicles. Visit them at