Next-gen CLI tool for Katello (Katello-specific commands)
Ruby Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.

hammer-cli-katello Build Status Coverage Status

Next-gen CLI tool for Katello (Katello-specific commands)

hammer-cli development docs for help

Development setup

With this guide, you'll be able to set up hammer-cli-katello, hammer-cli, katello_api, and hammer-cli-foreman for development.

Requirements for this setup

These are the requirements for this setup. Note that some may not be needed at all depending on your setup.

  • git
  • ruby
  • rvm
  • katello


First, cd into the directory where you typically keep your projects and where hammer-cli-katello and its projects will live. Then clone everything.

git clone

Optionally, if you want to have git checkouts for hammer-cli-katello's dependencies, check these projects out:

git clone
git clone
git clone

Now let's setup our rvm environment files for the project.

cd hammer-cli-katello
echo "1.9.3" > .ruby-version
echo "hammer" > .ruby-gemset
cd ..; cd -

Before we bundle, we need to setup our local Gemfile. Edit Gemfile.local.rb in your hammer-cli-katello directory to point to the local projects instead of using the gems.

If you're using local checkouts, enter the following:

# vim:ft=ruby
gem 'hammer_cli', :path => '../hammer-cli'
gem 'hammer_cli_foreman', :path => '../hammer-cli-foreman'
gem 'hammer_cli_foreman_tasks', :path => '../hammer-cli-foreman-tasks'

Otherwise enter:

gem 'hammer_cli_foreman', :git => ''
gem 'hammer_cli', :git => ''

Now run bundler inside your hammer-cli-katello directory:

gem install bundler
bundle install

Now, let's create the directories we need for configuration.

mkdir -p ~/.hammer/cli.modules.d

Edit ~/.hammer/cli_config.yml and enter any hammer-cli config values you want.

Next edit ~/.hammer/cli.modules.d/foreman.yml and enter the following:

  :enable_module: true
  :host: 'http://localhost:3000/'
  :username: 'admin'
  :password: 'changeme'

Edit ~/.hammer/cli.modules.d/katello.yml and enter in the following:

  :enable_module: true

And then finally test out your installation:

bundle exec hammer -vh

Look for any errors. If you see none, you should be good to go.


hammer-cli-foreman stubs the API for functional tests. See api_expectations.rb. To regenerate the stubbed API, refer to the test data Readme.