Skip to Content
Referenceoo CLI

oo clem

Clem's changes that wait for a click, and Clem's chat bots.

The changes Clem asked to make that wait for an administrator's one click: deleting, making or removing a key, changing who is an administrator, more access for Clem itself, and most of what the dashboard and oo confirm first, such as stopping a VM or someone else's environment. Everything else it does at once, for the person who asked it and within their permissions, or on its own; a chat run that names no linked person only reads. oo clem bots manages Clem's own chat bots, as Channels & Access on Clem's agent page does.

oo clem waiting

Print the changes Clem asked for as JSON: those waiting for a click first, each with what it will do, why it waits and who asked; then the last ones decided, with who decided, how it went and, for a member's, whether they were told where they asked (confirm.told). Approve one with oo clem approve ID, or refuse it with oo clem decline ID; or do it on its card in the chat, or in Settings > Clem.

oo clem waiting

It also takes the connection options.

oo clem approve

Approve one of the changes Clem asked for, as Approve or Don't on its card does. oo sends the change exactly as oo clem waiting lists it, by its payloadHash, so a change that is no longer that one is refused (payload_changed). Only an administrator decides, as a person: with their own sign-in or an unrestricted key of their own (full_identity_admin_required otherwise), never Clem. An approved change runs at once, with the approver's permissions. It prints the change as decided, whether someone decided it already (already), and for an approval what running it answered (result).

oo clem approve ID
ArgumentRequiredDefaultChoicesDescription
IDyesthe change's ID, p-…, from oo clem waiting

It also takes the connection options.

oo clem decline

Refuse one of the changes Clem asked for, as Approve or Don't on its card does. oo sends the change exactly as oo clem waiting lists it, by its payloadHash, so a change that is no longer that one is refused (payload_changed). Only an administrator decides, as a person: with their own sign-in or an unrestricted key of their own (full_identity_admin_required otherwise), never Clem. An approved change runs at once, with the approver's permissions. It prints the change as decided, whether someone decided it already (already), and for an approval what running it answered (result).

oo clem decline ID
ArgumentRequiredDefaultChoicesDescription
IDyesthe change's ID, p-…, from oo clem waiting

It also takes the connection options.

oo clem bots

Clem's own Telegram, Mattermost, Slack and Buzz bots, as Channels & Access on Clem's agent page shows them, whether connected there or set up with the Sunport: list reads them, with who may message Clem on each and who asked to. Connecting or disconnecting a bot, approving or removing who may message Clem and letting a bot take groups are an administrator's own decisions, with their sign-in or an unrestricted key of their own; Clem never makes them. Approval is for a chat account linked to an active person in Users, who Clem acts for with their own permissions. Replacing a bot's token (token) needs hosts.manage and jobs.create.

Each runs its job and follows it to its end, as oo run --wait does: exit 0 succeeded, 1 failed, 124 timed out while the job continues (follow it with oo jobs wait JOB_ID). A bot token is read from a file or stdin, never from an argument, and is never printed.

oo clem bots [COMMAND]

It also takes the connection options.

oo clem bots list

Read Clem's bots again (hosts.channel-tokens) and print the finished job: its result lists each chat app's bot, whether it was connected here, who may message Clem on it (approved), who asked to (pending) and the groups an administrator trusted (trusted_groups), and the chat apps a bot can still be connected for (connectable). It never shows a token.

oo clem bots list [options]
ArgumentRequiredDefaultChoicesDescription
--timeout TIMEOUTno300.0
--interval INTERVALno2.0

It also takes the connection options.

oo clem bots connect

Connect a bot to Clem, as Connect on Clem's agent page does: a Telegram bot with its token, a Mattermost bot with its token and --server, or a Slack app with its bot token (xoxb-) and --app-token (xapp-, Socket Mode). iMessage takes nothing: Clem texts from a number OpenOrange holds. A Buzz bot takes its community with --relay and the rooms it answers in with --room, and no token: the Sunport makes the bot's key, and the result names its public key, which a room's owner gives the Bot role there. Clem's gateway restarts with it. oo clem bots slack-app makes that Slack app.

oo clem bots connect [options] channel [FILE]
ArgumentRequiredDefaultChoicesDescription
channelyestelegram, mattermost, slack, imessage, buzzthe chat app
FILEnoa file holding the bot's token (Slack: its xoxb- bot token; iMessage: none), or - for stdin
--app-token FILEnoSlack: a file holding the app-level xapp- token
--server URLnoMattermost: the server's https address
--relay ADDRESSnoBuzz: the community's address, as the Buzz app shows it, or an invite link
--room ROOMnoBuzz: a room the bot answers in, by its ID or a link to it; once per room
--timeout TIMEOUTno300.0
--interval INTERVALno2.0

It also takes the connection options.

oo clem bots slack-app

Print the link that opens Slack's Create dialog with Clem's Slack app filled in, as Create the Slack app in Clem's agent page does; --json prints the link and the app's manifest. It needs no sign-in, so it also serves the Slack tokens a new Sunport's setup takes, and it connects nothing: choose the Slack workspace and create the app, install it and copy its Bot User OAuth Token (xoxb-), generate an App-Level Token with connections:write under Basic Information (xapp-), then connect it with oo clem bots connect slack.

oo clem bots slack-app [options]
ArgumentRequiredDefaultChoicesDescription
--jsonnoprint the link and the app's manifest

It also takes the connection options.

oo clem bots disconnect

Disconnect Clem's bot, as Disconnect on Clem's agent page does, whether it was connected there or set up with the Sunport: Clem stops answering there, its token is cleared, and updates leave the channel out (on a Sunport OpenOrange manages, a deploy may write OpenOrange's copy of the token back, unused). It asks first, or takes --yes.

oo clem bots disconnect [options] channel
ArgumentRequiredDefaultChoicesDescription
channelyestelegram, mattermost, slack, imessage, buzzthe chat app
--yesnoconfirm it now; an agent passes it only once the person confirmed it in chat
--timeout TIMEOUTno300.0
--interval INTERVALno2.0

It also takes the connection options.

oo clem bots approve

Let a person's linked chat account message Clem

oo clem bots approve [options] channel CHAT_ID
ArgumentRequiredDefaultChoicesDescription
channelyestelegram, mattermost, slack, imessage, buzzthe chat app
CHAT_IDyesthe chat account's ID, as oo clem bots list shows it
--person PERSON_IDnowhose account it is, for one linked to nobody (oo people list): it is linked to them first, as oo people chats link does
--timeout TIMEOUTno300.0
--interval INTERVALno2.0

It also takes the connection options.

oo clem bots remove

Stop a chat account messaging Clem

oo clem bots remove [options] channel CHAT_ID
ArgumentRequiredDefaultChoicesDescription
channelyestelegram, mattermost, slack, imessage, buzzthe chat app
CHAT_IDyesthe chat account's ID, as oo clem bots list shows it
--timeout TIMEOUTno300.0
--interval INTERVALno2.0

It also takes the connection options.

oo clem bots groups

Let Clem's bot take messages in the groups it is in, mentioning Clem (on), or keep it to private messages (off), as its Groups switch on Clem's agent page does. In a group, the people who may message it (on Slack, a channel's members) each ask as themselves, with their own permissions. A bot set up with the Sunport is then managed there like one connected there.

oo clem bots groups [options] channel groups
ArgumentRequiredDefaultChoicesDescription
channelyestelegram, mattermost, slack, imessage, buzzthe chat app
groupsyeson, offon: groups too; off: private messages only
--timeout TIMEOUTno300.0
--interval INTERVALno2.0

It also takes the connection options.

oo clem bots trust

Trust one group of Clem's bot on that chat app, by its ID there (a Telegram group's chat ID, a Slack or Mattermost channel's ID), as Trusted groups on Clem's agent page does: there Clem acts as you, the administrator who trusted it, for whoever writes, as in your own direct message with it. on asks first, or takes --yes; off takes it back, on the next message.

oo clem bots trust [options] channel GROUP trust
ArgumentRequiredDefaultChoicesDescription
channelyestelegram, mattermost, slack, imessage, buzzthe chat app
GROUPyesthe group's ID on that chat app
trustyeson, offon: Clem acts as you there; off: as each sender again
--yesnoconfirm it now; an agent passes it only once the person confirmed it in chat
--timeout TIMEOUTno300.0
--interval INTERVALno2.0

It also takes the connection options.

oo clem bots token

Replace the token of Clem's bot, as Replace token on Clem's agent page does, such as after the old one leaked; Slack takes its bot token (xoxb-) with --app-token (xapp-), as for moving to another Slack app. Both are checked first, and who may message Clem stays. --new-bot says the token is another bot's: Clem then answers there, and it asks first, or takes --yes.

oo clem bots token [options] channel FILE
ArgumentRequiredDefaultChoicesDescription
channelyestelegram, mattermost, slack, imessage, buzzthe chat app
FILEyesa file holding the new token (Slack: its xoxb- bot token), or - for stdin
--app-token FILEnoSlack: a file holding the app-level xapp- token
--new-botnothe token is another bot's
--yesnoconfirm it now; an agent passes it only once the person confirmed it in chat
--timeout TIMEOUTno300.0
--interval INTERVALno2.0

It also takes the connection options.

On this page