Create a Jekyll command from the _plugins folder

I want to create a command that extracts a few stats for me. So I’m trying to create a local command in the _plugins folder.

To start, I added this code in the _plugins/hello.rb file :

class Hello < Jekyll::Command
    class << self
      def init_with_program(prog)
        prog.command(:hello) do |c|
            c.action do |args, options|

and in config.yml

  - ./_plugins/hello.rb

I can start a server without error, but when I try to launch bundle exec jekyll hello, I get this error :

fatal: 'jekyll hello' could not be found. You may need to install the jekyll-hello gem or a related gem to be able to use this subcommand. 

Is it possible to create a command without a gem ? For me right now, a gem would be overkill, but it feels like I don’t have a choice.

It’s certainly possible to add plugins w/o a gem. I haven’t done a command yet, but tags and blocks, and they all have a line like

Liquid::Template.register_tag('accordion2', Jekyll::Accordion2Tag)

at the end (here it has something to do with an accordion, so different names for you, of course). And I don’t mention them in config.yml.
Maybe that helps.