productivity
Bitwarden CLI for AI Agents
Use the Bitwarden CLI from KosmoKrator to call Bitwarden tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Bitwarden CLI Setup
Bitwarden can be configured headlessly with `kosmokrator integrations:configure bitwarden`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure bitwarden --enable --read allow --write ask --json
kosmokrator integrations:doctor bitwarden --json
kosmokrator integrations:status --json Credentials
Authentication type: oauth client credentials oauth_client_credentials. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
client_id | BITWARDEN_CLIENT_ID | Text string | no | Client ID |
client_secret | BITWARDEN_CLIENT_SECRET | Secret secret | no | Client Secret |
access_token | BITWARDEN_ACCESS_TOKEN | Secret secret | no | Access Token |
api_url | BITWARDEN_API_URL | URL url | no | API URL |
identity_url | BITWARDEN_IDENTITY_URL | URL url | no | Identity Token URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call bitwarden.bitwarden_collections_get '{}' --json kosmo integrations:bitwarden bitwarden_collections_get '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs bitwarden --json
kosmo integrations:docs bitwarden.bitwarden_collections_get --json
kosmo integrations:schema bitwarden.bitwarden_collections_get --json
kosmo integrations:search "Bitwarden" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
bitwarden.bitwarden_collections_get
Retrieves the details of an existing collection. You need only supply the unique collection identifier that was returned upon collection creation.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_collections_get '{}' --json kosmo integrations:bitwarden bitwarden_collections_get '{}' --json bitwarden.bitwarden_collections_put
Updates the specified collection object. If a property is not provided, the value of the existing property will be reset.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_collections_put '{}' --json kosmo integrations:bitwarden bitwarden_collections_put '{}' --json bitwarden.bitwarden_collections_delete
Permanently deletes a collection. This cannot be undone.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_collections_delete '{}' --json kosmo integrations:bitwarden bitwarden_collections_delete '{}' --json bitwarden.bitwarden_collections_list
Returns a list of your organization's collections. Collection objects listed in this call do not include information about their associated groups.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_collections_list '{}' --json kosmo integrations:bitwarden bitwarden_collections_list '{}' --json bitwarden.bitwarden_events_list
Returns a filtered list of your organization's event logs, paged by a continuation token. If no filters are provided, it will return the last 30 days of event for the organization.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_events_list '{}' --json kosmo integrations:bitwarden bitwarden_events_list '{}' --json bitwarden.bitwarden_groups_get
Retrieves the details of an existing group. You need only supply the unique group identifier that was returned upon group creation.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_groups_get '{}' --json kosmo integrations:bitwarden bitwarden_groups_get '{}' --json bitwarden.bitwarden_groups_put
Updates the specified group object. If a property is not provided, the value of the existing property will be reset.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_groups_put '{}' --json kosmo integrations:bitwarden bitwarden_groups_put '{}' --json bitwarden.bitwarden_groups_delete
Permanently deletes a group. This cannot be undone.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_groups_delete '{}' --json kosmo integrations:bitwarden bitwarden_groups_delete '{}' --json bitwarden.bitwarden_groups_get_member_ids
Retrieves the unique identifiers for all members that are associated with this group. You need only supply the unique group identifier that was returned upon group creation.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_groups_get_member_ids '{}' --json kosmo integrations:bitwarden bitwarden_groups_get_member_ids '{}' --json bitwarden.bitwarden_groups_put_member_ids
Updates the specified group's member associations.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_groups_put_member_ids '{}' --json kosmo integrations:bitwarden bitwarden_groups_put_member_ids '{}' --json bitwarden.bitwarden_groups_list
Returns a list of your organization's groups. Group objects listed in this call include information about their associated collections.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_groups_list '{}' --json kosmo integrations:bitwarden bitwarden_groups_list '{}' --json bitwarden.bitwarden_groups_post
Creates a new group object.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_groups_post '{}' --json kosmo integrations:bitwarden bitwarden_groups_post '{}' --json bitwarden.bitwarden_members_get
Retrieves the details of an existing member of the organization. You need only supply the unique member identifier that was returned upon member creation.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_members_get '{}' --json kosmo integrations:bitwarden bitwarden_members_get '{}' --json bitwarden.bitwarden_members_put
Updates the specified member object. If a property is not provided, the value of the existing property will be reset.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_members_put '{}' --json kosmo integrations:bitwarden bitwarden_members_put '{}' --json bitwarden.bitwarden_members_remove
Removes a member from the organization. This cannot be undone. The user account will still remain.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_members_remove '{}' --json kosmo integrations:bitwarden bitwarden_members_remove '{}' --json bitwarden.bitwarden_members_get_group_ids
Retrieves the unique identifiers for all groups that are associated with this member. You need only supply the unique member identifier that was returned upon member creation.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_members_get_group_ids '{}' --json kosmo integrations:bitwarden bitwarden_members_get_group_ids '{}' --json bitwarden.bitwarden_members_put_group_ids
Updates the specified member's group associations.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_members_put_group_ids '{}' --json kosmo integrations:bitwarden bitwarden_members_put_group_ids '{}' --json bitwarden.bitwarden_members_list
Returns a list of your organization's members. Member objects listed in this call include information about their associated collections.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_members_list '{}' --json kosmo integrations:bitwarden bitwarden_members_list '{}' --json bitwarden.bitwarden_members_post
Creates a new member object by inviting a user to the organization.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_members_post '{}' --json kosmo integrations:bitwarden bitwarden_members_post '{}' --json bitwarden.bitwarden_members_post_reinvite
Re-sends the invitation email to an organization member.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_members_post_reinvite '{}' --json kosmo integrations:bitwarden bitwarden_members_post_reinvite '{}' --json bitwarden.bitwarden_members_revoke
Revoke a member's access to an organization.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_members_revoke '{}' --json kosmo integrations:bitwarden bitwarden_members_revoke '{}' --json bitwarden.bitwarden_members_restore
Restores a previously revoked member of the organization.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_members_restore '{}' --json kosmo integrations:bitwarden bitwarden_members_restore '{}' --json bitwarden.bitwarden_organization_get_subscription
Retrieves the subscription details for the current organization.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_organization_get_subscription '{}' --json kosmo integrations:bitwarden bitwarden_organization_get_subscription '{}' --json bitwarden.bitwarden_organization_post_subscription
Update the organization's current subscription for Password Manager and/or Secrets Manager.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_organization_post_subscription '{}' --json kosmo integrations:bitwarden bitwarden_organization_post_subscription '{}' --json bitwarden.bitwarden_organization_import
Import members and groups from an external system.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_organization_import '{}' --json kosmo integrations:bitwarden bitwarden_organization_import '{}' --json bitwarden.bitwarden_policies_get
Retrieves the details of a policy.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_policies_get '{}' --json kosmo integrations:bitwarden bitwarden_policies_get '{}' --json bitwarden.bitwarden_policies_put
Updates the specified policy. If a property is not provided, the value of the existing property will be reset.
write - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_policies_put '{}' --json kosmo integrations:bitwarden bitwarden_policies_put '{}' --json bitwarden.bitwarden_policies_list
Returns a list of your organization's policies.
read - Parameters
- none
kosmo integrations:call bitwarden.bitwarden_policies_list '{}' --json kosmo integrations:bitwarden bitwarden_policies_list '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
bitwarden.bitwarden_collections_get 0 parameters
kosmo integrations:schema bitwarden.bitwarden_collections_get --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_collections_put 0 parameters
kosmo integrations:schema bitwarden.bitwarden_collections_put --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_collections_delete 0 parameters
kosmo integrations:schema bitwarden.bitwarden_collections_delete --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_collections_list 0 parameters
kosmo integrations:schema bitwarden.bitwarden_collections_list --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_events_list 0 parameters
kosmo integrations:schema bitwarden.bitwarden_events_list --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_groups_get 0 parameters
kosmo integrations:schema bitwarden.bitwarden_groups_get --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_groups_put 0 parameters
kosmo integrations:schema bitwarden.bitwarden_groups_put --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_groups_delete 0 parameters
kosmo integrations:schema bitwarden.bitwarden_groups_delete --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_groups_get_member_ids 0 parameters
kosmo integrations:schema bitwarden.bitwarden_groups_get_member_ids --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_groups_put_member_ids 0 parameters
kosmo integrations:schema bitwarden.bitwarden_groups_put_member_ids --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_groups_list 0 parameters
kosmo integrations:schema bitwarden.bitwarden_groups_list --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_groups_post 0 parameters
kosmo integrations:schema bitwarden.bitwarden_groups_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_members_get 0 parameters
kosmo integrations:schema bitwarden.bitwarden_members_get --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_members_put 0 parameters
kosmo integrations:schema bitwarden.bitwarden_members_put --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_members_remove 0 parameters
kosmo integrations:schema bitwarden.bitwarden_members_remove --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_members_get_group_ids 0 parameters
kosmo integrations:schema bitwarden.bitwarden_members_get_group_ids --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_members_put_group_ids 0 parameters
kosmo integrations:schema bitwarden.bitwarden_members_put_group_ids --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_members_list 0 parameters
kosmo integrations:schema bitwarden.bitwarden_members_list --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_members_post 0 parameters
kosmo integrations:schema bitwarden.bitwarden_members_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_members_post_reinvite 0 parameters
kosmo integrations:schema bitwarden.bitwarden_members_post_reinvite --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_members_revoke 0 parameters
kosmo integrations:schema bitwarden.bitwarden_members_revoke --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_members_restore 0 parameters
kosmo integrations:schema bitwarden.bitwarden_members_restore --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_organization_get_subscription 0 parameters
kosmo integrations:schema bitwarden.bitwarden_organization_get_subscription --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_organization_post_subscription 0 parameters
kosmo integrations:schema bitwarden.bitwarden_organization_post_subscription --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_organization_import 0 parameters
kosmo integrations:schema bitwarden.bitwarden_organization_import --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_policies_get 0 parameters
kosmo integrations:schema bitwarden.bitwarden_policies_get --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_policies_put 0 parameters
kosmo integrations:schema bitwarden.bitwarden_policies_put --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
bitwarden.bitwarden_policies_list 0 parameters
kosmo integrations:schema bitwarden.bitwarden_policies_list --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.