This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
markov-cli with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
The package is on the NPM registry as
markov-cli. Simply install it globally with your NPM client of choice.
Once installed globally, verify the command installed with
There are two subcommands you can use:
markov-cli analyze input.txt
input.txt is a file containing input strings, separated by newlines.
This will output a file named
input.json with markov chain data for use in the next subcommand.
markov-cli generate input.json
input.json is a markov chain file generated by the
This will output a string generated using the markov chain.