Ogment
Ogment gives you secure access to business integrations — SaaS tools, internal APIs, and data — through a single CLI. Credentials never leave Ogment. You get scoped, revocable tokens with per-tool permissions and human approval flows.
Setup (one-time)
If ogment is not installed or any command fails with "not logged in":
- Install:
npm install -g ogment - Ask the user to run
ogment loginin their terminal (opens browser for OAuth — zero arguments needed) - Login is a one-time step. After authenticating, all servers and tools are available automatically.
Commands
Discover servers:
ogment servers --json
Returns all available servers across all organizations.
Inspect a server's tools:
ogment servers <server-path> --json
Returns the full list of tools with names, descriptions, and input schemas.
Call a tool:
ogment call <server-path> <tool-name> '<json-args>'
Returns JSON. Arguments must be a single JSON string. Omit args for tools that take no parameters.
Workflow
Follow these steps in order:
- Run
ogment servers --jsonto discover available servers - Pick the server relevant to the user's request
- Run
ogment servers <path> --jsonto see that server's tools - Call the appropriate tool with
ogment call <server> <tool> '<args>' - Parse the JSON response and present results to the user
- If the user needs a different integration, go back to step 1
Examples
# Discover all servers
ogment servers --json
# Inspect tools on a server
ogment servers salesforce --json
# Query data
ogment call salesforce query_accounts '{"limit":5}'
ogment call notion search '{"query":"Q1 roadmap"}'
ogment call data-warehouse run_query '{"sql":"SELECT * FROM orders LIMIT 10"}'
# Create records
ogment call salesforce create_record '{"type":"Contact","fields":{"Name":"Jane Doe","Email":"jane@example.com"}}'
# Health check (no args)
ogment call my-api get__health
Handling Errors
- "not logged in" — ask the user to run
ogment loginin their terminal - "server not found" — run
ogment servers --jsonto see available servers - approval link returned — the tool requires human approval. Show the approval URL to the user and ask them to approve. Then retry the same tool call.
- 401 / authentication error — the token may be expired. Ask the user to run
ogment logoutthenogment login
Important
- Always use
--jsonwhen discovering servers and tools ogment callreturns JSON by default — no--jsonflag needed- Arguments to
ogment callmust be a single JSON string - Do not store or log tokens — Ogment handles all credentials server-side
- Each tool call is authenticated, permission-checked, and logged by Ogment