productivity
Pocket CLI for AI Agents
Use the Pocket CLI from KosmoKrator to call Pocket tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Pocket CLI Setup
Pocket can be configured headlessly with `kosmokrator integrations:configure pocket`.
# 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 pocket --set consumer_key="$POCKET_CONSUMER_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor pocket --json
kosmokrator integrations:status --json Credentials
Authentication type: oauth2 variant oauth2_variant. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
consumer_key | POCKET_CONSUMER_KEY | Secret secret | yes | Consumer Key |
access_token | POCKET_ACCESS_TOKEN | Secret secret | no | Access Token |
url | POCKET_URL | Text text | no | API URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call pocket.pocket_request_token '{}' --json kosmo integrations:pocket pocket_request_token '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs pocket --json
kosmo integrations:docs pocket.pocket_request_token --json
kosmo integrations:schema pocket.pocket_request_token --json
kosmo integrations:search "Pocket" --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.
pocket.pocket_request_token
Create a Pocket OAuth request token for an authorization redirect.
write - Parameters
- none
kosmo integrations:call pocket.pocket_request_token '{}' --json kosmo integrations:pocket pocket_request_token '{}' --json pocket.pocket_authorize_url
Build the Pocket web authorization URL for a request token.
read - Parameters
- none
kosmo integrations:call pocket.pocket_authorize_url '{}' --json kosmo integrations:pocket pocket_authorize_url '{}' --json pocket.pocket_access_token
Exchange an approved request token for a Pocket access token.
write - Parameters
- none
kosmo integrations:call pocket.pocket_access_token '{}' --json kosmo integrations:pocket pocket_access_token '{}' --json pocket.pocket_add_item
Save one URL to Pocket.
write - Parameters
- none
kosmo integrations:call pocket.pocket_add_item '{}' --json kosmo integrations:pocket pocket_add_item '{}' --json pocket.pocket_retrieve_items
Retrieve Pocket list items with filtering and pagination.
read - Parameters
- none
kosmo integrations:call pocket.pocket_retrieve_items '{}' --json kosmo integrations:pocket pocket_retrieve_items '{}' --json pocket.pocket_send_actions
Send one or more raw Pocket modify actions to /v3/send.
write - Parameters
- actions
kosmo integrations:call pocket.pocket_send_actions '{"actions":"example_actions"}' --json kosmo integrations:pocket pocket_send_actions '{"actions":"example_actions"}' --json pocket.pocket_archive_item
Move a Pocket item to archive.
write - Parameters
- none
kosmo integrations:call pocket.pocket_archive_item '{}' --json kosmo integrations:pocket pocket_archive_item '{}' --json pocket.pocket_readd_item
Move an archived Pocket item back to unread.
write - Parameters
- none
kosmo integrations:call pocket.pocket_readd_item '{}' --json kosmo integrations:pocket pocket_readd_item '{}' --json pocket.pocket_favorite_item
Mark a Pocket item as favorite.
write - Parameters
- none
kosmo integrations:call pocket.pocket_favorite_item '{}' --json kosmo integrations:pocket pocket_favorite_item '{}' --json pocket.pocket_unfavorite_item
Remove favorite status from a Pocket item.
write - Parameters
- none
kosmo integrations:call pocket.pocket_unfavorite_item '{}' --json kosmo integrations:pocket pocket_unfavorite_item '{}' --json pocket.pocket_delete_item
Permanently delete a Pocket item.
write - Parameters
- none
kosmo integrations:call pocket.pocket_delete_item '{}' --json kosmo integrations:pocket pocket_delete_item '{}' --json pocket.pocket_add_tags
Add tags to a Pocket item.
write - Parameters
- none
kosmo integrations:call pocket.pocket_add_tags '{}' --json kosmo integrations:pocket pocket_add_tags '{}' --json pocket.pocket_remove_tags
Remove tags from a Pocket item.
write - Parameters
- none
kosmo integrations:call pocket.pocket_remove_tags '{}' --json kosmo integrations:pocket pocket_remove_tags '{}' --json pocket.pocket_replace_tags
Replace all tags on a Pocket item.
write - Parameters
- none
kosmo integrations:call pocket.pocket_replace_tags '{}' --json kosmo integrations:pocket pocket_replace_tags '{}' --json pocket.pocket_clear_tags
Clear all tags from a Pocket item.
write - Parameters
- none
kosmo integrations:call pocket.pocket_clear_tags '{}' --json kosmo integrations:pocket pocket_clear_tags '{}' --json pocket.pocket_rename_tag
Rename a Pocket tag across the account.
write - Parameters
- none
kosmo integrations:call pocket.pocket_rename_tag '{}' --json kosmo integrations:pocket pocket_rename_tag '{}' --json pocket.pocket_delete_tag
Delete a Pocket tag across the account.
write - Parameters
- none
kosmo integrations:call pocket.pocket_delete_tag '{}' --json kosmo integrations:pocket pocket_delete_tag '{}' --json pocket.pocket_api_post
Call a safe relative Pocket v3 POST path for endpoints not covered by first-class tools.
write - Parameters
- path, payload
kosmo integrations:call pocket.pocket_api_post '{"path":"example_path","payload":"example_payload"}' --json kosmo integrations:pocket pocket_api_post '{"path":"example_path","payload":"example_payload"}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
pocket.pocket_request_token 0 parameters
kosmo integrations:schema pocket.pocket_request_token --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_authorize_url 0 parameters
kosmo integrations:schema pocket.pocket_authorize_url --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_access_token 0 parameters
kosmo integrations:schema pocket.pocket_access_token --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_add_item 0 parameters
kosmo integrations:schema pocket.pocket_add_item --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_retrieve_items 0 parameters
kosmo integrations:schema pocket.pocket_retrieve_items --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_send_actions 1 parameters
kosmo integrations:schema pocket.pocket_send_actions --json | Parameter | Type | Required | Description |
|---|---|---|---|
actions | array | yes | Pocket modify action objects. |
pocket.pocket_archive_item 0 parameters
kosmo integrations:schema pocket.pocket_archive_item --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_readd_item 0 parameters
kosmo integrations:schema pocket.pocket_readd_item --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_favorite_item 0 parameters
kosmo integrations:schema pocket.pocket_favorite_item --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_unfavorite_item 0 parameters
kosmo integrations:schema pocket.pocket_unfavorite_item --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_delete_item 0 parameters
kosmo integrations:schema pocket.pocket_delete_item --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_add_tags 0 parameters
kosmo integrations:schema pocket.pocket_add_tags --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_remove_tags 0 parameters
kosmo integrations:schema pocket.pocket_remove_tags --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_replace_tags 0 parameters
kosmo integrations:schema pocket.pocket_replace_tags --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_clear_tags 0 parameters
kosmo integrations:schema pocket.pocket_clear_tags --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_rename_tag 0 parameters
kosmo integrations:schema pocket.pocket_rename_tag --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_delete_tag 0 parameters
kosmo integrations:schema pocket.pocket_delete_tag --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pocket.pocket_api_post 2 parameters
kosmo integrations:schema pocket.pocket_api_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
path | string | yes | Relative Pocket API path. |
payload | object | no | JSON body fields. |
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.