# Creating a command-line Gem

**URL:** <https://www.ruby-forum.com/t/creating-a-command-line-gem/141449>\
**Category:** Ruby\
**Created:** [June 25, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/creating-a-command-line-gem/141449 "2008-06-25T23:33:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [June 25, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/creating-a-command-line-gem/141449/1 "2008-06-25T23:33:19Z")

</div>

Hi. I’m working on creating a Ruby command-line tool that I want to  
distribute as a gem. Are there any examples or references on how to do  
this? I’d like to create an application similar to god or rake, where  
you can enter something like “god myapp.god” and be able to enter that  
command anywhere and be called without calling it like “ruby god  
myapp.god” or by having to call the script that is nested deep within  
the gem directory. I’m starting from scratch on this and have a very low  
level of knowledge, so any help on how to do this or where to find more  
information would be much appreciated. Thanks in advance.

-Eric

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [June 26, 2008, 12:05am UTC](https://www.ruby-forum.com/t/creating-a-command-line-gem/141449/2 "2008-06-26T00:05:25Z")

</div>

On Jun 25, 2008, at 14:31 , Eric M. wrote:

> information would be much appreciated. Thanks in advance.  
> Either use or study hoe. In hoe you put cmdline tools in a bin  
> directory and list them in the manifest. hoe automatically takes care  
> of the gem details for you.

quick start instructions:

sudo gem install hoe  
sow thingy  
cd thingy  
poke around

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [June 26, 2008, 12:16am UTC](https://www.ruby-forum.com/t/creating-a-command-line-gem/141449/3 "2008-06-26T00:16:44Z")

</div>

Thanks. I’ll check it out.
