So now that we have a module installed, let's actually look at the
modules command and see what we can do with it.
So here we have a couple of subcommands.
We can load a module, we can reload a module, and we can search our modules.
The reload command is a development command,
so I won't go into it now, but loading is obviously going to load that
module and will take us to that module's context. Search will obviously
search the installed modules that we have.
Searching modules behaves just like searching the marketplace does.
You still have the smart searching, you still have the smart matching,
all of that good stuff, so treat it very,
very similar there. If we're on, just do a quick list, do module
search, it'll show us all the modules we have installed.
This is expected.
We've only installed one, so a very simple setup we have going right now.
So let's go ahead and load this module. And I'm going to
use this smart loading feature here.
And so I do, I just give it the word miner, it finds it, we're
good to go, and now we're in the module context.
So If you use the help command,
we'll see that we've got some different things here.
There's definitely some overlap.
There's the db command still exists here, the keys command, the modules
command, there's a lot of overlap between the two contexts,
but there's also some new stuff, such as the options command,
which gives us access to the global context options in the module context.
There's the info command, the input command.
Some of these we'll go over here in just a moment,
but there are a different subset of commands here that
are unique to the module context.
Now let's look at the options for modules, or for this module in particular.
So if you list our options, we see one.
Obviously,
this is a big difference from the global context where we had many, and the
global context options apply to the framework as a whole, whereas this
particular list of options would only impact this one module.
Now, every module in the framework does some sort of transformation,
and so this source option will always exist,
and it will always have a default configuration when a developer
creates a module to have to give us some sort of default source of
data, and that typically comes from the database.
And so,
if you want a little bit more info on what default
means for this particular module,
let's use the info command in the module context,
and you'll see a lot more information now about this module,
including some additional data about that source option.
And if you look here,
it says the default option is SELECT DISTINCT company FROM
companies WHERE company IS NOT NULL.
So it's a database query that's going to pull information from
the database, company names specifically, and then transform
that data into something else.
But look at these other options you have.
You can provide it an individual string, you can provide it a path,
which is a path to a list of inputs, or you could create a custom query
to pull data from some other part of the database.
So it's very flexible in terms of what information it could take in.
And this SOURCE option is the default option that is there
for every single module in the framework.
So it's not something that has to be manually built, it's not something that
has to be manually configured. A lot of times you just install a module and run
it, and it'll behave exactly as you would expect.
Now let's go ahead and run this module and see what it finds for us.
(Typing) So we ran the module, and we saw it go through a couple of
different company names, and here at the bottom after it runs,
we get a nice summary of things that it found.
So in this particular case,
the whois_miner module found four different kinds of information.
It found some companies,
but 0 new, so we didn't identify any new companies
that we didn't already know about, but it would have told us if we did.
It did discover several new locations.
It discovered several net blocks and several contacts,
all associated with the single Pluralsight company name that we gave it.
And once again, if we wanted to see this information,
we could do show locations to see them, show netblocks, and show contacts.