Command Line Script

Command line interface to work with pyaiml21 - AIML 2.1 compatible interpreter. The running program represents a single chatbot that can chat with multiple users (see options).

The structure of the bot, or the file extensions are as follows:

  • to load the bot, pass in the bot directory with all files

  • .aiml files should be stored in /aiml/.aiml, or /.aiml

  • .aimlif in /aimlif/.aimlif or /aimlif/.csv or /*.aimlif

  • maps in /maps/* or /*.map

  • sets in /sets/* or /*.set

  • properties in /properties.* or in /config/propert*

  • substitutions in /.substitution or /substitutions/* or config/.substitution

The order of loading the files is the same as above.

usage: aiml [-h] [-i | -d | --validate] [--bot [folder]] [--aiml [file ...]]
            [--aimlif [file ...]] [--substitutions [file ...]]
            [--properties [file ...]] [--maps [file ...]] [--sets [file ...]]
            [-v] [--multiuser]

Named Arguments

-i, --interactive

(load files and) start interactive session

Default: True

-d, --debug

(load files and) start debugging session

Default: False

--validate

just validate the files and return

Default: False

--bot

load bot from folder

--aiml

paths to .aiml files

--aimlif

paths to .aimlif files

--substitutions

paths to substitutions to load, the concrete type will be decided based on the file name

--properties

paths to bot properties

--maps

paths to AIML maps, map name will be decided based on the file name (name.txt, name.map)

--sets

paths to AIML sets, set name will be decided based on the file name (name.txt, name.set)

-v, --verbose

enable debugging info

Default: False

--multiuser

applicable only for interactive mode, when set each input contains as a first word the user id

Default: False