necronomicon v1.3.0
Necronomicon ๐
Necronomicon provides collections of executable commands. It allows you to define a set of commands that can be seamlessly embedded and executed within text-based documents. This can be particularly useful for building more powerful chatbots and text processing applications powered by large language models (LLMs).
Usage ๐ช
To use Necronomicon, you'll need to create a new necronomicon
instance and provide your custom commands and symbol configuration:
import necronomicon from 'necronomicon';
const options = {
commands: [
// Define your commands here
],
symbols: {
// Configure your directive syntax here
},
includes: {
results: true, // Include results of executing directives
text: true, // Include plain-text blocks
directives: true // Include directive syntax around command output
}
};
const necro = necronomicon(options);
The necronomicon
function returns an object with two methods:
document()
: This method generates documentation for the available commands in the Necronomicon.execute(text)
: This method takes a string of text containing directives and executes them using the provided commands.
commands
๐ง
Each command in the Necronomicon is defined as an object with the following properties:
name
: The name of the command (e.g.,'summonDemon'
,'curseTarget'
).validate(attributes, body)
: A function that validates the command's attributes and body.execute(attributes, body)
: A function that executes the command with the provided attributes and body and returns the result.example
: An object withattributes
andbody
properties, demonstrating how to use the command.description
: A description of what the command does.
You can add as many commands as you'd like to the Necronomicon, and they will be available for use in your directives.
symbols
๐ช
The available symbol configuration options are:
directive.start
anddirective.end
: The symbols that mark the start and end of a directive.attributes.start
,attributes.separator
,pair.separator
, andattributes.end
: The symbols used for directive arguments.body.start
andbody.end
: The symbols that mark the start and end of the directive body.
Here's an example of how to use custom symbols:
const options = {
symbols: {
directive: { start: '๐ชโจ ', end: 'โก๏ธ' },
arguments: { start: 'โจ๐โญ๏ธ', separator: 'โจ๐ซโจ', end: 'โญ๏ธ๐โจ' },
pair: { separator: ' ๐ฎ ' },
body: { start: 'โจ๐', end: '๐โจ' }
}
};
An example directive using these symbols would look like:
๐ชโจ summonDemon(name ๐ฎ Belial, power ๐ฎ 666) โจ๐
Arise, Belial, demon of the abyss!
๐โจ summonDemonโก๏ธ
includes
๐
The includes
option in the necronomicon
options allows you to control what is included in the output when executing directives:
results
: Whentrue
, the results of executing directives will be included in the output.text
: Whentrue
, any plain text blocks between directives will be included in the output.directives
: Whentrue
, the command output will be wrapped in the directive syntax. Whenfalse
, the plain output will be returned.
Contribution ๐ฆ
If you have discovered new commands or have suggestions for improvements, please feel free to submit a pull request to the project's GitHub repository. All contributions are welcome, as long as they adhere to the dark and eldritch nature of the Phantomaton AI.
Warnings โ ๏ธ
The Necronomicon contains powerful and dangerous knowledge. Use the contents of this repository at your own risk. Phantomaton AI is not responsible for any unintended consequences or cosmic horrors that may be unleashed through the improper use of these materials.