Skip to main content
Alpha. These commands are in alpha and are available to customers on request. They are off until OpenWork turns them on for your organization. Expect commands, flags and output to change or be removed without notice. To try them, ask your OpenWork contact.
The openwork artifacts commands work with the artifacts your organization already has: the dashboards, trackers and forms that open beside a chat. Run the CLI and sign in as described in the CLI overview.
deploy is the part that has to be turned on for your organization. Until it is, it stops with feature_disabled and changes nothing. The other commands use what OpenWork already offers and follow the access you have in the app.

What an artifact is, and is not

An artifact is a React view that OpenWork compiles and shows in a sandboxed frame. It lives in a Plugin, and people who can use the Plugin can open it. An artifact is not a server or an app with its own backend. These do not exist, and the commands do not pretend they do:
  • No listening server. An artifact cannot open a port or answer requests. A file that starts a server will be refused when it is compiled, or will do nothing.
  • No timers on a server. Nothing in an artifact runs while nobody has it open.
  • No fetch. An artifact cannot call the network. It reaches data only through tools it was given when it was built in chat.
  • No SQLite, and no other database. --storage is refused with not_supported. The storage that exists is typed collections, which an artifact declares when it is built in chat, where that feature is on for your organization.
The CLI does not inspect your file for any of these. It sends the source and the server compiles it.

list and show

list shows each artifact you can open, the Plugin it lives in, whether it is yours, and who it is shared with. show adds the current revision and the Workflows in the same Plugin. Only people who manage a Plugin can see who it is shared with. For other artifacts the column says so.

deploy

Publish a React source file as an artifact, or replace the source of the artifact that already has that name.
The file must have a default export that is a React component:
A file next to it with the same name and a .css ending, here tracker.css, is sent as its styles. A new name publishes a new artifact in a new private Plugin of the same name. Only you can open it until you share it. It has no tools and no saved data. To give an artifact either, build it in chat. A name you can already see replaces that artifact’s source. It keeps its tools, saved data, public link and sharing. The command asks first unless --force is passed, and it is refused if someone changed the artifact after the CLI read it. You must be an editor of the artifact itself. Being given the artifact with grant lets a person open it, not replace it. The source is refused, and nothing is stored, when it does not compile, is too large, or when a Plugin with the new name already exists.

call

Run a Workflow from the artifact’s Plugin, as you.
An artifact is a view, so there is nothing in it to call. What can run is a Workflow that sits in the same Plugin. With one Workflow there, call runs it. With several, name one with --workflow. With none, the command says so. The Workflow runs with your own access to connectors, exactly as if you ran it in OpenWork. --input is a JSON file passed as the Workflow’s input.

grant and revoke

Let everyone, teams or people open an artifact, or take that back.
Access is given on the artifact’s Plugin, as a viewer. It covers everything else in that Plugin too, and revoke takes all of it away again. An artifact deployed from the CLI has a Plugin to itself. You must manage the Plugin. Sharing with --everyone also needs permission to share with the whole organization, which owners and admins have. revoke removes only what was given to exactly that team, person or everyone. A person who also has the artifact through a team keeps it. The command asks first unless --force is passed.