
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@membranehq/cli
Advanced tools
A command-line interface for working with Membrane in local development environment.
A command-line interface for working with Membrane in local development environment.
npm install -g @membranehq/cli
# or
yarn global add @membranehq/cli
# or
bun install -g @membranehq/cli
# or
pnpm install -g @membranehq/cli
# Initialize with your workspace credentials (interactive)
membrane init
# Or non-interactive
membrane init --key <key> --secret <secret>
# Pull workspace elements
membrane pull
# Make changes, then push back
membrane push
See the Configuration section below for alternative ways to configure credentials.
Use membrane login to authenticate via browser-based OAuth. This stores your access token, refresh token, and the API URI locally.
# Login to the default Membrane API
membrane login
# Tenant-scoped OAuth (workspace/tenant-level APIs; see Tenant API commands below)
membrane login --tenant
# Login to a self-hosted instance
membrane login --apiUri http://localhost:9000
# Non-interactive / headless: print the consent URL (stdin not a TTY behaves like this too)
membrane login --non-interactive
# Headless two-step flow (after `login start`, open URL, approve, then exchange the code)
membrane login --apiUri http://localhost:9000 start
membrane login complete <authorization-code>
# Check current login status, API URI, and project defaults
membrane status
# Log out and clear stored tokens
membrane logout
The --apiUri flag sets the API endpoint for this and all subsequent commands. Once logged in, the CLI remembers the API URI so you don't need to specify it again.
During login you select a default workspace and tenant. These defaults are saved in .membrane/config.json (project-level) and used by other commands like connect, and as defaults for --workspaceKey / --tenantKey on tenant API commands.
Use membrane connect to create a connection to a third-party service via browser-based OAuth. Requires prior authentication via membrane login.
# Connect using an integration key (uses defaults from login)
membrane connect --integrationKey hubspot
# Specify workspace and tenant explicitly
membrane connect --integrationKey hubspot --workspaceKey my-workspace --tenantKey my-customer
# Connect using a connector ID
membrane connect --connectorId 123
# Reconnect an existing connection
membrane connect --connectionId abc
# Print the connection URL instead of opening a browser
membrane connect --integrationKey hubspot --no-browser
These commands call workspace APIs using the token from membrane login. They use your default workspace and tenant from login unless you pass --workspaceKey and --tenantKey. You can also pass a bearer token with MEMBRANE_TOKEN (see Configuration).
membrane search "slack" --elementType connector
membrane search "invoice" --limit 20 --json
Make an HTTP request via the Membrane connection proxy (similar to curl):
membrane request <connectionId> /v1/resource
membrane request <connectionId> /items?page=1 -X GET
membrane request <connectionId> /items -X POST -d '{"name":"example"}' --json
Use -H 'Header: value' (repeatable), --query key=value, --pathParam id=123, and --rawData to send --data as a plain string.
membrane connection list
membrane connection get <id>
membrane connection get <id> --wait # Wait until not BUILDING
membrane connection ensure https://slack.com # Find or create by app URL
membrane connection create "Connect to Slack"
membrane action list
membrane action list --connectionId <id> --intent "send email"
membrane action get <id> --wait --json
membrane action create "Summarize the latest tickets"
membrane action run <actionId> --connectionId <id> --input '{"query":"..."}'
Lower-level control of connection requests (browser connect is usually simpler):
membrane connection-request create --integrationKey hubspot
membrane connection-request get <requestId>
membrane agent-session list
membrane agent-session create --message "Add a HubSpot connector for contacts"
membrane agent-session get <sessionId> --wait
membrane agent-session send <sessionId> --message "Also add list sync"
membrane agent-session messages <sessionId>
membrane agent-session abort <sessionId>
Use --agent <name> with create to pick a specific agent when supported.
Run an MCP server over stdio that exposes Membrane API operations as tools (for editors and agents that speak MCP):
membrane mcp
Requires MEMBRANE_ACCESS_TOKEN, or MEMBRANE_WORKSPACE_KEY and MEMBRANE_WORKSPACE_SECRET (or values in membrane.config.yml / after membrane init).
These may change or behave differently in future releases.
membrane sync --watch # Required: watch mode
membrane sync --watch --rps 5 # Optional: cap requests per second (1–1000)
membrane config # Interactive config UI (alias: membrane install)
From local workspace actions, generate OpenAPI or TypeScript. Currently only schema generation is supported, so --schemasOnly is required:
membrane codegen \
--actions list-files,get-file-by-id \
--out src/generated \
--target openapi \
--schemasOnly
--target is openapi or typescript.
membrane test run connectors/hubspot
membrane test run actions/create-contact --fix
See membrane test run --help for path examples.
membrane open uses workspace credentials (not OAuth login tokens). It requires MEMBRANE_WORKSPACE_KEY and MEMBRANE_WORKSPACE_SECRET in environment variables or membrane.config.yml (for example, after membrane init).
membrane open
Use membrane init to configure workspace credentials, then membrane pull and membrane push to synchronize workspace elements between local files and the remote workspace.
# Initialize workspace configuration
membrane init --key <key> --secret <secret>
# Pull workspace elements from remote
membrane pull [--force]
# Push workspace elements to remote
membrane push [--force]
# Show what would change on push without applying anything
membrane diff
The CLI can be configured using either environment variables or a configuration file (membrane.config.yml). Environment variables take precedence over the configuration file.
export MEMBRANE_WORKSPACE_KEY=<your-workspace-key>
export MEMBRANE_WORKSPACE_SECRET=<your-workspace-secret>
export MEMBRANE_API_URI=https://api.your-membrane-instance.com # Optional: for self-hosted instances (default: https://api.integration.app)
export MEMBRANE_CONSOLE_URI=https://console.your-membrane-instance.com # Optional: for self-hosted instances (default: https://console.integration.app)
export MEMBRANE_TEST_CUSTOMER_ID=<test-customer-id> # Optional: for testing integrations
export MEMBRANE_ACCESS_TOKEN=<token> # Optional: bearer token (e.g. for `membrane mcp`)
export MEMBRANE_TOKEN=<token> # Optional: bypass workspace token exchange for tenant API commands
MEMBRANE_ACCESS_TOKEN and MEMBRANE_TOKEN are not interchangeable:
MEMBRANE_ACCESS_TOKEN is used by membrane mcp to call the API directly (typically a workspace-scoped access token).MEMBRANE_TOKEN is a user/tenant bearer token used by tenant API commands; when set, the CLI skips deriving a workspace+tenant token from login defaults.The CLI uses a configuration file at membrane.config.yml:
workspaceKey: <your-workspace-key>
workspaceSecret: <your-workspace-secret>
# Optional
apiUri: https://api.your-membrane-instance.com # For self-hosted instances (default: https://api.integration.app)
consoleUri: https://console.your-membrane-instance.com # For self-hosted instances (default: https://console.integration.app)
testCustomerId: test-customer # Internal ID of customer for testing integrations
Note: When both environment variables and configuration file are present, environment variables take precedence.
Self-Hosting: For details on self-hosting Membrane, see Self-Hosting Documentation.
membrane.config.yml contains secrets. You should exclude it from version control.
membrane folder can and should be stored in version control to keep your integration configurations versioned.
pull and pushThe CLI provides a pull and push command to transfer workspace elements between environments. You'd typically use this to move integrations, actions, flows, and other configurations from development to production.
How it works:
Workspace elements (integrations, actions, data sources, flows, field mappings, etc.) are stored as YAML files in the ./membrane directory. Each element has a unique UUID that identifies it across workspaces.
When you pull, the CLI:
./membrane directory by UUIDWhen you push, the CLI:
./membrane directory as an exportChanges are applied in dependency order (integrations before integration-level elements, parents before children) to maintain referential integrity. Conflicts occur when an element exists in only one location; use --force to resolve by preferring the source.
When you diff, the CLI:
Useful for previewing what push would do before actually applying changes.
Example:
# Pull from development workspace
export MEMBRANE_WORKSPACE_KEY="dev-workspace-key"
export MEMBRANE_WORKSPACE_SECRET="dev-workspace-secret"
membrane pull
# Push to production workspace
export MEMBRANE_WORKSPACE_KEY="prod-workspace-key"
export MEMBRANE_WORKSPACE_SECRET="prod-workspace-secret"
membrane push
MIT
FAQs
A command-line interface for working with Membrane in local development environment.
The npm package @membranehq/cli receives a total of 1,833 weekly downloads. As such, @membranehq/cli popularity was classified as popular.
We found that @membranehq/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.