Gatana CLI

Manage your organization from your terminal

The Gatana CLI (GitHub) written in Rust is a quick and easy to use CLI to manage most aspects of your organization.

curl -fsSL https://github.com/gatana-ai/gatana/releases/latest/download/install.sh | sh
gatana config login
brew install gatana-ai/tap/gatana
gatana config login

You can always self-upgrade:

gatana upgrade

Examples

Adding a Tool Server

$ gatana create server remote https://mcp.linear.app/mcp
Slug: linear
OAuth found: https://mcp.linear.app
Created server linear.
Registered an OAuth client at https://mcp.linear.app.

Next steps:
  1. Sign in to the service: gatana create creds linear
  2. Choose who can use it: https://acme.gatana.ai/dashboard/servers/linear

$ gatana create creds linear
Open this URL to authorize. You can also provide OAuth tokens as JSON with -f <file> or stdin:
https://gatana.ai/api/v1/mcp-servers/oauth/gt_i41yw2b2c4/begin

$ gatana get tools
NAME                           SERVER                 ENABLED
linear_create_attachment       linear                 true
linear_create_issue_label      linear                 true
(...)

List servers

$ gatana get servers

SLUG          ENABLED   TYPE   LAST UPDATED   AGE
skills        true      self   13h52m         13h52m
artifacts     true      self   13h52m         13h52m
codemode      true      self   13h52m         13h52m
compression   true      self   13h52m         13h52m
fetch         true      self   13h52m         13h52m

Execute Tool

$ gatana tools gmail_list_labels

{
  "labels": [
    {
      "labelId": "CHAT",
      "name": "CHAT",
      "threadsTotal": 0,
      "threadsUnread": 0,
      "messagesTotal": 0,
      "messagesUnread": 0,
      "labelType": "SYSTEM",
      "messageListVisibility": "HIDE",
      "labelListVisibility": "LABEL_HIDE"
    },
    (...)
  ]
}

Code mode allows an agent to submit NodeJS code that is executed by Gatana in an isolated microVM. Documentation.

$ gatana tools codemode_execute_code -a code='const { labels } = await codemode.gmail.listLabels(); return labels[0]'

{
  "labelId": "CHAT",
  "labelListVisibility": "LABEL_HIDE",
  "labelType": "SYSTEM",
  "messageListVisibility": "HIDE",
  "messagesTotal": 0,
  "messagesUnread": 0,
  "name": "CHAT",
  "threadsTotal": 0,
  "threadsUnread": 0
}

Choose who can use a server

A profile holds servers, and goes to accounts and teams. Profiles, accounts and teams go by name, email or ID.

$ gatana create profile Engineering --description "Tools for engineers" -s github -s linear
Created profile 'Engineering' with github, linear.
Give it to someone: gatana profile assign 'Engineering' --account <email> | --team <name>

$ gatana profile assign Engineering --team platform
Gave profile 'Engineering' to team 'platform'.

$ gatana get profiles
NAME          OPEN TO ALL   RESTRICTIVE   CODE MODE   SERVERS   USERS   TEAMS   AGE
Engineering   false         false         false       2         0       1       12s

gatana profile also adds and removes servers (add-server, remove-server), maintainers (maintainers add|rm), identity provider claims (claims add|rm) and the tool settings for one server (tools).

Service accounts for scripts

A service account signs in with a token. Its first token comes with it.

$ gatana create service-account "CI runner"
Created service account 'CI runner' ([email protected]).
API key: gk_1_…

$ gatana create pat --account [email protected] --name deploy --profile Engineering
Created token 'deploy' for '[email protected]'.
API key: gk_1_…

Your own tokens need a browser session. Create them on the Clients & API Keys page of the dashboard.

Organization settings

Organization owners can read and change the settings. A nested setting merges with the stored one, so one field is enough. gatana schema org lists the keys.

$ gatana patch org -p allowMemberAddLocalServers=false
Patch from key=value pairs: {"allowMemberAddLocalServers":false}
Updated the organization: allowMemberAddLocalServers.

$ gatana patch org --logo ./logo.png
Updated the organization: logo.

Last updated on

On this page