Skip to main content

nut connect

Interact with third-party services — Google Drive, Slack, HubSpot, Figma, Stripe, and more — directly from the CLI through your Coconut control plane.
nut connect [options] [command]
Connectors must be configured on the Coconut Dashboard first. Before using nut connect, visit the Control Plane to link your third-party accounts. The CLI acts as a proxy to services you’ve already authorized — it cannot establish new connections on its own.

Authentication

The nut connect command requires a valid callback token to communicate with the control plane. You can provide it in one of two ways:
  • Environment variable (recommended): Set COCONUT_CALLBACK_TOKEN in your shell environment
  • Flag: Pass --token <token> on each invocation
# Set the environment variable once
export COCONUT_CALLBACK_TOKEN="your-token-here"

# Or pass it inline
nut connect list --token "your-token-here"
Add COCONUT_CALLBACK_TOKEN to your shell profile (e.g. .bashrc, .zshrc) or a .env file so you don’t have to supply it every time.
Global Options:
  • -t, --token <token> — Callback token (defaults to $COCONUT_CALLBACK_TOKEN)
  • --host <url> — Control plane base URL (defaults to $COCONUT_HOST or https://app.coconut.dev)
  • -r, --raw — Output raw JSON without formatting
  • --json — Alias for --raw

nut connect list

List all third-party services currently connected to your Coconut instance.
nut connect list
This returns the app slugs you can use with the proxy subcommand (e.g. google_drive, slack, hubspot, figma, stripe).

nut connect proxy

Send an authenticated API request to a connected service. Coconut handles authorization headers automatically — you just specify the app, HTTP method, and path.
nut connect proxy [options] <app> <method> <path>
Arguments:
  • app — App slug as shown by nut connect list (e.g. google_drive, slack, hubspot)
  • method — HTTP method (GET, POST, PUT, PATCH, DELETE)
  • path — API path relative to the service, or a full URL
Options:
  • -b, --body <json> — JSON request body
  • --headers <json> — Additional headers as a JSON string

Examples

Google Drive — list recent files:
nut connect google_drive GET /drive/v3/files?pageSize=5
Slack — send a message to a channel:
nut connect slack POST /api/chat.postMessage \
  --body '{"channel": "C0123ABC", "text": "Deployed v2.4.0 🎉"}'
HubSpot — fetch contacts:
nut connect hubspot GET /crm/v3/objects/contacts?limit=10
Stripe — retrieve a customer:
nut connect stripe GET /v1/customers/cus_abc123
Custom / unsupported apps — use a full URL as the path:
nut connect my_app GET https://api.example.com/v1/items

How It Works

When you run nut connect, the CLI proxies your request through the Coconut control plane, which injects the necessary OAuth or API credentials that were configured on the Dashboard. This means:
  1. You never handle raw API keys for connected services — credentials stay in the control plane.
  2. Any service available on the Dashboard can be accessed from the CLI, scripts, or agent workflows.
  3. Agents can call connectors during task execution to read from or write to external systems (e.g. pulling data from Google Sheets, creating issues in Linear, posting updates to Slack).

Use in Agent Workflows

Connected services are especially powerful when combined with nut code or other agent-driven commands. An agent can leverage connectors to:
  • Pull context from tools like Notion, Confluence, or Google Docs before implementing a task
  • Push results to Slack, email, or project management tools when work is complete
  • Read and write data from CRMs, databases, or storage services as part of automated pipelines

Troubleshooting

Make sure COCONUT_CALLBACK_TOKEN is set in your environment or that you’re passing --token. You can verify the variable is set with echo $COCONUT_CALLBACK_TOKEN.
The service must be connected on the Coconut Dashboard first. Visit the Control Plane, navigate to your instance’s connector settings, and authorize the service.
Double-check the API path and method against the service’s own documentation. nut connect proxies your request as-is — the error is coming from the upstream API.
Connector availability and supported services depend on your Coconut plan and the integrations enabled on the Dashboard.