1. Install the command
Install it where the Bot runs its commands . That is the Bot's computer: ask the Bot
to run the two commands below. Bots can share one. -g puts
grokbot-artzain on the PATH, and works from any folder.
Linux · the Grok Bot box
$ npm install -g @cognexuslabs/grokbot-artzain copy
$ grokbot-artzain --version copy
It must print 0.1.10 or later. A Bot whose copy already prints that
needs no install. To update an older copy, run the install command again. From
0.1.10 on, grokbot-artzain upgrade prints the
install command for that copy, and runs it with --yes .
The gate runs on the Grok Bot box, where the Bot runs its commands. Your own computer gets the
command only when Execution on this computer is allowed. Each command the Bot
runs starts a new bash -c , which reads no profile file, so a PATH line
in ~/.bashrc does not reach it. If the shell says
command not found , ask the Bot to run echo "$PATH"
and link the command into a folder on that list.
2. Give it the key
The command reads the key from the COGNEXUS_API_KEY environment variable
of the shell that runs it. On the Bot's computer, give Grok Bot the key as a secret named
COGNEXUS_API_KEY . A Grok Bot secret is an environment variable in the
Bot's shell commands, so the secret's name is the variable's name. Never put the key in a chat
message or in the skill text.
Where the secret is entered depends on the kind of Bot. A Team Bot is one set up for teammates
to share, in Grok Bot's Team Bot setup. Any other Bot is an ordinary Bot here.
An ordinary Bot has no secrets screen, in Settings or under Manage plugins and
skills. Ask the Bot, in the chat, to request the secret. For example:
I need to give you a secret. Ask me for it with the secure secret input, not in chat.
Environment variable name: COGNEXUS_API_KEY. It is the ArtzAIn Decision API key for the
grokbot-artzain command.
The Bot shows a card with a secure input: paste the key into the card, not into a message.
Once the key is saved the card reads "Saved securely and kept private". If no card appears,
stop: do not send the key as a message.
A Team Bot has a Secrets section in its plugins dialog (the
Bot's details, under Plugins). Fill in Environment variable name with
COGNEXUS_API_KEY , What it's for , which the Bot is
shown, and Secret value , then choose Save secret . The secret
is saved for everyone who uses that Bot. This form is read from the app's text and was not tried.
3. Check the key and the address
Linux · the Grok Bot box
$ grokbot-artzain enroll copy
$ grokbot-artzain doctor copy
Exit code 0 and a line starting {"adapter": mean the key and the address
work. It asks which adapter this Bot should use, and creates nothing. Ask the Bot to run it too.
If the Bot gets enroll skipped: no API key configured , the key did not
reach the Bot's shell as COGNEXUS_API_KEY : check the secret's name.
Then check the whole install with grokbot-artzain doctor : Node, the
command on the PATH, this version against npm, the skill text, the key, the address and the
agent id. It prints one [ok ] , [WARN] or
[FAIL] line per check, with a one-line fix under each that is not ok.
Its key check is the enroll request, so it counts against the enroll limit too.
1. Install the command
People who run Grok Bot on this Windows computer: the command runs in cmd.exe or Windows
PowerShell. -g puts grokbot-artzain on the
PATH, and works from any folder. The command is in the folder npm config get prefix
prints, not in a bin/ folder.
Windows PowerShell or cmd.exe
> npm install -g @cognexuslabs/grokbot-artzain copy
> grokbot-artzain --version copy
It must print 0.1.10 or later. A Bot whose copy already prints that
needs no install. To update an older copy, run the install command again. From
0.1.10 on, grokbot-artzain upgrade prints the
install command for that copy, and runs it with --yes .
When the Bot runs on the Grok Bot box and the action targets a user computer, the gate runs on
the box. Your own computer gets the command only when Execution on this computer
is allowed. If PowerShell says running scripts is disabled on this system ,
run grokbot-artzain.cmd , or allow local scripts with
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned .
2. Give it the key
The command reads the key from the COGNEXUS_API_KEY environment variable
of the shell that runs it. On the Bot's computer, give Grok Bot the key as a secret named
COGNEXUS_API_KEY . A Grok Bot secret is an environment variable in the
Bot's shell commands, so the secret's name is the variable's name. Never put the key in a chat
message or in the skill text.
Where the secret is entered depends on the kind of Bot. A Team Bot is one set up for teammates
to share, in Grok Bot's Team Bot setup. Any other Bot is an ordinary Bot here.
An ordinary Bot has no secrets screen, in Settings or under Manage plugins and
skills. Ask the Bot, in the chat, to request the secret. For example:
I need to give you a secret. Ask me for it with the secure secret input, not in chat.
Environment variable name: COGNEXUS_API_KEY. It is the ArtzAIn Decision API key for the
grokbot-artzain command.
The Bot shows a card with a secure input: paste the key into the card, not into a message.
Once the key is saved the card reads "Saved securely and kept private". If no card appears,
stop: do not send the key as a message.
A Team Bot has a Secrets section in its plugins dialog (the
Bot's details, under Plugins). Fill in Environment variable name with
COGNEXUS_API_KEY , What it's for , which the Bot is
shown, and Secret value , then choose Save secret . The secret
is saved for everyone who uses that Bot. This form is read from the app's text and was not tried.
3. Check the key and the address
Windows PowerShell or cmd.exe
> grokbot-artzain enroll copy
> grokbot-artzain doctor copy
Exit code 0 and a line starting {"adapter": mean the key and the address
work. It asks which adapter this Bot should use, and creates nothing. Ask the Bot to run it too.
If the Bot gets enroll skipped: no API key configured , the key did not
reach the Bot's shell as COGNEXUS_API_KEY : check the secret's name.
Then check the whole install with grokbot-artzain doctor : Node, the
command on the PATH, this version against npm, the skill text, the key, the address and the
agent id. It prints one [ok ] , [WARN] or
[FAIL] line per check, with a one-line fix under each that is not ok.
Its key check is the enroll request, so it counts against the enroll limit too.