CLI tool for accessing PocketSmith financial data via the API
Project description
PocketSmith Skill
Manage PocketSmith transactions, categories, and financial data via the API.
Repository: https://github.com/lextoumbourou/pocketsmith-skill
Features
- Transactions - List, view, create, update, and delete transactions
- Categories - Full CRUD for spending categories
- Budgets - View budget lists, summaries, and trend analysis
- Labels - Create and manage transaction labels
- Attachments - Manage receipts and documents attached to transactions
- User Info - View authenticated user details
- Write Protection - Safe by default, write operations require explicit opt-in
Installation
CLI (Recommended)
Install as a standalone command-line tool using pipx (recommended) or uv:
# Using pipx (recommended - isolated environment)
pipx install pocketsmith-cli
# Or using uv
uv tool install pocketsmith-cli
# Or using pip
pip install pocketsmith-cli
After installation, the pocketsmith command is available globally:
pocketsmith --help
pocketsmith me
pocketsmith transactions list-by-user 123456
Claude Code
Claude Code can automatically discover and use this skill. Install it as a personal skill (available across all projects) or a project skill (specific to one project).
Personal skill (recommended):
# Clone into your personal skills directory
mkdir -p ~/.claude/skills
cd ~/.claude/skills
git clone https://github.com/lextoumbourou/pocketsmith-skill.git pocketsmith
# Install dependencies
cd pocketsmith
uv sync
Project skill (for a specific project):
# Clone into your project's skills directory
mkdir -p .claude/skills
cd .claude/skills
git clone https://github.com/lextoumbourou/pocketsmith-skill.git pocketsmith
# Install dependencies
cd pocketsmith
uv sync
Once installed, Claude Code will automatically load the skill when relevant, or you can invoke it directly with /pocketsmith.
OpenClaw
Install as a managed skill (available to all agents) or workspace skill (specific to one workspace).
Managed skill (recommended):
# Clone into your managed skills directory
mkdir -p ~/.openclaw/skills
cd ~/.openclaw/skills
git clone https://github.com/lextoumbourou/pocketsmith-skill.git pocketsmith
# Install dependencies
cd pocketsmith
uv sync
Workspace skill (for a specific workspace):
# Clone into your workspace's skills directory
mkdir -p ./skills
cd ./skills
git clone https://github.com/lextoumbourou/pocketsmith-skill.git pocketsmith
# Install dependencies
cd pocketsmith
uv sync
Verify Installation
# If installed via pipx/pip
pocketsmith --help
# If installed as a skill (Claude Code/OpenClaw)
cd ~/.claude/skills/pocketsmith # or respective directory for your setup
uv run pocketsmith --help
Setup
1. Get PocketSmith Developer Key
- Log in to PocketSmith
- Go to Settings > Security > Manage Developer Keys
- Create a new developer key and copy it
2. Set Environment Variables
For Claude Code (~/.claude/settings.json):
{
"env": {
"POCKETSMITH_DEVELOPER_KEY": "your_developer_key"
}
}
For OpenClaw (~/.openclaw/openclaw.json):
{
"skills": {
"entries": {
"pocketsmith": {
"enabled": true,
"env": {
"POCKETSMITH_DEVELOPER_KEY": "your_developer_key"
}
}
}
}
}
For shell usage (~/.bashrc or ~/.zshrc):
export POCKETSMITH_DEVELOPER_KEY="your_developer_key"
3. Enable Write Operations (Optional)
Write operations (create, update, delete) are disabled by default for safety. To enable:
For Claude Code (~/.claude/settings.json):
{
"env": {
"POCKETSMITH_DEVELOPER_KEY": "your_developer_key",
"POCKETSMITH_ALLOW_WRITES": "true"
}
}
For OpenClaw (~/.openclaw/openclaw.json):
{
"skills": {
"entries": {
"pocketsmith": {
"enabled": true,
"env": {
"POCKETSMITH_DEVELOPER_KEY": "your_developer_key",
"POCKETSMITH_ALLOW_WRITES": "true"
}
}
}
}
}
For shell:
export POCKETSMITH_ALLOW_WRITES=true
4. Verify Authentication
pocketsmith auth status
Usage
CLI Commands
# Get current user
pocketsmith me
# List transactions for a user
pocketsmith transactions list-by-user 123456
# Search transactions
pocketsmith transactions list-by-user 123456 --search "coffee" --start-date 2024-01-01
# Get a specific transaction
pocketsmith transactions get 987654
# Update a transaction (requires POCKETSMITH_ALLOW_WRITES=true)
pocketsmith transactions update 987654 --category-id 28637787
# Create a transaction
pocketsmith transactions create 456789 --payee "Coffee Shop" --amount -5.50 --date 2024-01-15
# List categories
pocketsmith categories list 123456
# Create a category
pocketsmith categories create 123456 --title "Subscriptions" --parent-id 28601039
# List budget for a user
pocketsmith budget list 123456
# Get budget summary for a period
pocketsmith budget summary 123456 --period months --interval 1 --start-date 2024-01-01 --end-date 2024-12-31
# Get trend analysis for specific categories
pocketsmith budget trend 123456 --period months --interval 1 --start-date 2024-01-01 --end-date 2024-06-30 --categories 28600217,28637787 --scenarios 1,2
# List attachments for a transaction
pocketsmith attachments list-by-transaction 987654
# Get a specific attachment
pocketsmith attachments get 123456
# Get help
pocketsmith --help
pocketsmith transactions --help
pocketsmith categories --help
pocketsmith budget --help
pocketsmith attachments --help
In Claude Code / OpenClaw
Once the skill is installed, Claude will automatically use it when relevant. Just ask naturally:
- "Show me my PocketSmith transactions from last month"
- "Find all transactions containing 'Netflix'"
- "Categorize transaction 123456 as Subscriptions"
- "Create a new category called 'Side Projects' under Entertainment"
- "List all my spending categories"
You can also invoke the skill directly with /pocketsmith to see available commands.
API Reference
See IMPLEMENTATION_NOTES.md for implementation details and endpoint coverage.
Output
All commands output JSON to stdout. Errors are written to stderr.
Development
# Install dev dependencies
uv sync --extra dev
# Run tests
uv run pytest tests/ -v
# Run directly
uv run pocketsmith me
Troubleshooting
| Error | Solution |
|---|---|
POCKETSMITH_DEVELOPER_KEY environment variable is required |
Set POCKETSMITH_DEVELOPER_KEY |
Write operations are disabled |
Set POCKETSMITH_ALLOW_WRITES=true |
401 Unauthorized |
Check your developer key is valid |
404 Not Found |
Check the resource ID exists |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pocketsmith_cli-1.1.0.tar.gz.
File metadata
- Download URL: pocketsmith_cli-1.1.0.tar.gz
- Upload date:
- Size: 29.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff9693a4d9bd8ea44c3c3d5d4b22d62c28cd5fa0e3f7ff578f1ab456d621dbaa
|
|
| MD5 |
1c543734ec21aebf1646f9b640a69f1a
|
|
| BLAKE2b-256 |
996d57c20909918515ab0ea91453f29f34bde16462a820b1e2a628cca91746e3
|
Provenance
The following attestation bundles were made for pocketsmith_cli-1.1.0.tar.gz:
Publisher:
publish.yml on lextoumbourou/pocketsmith-skill
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pocketsmith_cli-1.1.0.tar.gz -
Subject digest:
ff9693a4d9bd8ea44c3c3d5d4b22d62c28cd5fa0e3f7ff578f1ab456d621dbaa - Sigstore transparency entry: 981378844
- Sigstore integration time:
-
Permalink:
lextoumbourou/pocketsmith-skill@26c42f40f89829a2bb0d8ff0024d36ed9e3df6f9 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/lextoumbourou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@26c42f40f89829a2bb0d8ff0024d36ed9e3df6f9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pocketsmith_cli-1.1.0-py3-none-any.whl.
File metadata
- Download URL: pocketsmith_cli-1.1.0-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a48aee3280fe022e8595e2c9cee3b004b10ebc8d75c77d994049ab08a49a9bd9
|
|
| MD5 |
57dd34a6f17f474668a2287325258ca5
|
|
| BLAKE2b-256 |
a466757cc1a1f0e730527b22a6b0477162674e94aa4f8d4e442ec3bce70358a0
|
Provenance
The following attestation bundles were made for pocketsmith_cli-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on lextoumbourou/pocketsmith-skill
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pocketsmith_cli-1.1.0-py3-none-any.whl -
Subject digest:
a48aee3280fe022e8595e2c9cee3b004b10ebc8d75c77d994049ab08a49a9bd9 - Sigstore transparency entry: 981378928
- Sigstore integration time:
-
Permalink:
lextoumbourou/pocketsmith-skill@26c42f40f89829a2bb0d8ff0024d36ed9e3df6f9 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/lextoumbourou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@26c42f40f89829a2bb0d8ff0024d36ed9e3df6f9 -
Trigger Event:
release
-
Statement type: