bkper 3.8.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -1
- package/README.md +217 -183
- package/lib/auth/auth-page.d.ts +14 -0
- package/lib/auth/auth-page.d.ts.map +1 -0
- package/lib/auth/auth-page.js +110 -0
- package/lib/auth/auth-page.js.map +1 -0
- package/lib/auth/local-auth-service.d.ts.map +1 -1
- package/lib/auth/local-auth-service.js +135 -17
- package/lib/auth/local-auth-service.js.map +1 -1
- package/lib/bkper-factory.d.ts.map +1 -0
- package/lib/{mcp/bkper-factory.js → bkper-factory.js} +5 -2
- package/lib/bkper-factory.js.map +1 -0
- package/lib/cli.d.ts +1 -1
- package/lib/cli.d.ts.map +1 -1
- package/lib/cli.js +839 -67
- package/lib/cli.js.map +1 -1
- package/lib/commands/accounts/create.d.ts +10 -0
- package/lib/commands/accounts/create.d.ts.map +1 -0
- package/lib/commands/accounts/create.js +42 -0
- package/lib/commands/accounts/create.js.map +1 -0
- package/lib/commands/accounts/delete.d.ts +3 -0
- package/lib/commands/accounts/delete.d.ts.map +1 -0
- package/lib/commands/accounts/delete.js +22 -0
- package/lib/commands/accounts/delete.js.map +1 -0
- package/lib/commands/accounts/get.d.ts +3 -0
- package/lib/commands/accounts/get.d.ts.map +1 -0
- package/lib/commands/accounts/get.js +22 -0
- package/lib/commands/accounts/get.js.map +1 -0
- package/lib/commands/accounts/index.d.ts +6 -0
- package/lib/commands/accounts/index.d.ts.map +1 -0
- package/lib/commands/accounts/index.js +6 -0
- package/lib/commands/accounts/index.js.map +1 -0
- package/lib/commands/accounts/list.d.ts +3 -0
- package/lib/commands/accounts/list.d.ts.map +1 -0
- package/lib/commands/accounts/list.js +19 -0
- package/lib/commands/accounts/list.js.map +1 -0
- package/lib/commands/accounts/update.d.ts +9 -0
- package/lib/commands/accounts/update.d.ts.map +1 -0
- package/lib/commands/accounts/update.js +40 -0
- package/lib/commands/accounts/update.js.map +1 -0
- package/lib/commands/apps/build.d.ts +11 -0
- package/lib/commands/apps/build.d.ts.map +1 -0
- package/lib/commands/apps/build.js +144 -0
- package/lib/commands/apps/build.js.map +1 -0
- package/lib/commands/apps/bundler.d.ts +34 -0
- package/lib/commands/apps/bundler.d.ts.map +1 -0
- package/lib/commands/apps/bundler.js +112 -0
- package/lib/commands/apps/bundler.js.map +1 -0
- package/lib/commands/apps/config.d.ts +51 -0
- package/lib/commands/apps/config.d.ts.map +1 -0
- package/lib/commands/apps/config.js +146 -0
- package/lib/commands/apps/config.js.map +1 -0
- package/lib/commands/apps/deploy.d.ts +23 -0
- package/lib/commands/apps/deploy.d.ts.map +1 -0
- package/lib/commands/apps/deploy.js +344 -0
- package/lib/commands/apps/deploy.js.map +1 -0
- package/lib/commands/apps/dev.d.ts +28 -0
- package/lib/commands/apps/dev.d.ts.map +1 -0
- package/lib/commands/apps/dev.js +393 -0
- package/lib/commands/apps/dev.js.map +1 -0
- package/lib/commands/apps/index.d.ts +12 -0
- package/lib/commands/apps/index.d.ts.map +1 -0
- package/lib/commands/apps/index.js +24 -0
- package/lib/commands/apps/index.js.map +1 -0
- package/lib/commands/apps/init.d.ts +7 -0
- package/lib/commands/apps/init.d.ts.map +1 -0
- package/lib/commands/apps/init.js +249 -0
- package/lib/commands/apps/init.js.map +1 -0
- package/lib/commands/apps/install.d.ts +3 -0
- package/lib/commands/apps/install.d.ts.map +1 -0
- package/lib/commands/apps/install.js +18 -0
- package/lib/commands/apps/install.js.map +1 -0
- package/lib/commands/apps/list.d.ts +7 -0
- package/lib/commands/apps/list.d.ts.map +1 -0
- package/lib/commands/apps/list.js +23 -0
- package/lib/commands/apps/list.js.map +1 -0
- package/lib/commands/apps/secrets.d.ts +22 -0
- package/lib/commands/apps/secrets.d.ts.map +1 -0
- package/lib/commands/apps/secrets.js +209 -0
- package/lib/commands/apps/secrets.js.map +1 -0
- package/lib/commands/{apps.d.ts → apps/sync.d.ts} +8 -7
- package/lib/commands/apps/sync.d.ts.map +1 -0
- package/lib/commands/apps/sync.js +76 -0
- package/lib/commands/apps/sync.js.map +1 -0
- package/lib/commands/apps/types.d.ts +54 -0
- package/lib/commands/apps/types.d.ts.map +1 -0
- package/lib/commands/apps/types.js +2 -0
- package/lib/commands/apps/types.js.map +1 -0
- package/lib/commands/apps/uninstall.d.ts +3 -0
- package/lib/commands/apps/uninstall.d.ts.map +1 -0
- package/lib/commands/apps/uninstall.js +23 -0
- package/lib/commands/apps/uninstall.js.map +1 -0
- package/lib/commands/balances/get.d.ts +12 -0
- package/lib/commands/balances/get.d.ts.map +1 -0
- package/lib/commands/balances/get.js +32 -0
- package/lib/commands/balances/get.js.map +1 -0
- package/lib/commands/balances/index.d.ts +2 -0
- package/lib/commands/balances/index.d.ts.map +1 -0
- package/lib/commands/balances/index.js +2 -0
- package/lib/commands/balances/index.js.map +1 -0
- package/lib/commands/books/create.d.ts +12 -0
- package/lib/commands/books/create.d.ts.map +1 -0
- package/lib/commands/books/create.js +37 -0
- package/lib/commands/books/create.js.map +1 -0
- package/lib/commands/books/get.d.ts +3 -0
- package/lib/commands/books/get.d.ts.map +1 -0
- package/lib/commands/books/get.js +17 -0
- package/lib/commands/books/get.js.map +1 -0
- package/lib/commands/books/index.d.ts +5 -0
- package/lib/commands/books/index.d.ts.map +1 -0
- package/lib/commands/books/index.js +5 -0
- package/lib/commands/books/index.js.map +1 -0
- package/lib/commands/books/list.d.ts +3 -0
- package/lib/commands/books/list.d.ts.map +1 -0
- package/lib/commands/books/list.js +17 -0
- package/lib/commands/books/list.js.map +1 -0
- package/lib/commands/books/update.d.ts +14 -0
- package/lib/commands/books/update.d.ts.map +1 -0
- package/lib/commands/books/update.js +46 -0
- package/lib/commands/books/update.js.map +1 -0
- package/lib/commands/collections/add-book.d.ts +3 -0
- package/lib/commands/collections/add-book.d.ts.map +1 -0
- package/lib/commands/collections/add-book.js +27 -0
- package/lib/commands/collections/add-book.js.map +1 -0
- package/lib/commands/collections/create.d.ts +6 -0
- package/lib/commands/collections/create.d.ts.map +1 -0
- package/lib/commands/collections/create.js +19 -0
- package/lib/commands/collections/create.js.map +1 -0
- package/lib/commands/collections/delete.d.ts +3 -0
- package/lib/commands/collections/delete.d.ts.map +1 -0
- package/lib/commands/collections/delete.js +22 -0
- package/lib/commands/collections/delete.js.map +1 -0
- package/lib/commands/collections/get.d.ts +3 -0
- package/lib/commands/collections/get.d.ts.map +1 -0
- package/lib/commands/collections/get.js +22 -0
- package/lib/commands/collections/get.js.map +1 -0
- package/lib/commands/collections/index.d.ts +8 -0
- package/lib/commands/collections/index.d.ts.map +1 -0
- package/lib/commands/collections/index.js +8 -0
- package/lib/commands/collections/index.js.map +1 -0
- package/lib/commands/collections/list.d.ts +3 -0
- package/lib/commands/collections/list.d.ts.map +1 -0
- package/lib/commands/collections/list.js +18 -0
- package/lib/commands/collections/list.js.map +1 -0
- package/lib/commands/collections/remove-book.d.ts +3 -0
- package/lib/commands/collections/remove-book.d.ts.map +1 -0
- package/lib/commands/collections/remove-book.js +27 -0
- package/lib/commands/collections/remove-book.js.map +1 -0
- package/lib/commands/collections/update.d.ts +6 -0
- package/lib/commands/collections/update.d.ts.map +1 -0
- package/lib/commands/collections/update.js +24 -0
- package/lib/commands/collections/update.js.map +1 -0
- package/lib/commands/groups/create.d.ts +9 -0
- package/lib/commands/groups/create.d.ts.map +1 -0
- package/lib/commands/groups/create.js +40 -0
- package/lib/commands/groups/create.js.map +1 -0
- package/lib/commands/groups/delete.d.ts +3 -0
- package/lib/commands/groups/delete.d.ts.map +1 -0
- package/lib/commands/groups/delete.js +22 -0
- package/lib/commands/groups/delete.js.map +1 -0
- package/lib/commands/groups/get.d.ts +3 -0
- package/lib/commands/groups/get.d.ts.map +1 -0
- package/lib/commands/groups/get.js +22 -0
- package/lib/commands/groups/get.js.map +1 -0
- package/lib/commands/groups/index.d.ts +6 -0
- package/lib/commands/groups/index.d.ts.map +1 -0
- package/lib/commands/groups/index.js +6 -0
- package/lib/commands/groups/index.js.map +1 -0
- package/lib/commands/groups/list.d.ts +3 -0
- package/lib/commands/groups/list.d.ts.map +1 -0
- package/lib/commands/groups/list.js +19 -0
- package/lib/commands/groups/list.js.map +1 -0
- package/lib/commands/groups/update.d.ts +8 -0
- package/lib/commands/groups/update.d.ts.map +1 -0
- package/lib/commands/groups/update.js +38 -0
- package/lib/commands/groups/update.js.map +1 -0
- package/lib/commands/skills.d.ts +17 -0
- package/lib/commands/skills.d.ts.map +1 -0
- package/lib/commands/skills.js +248 -0
- package/lib/commands/skills.js.map +1 -0
- package/lib/commands/transactions/check.d.ts +3 -0
- package/lib/commands/transactions/check.d.ts.map +1 -0
- package/lib/commands/transactions/check.js +22 -0
- package/lib/commands/transactions/check.js.map +1 -0
- package/lib/commands/transactions/create.d.ts +13 -0
- package/lib/commands/transactions/create.d.ts.map +1 -0
- package/lib/commands/transactions/create.js +55 -0
- package/lib/commands/transactions/create.js.map +1 -0
- package/lib/commands/transactions/index.d.ts +8 -0
- package/lib/commands/transactions/index.d.ts.map +1 -0
- package/lib/commands/transactions/index.js +8 -0
- package/lib/commands/transactions/index.js.map +1 -0
- package/lib/commands/transactions/list.d.ts +14 -0
- package/lib/commands/transactions/list.d.ts.map +1 -0
- package/lib/commands/transactions/list.js +26 -0
- package/lib/commands/transactions/list.js.map +1 -0
- package/lib/commands/transactions/merge.d.ts +8 -0
- package/lib/commands/transactions/merge.d.ts.map +1 -0
- package/lib/commands/transactions/merge.js +44 -0
- package/lib/commands/transactions/merge.js.map +1 -0
- package/lib/commands/transactions/post.d.ts +3 -0
- package/lib/commands/transactions/post.d.ts.map +1 -0
- package/lib/commands/transactions/post.js +22 -0
- package/lib/commands/transactions/post.js.map +1 -0
- package/lib/commands/transactions/trash.d.ts +3 -0
- package/lib/commands/transactions/trash.d.ts.map +1 -0
- package/lib/commands/transactions/trash.js +22 -0
- package/lib/commands/transactions/trash.js.map +1 -0
- package/lib/commands/transactions/update.d.ts +12 -0
- package/lib/commands/transactions/update.d.ts.map +1 -0
- package/lib/commands/transactions/update.js +53 -0
- package/lib/commands/transactions/update.js.map +1 -0
- package/lib/dev/auth-middleware.d.ts +18 -0
- package/lib/dev/auth-middleware.d.ts.map +1 -0
- package/lib/dev/auth-middleware.js +113 -0
- package/lib/dev/auth-middleware.js.map +1 -0
- package/lib/dev/cleanup.d.ts +10 -0
- package/lib/dev/cleanup.d.ts.map +1 -0
- package/lib/dev/cleanup.js +36 -0
- package/lib/dev/cleanup.js.map +1 -0
- package/lib/dev/cloudflared/constants.d.ts +35 -0
- package/lib/dev/cloudflared/constants.d.ts.map +1 -0
- package/lib/dev/cloudflared/constants.js +48 -0
- package/lib/dev/cloudflared/constants.js.map +1 -0
- package/lib/dev/cloudflared/index.d.ts +11 -0
- package/lib/dev/cloudflared/index.d.ts.map +1 -0
- package/lib/dev/cloudflared/index.js +10 -0
- package/lib/dev/cloudflared/index.js.map +1 -0
- package/lib/dev/cloudflared/install.d.ts +15 -0
- package/lib/dev/cloudflared/install.d.ts.map +1 -0
- package/lib/dev/cloudflared/install.js +140 -0
- package/lib/dev/cloudflared/install.js.map +1 -0
- package/lib/dev/cloudflared/tunnel.d.ts +64 -0
- package/lib/dev/cloudflared/tunnel.d.ts.map +1 -0
- package/lib/dev/cloudflared/tunnel.js +109 -0
- package/lib/dev/cloudflared/tunnel.js.map +1 -0
- package/lib/dev/esbuild.d.ts +28 -0
- package/lib/dev/esbuild.d.ts.map +1 -0
- package/lib/dev/esbuild.js +83 -0
- package/lib/dev/esbuild.js.map +1 -0
- package/lib/dev/logger.d.ts +51 -0
- package/lib/dev/logger.d.ts.map +1 -0
- package/lib/dev/logger.js +102 -0
- package/lib/dev/logger.js.map +1 -0
- package/lib/dev/miniflare.d.ts +32 -0
- package/lib/dev/miniflare.d.ts.map +1 -0
- package/lib/dev/miniflare.js +111 -0
- package/lib/dev/miniflare.js.map +1 -0
- package/lib/dev/preflight.d.ts +7 -0
- package/lib/dev/preflight.d.ts.map +1 -0
- package/lib/dev/preflight.js +61 -0
- package/lib/dev/preflight.js.map +1 -0
- package/lib/dev/shared.d.ts +7 -0
- package/lib/dev/shared.d.ts.map +1 -0
- package/lib/dev/shared.js +99 -0
- package/lib/dev/shared.js.map +1 -0
- package/lib/dev/tunnel.d.ts +31 -0
- package/lib/dev/tunnel.d.ts.map +1 -0
- package/lib/dev/tunnel.js +110 -0
- package/lib/dev/tunnel.js.map +1 -0
- package/lib/dev/types.d.ts +53 -0
- package/lib/dev/types.d.ts.map +1 -0
- package/lib/dev/types.js +223 -0
- package/lib/dev/types.js.map +1 -0
- package/lib/dev/vite.d.ts +50 -0
- package/lib/dev/vite.d.ts.map +1 -0
- package/lib/dev/vite.js +114 -0
- package/lib/dev/vite.js.map +1 -0
- package/lib/dev/webhook-dev.d.ts +9 -0
- package/lib/dev/webhook-dev.d.ts.map +1 -0
- package/lib/dev/webhook-dev.js +28 -0
- package/lib/dev/webhook-dev.js.map +1 -0
- package/lib/domain/transaction/merge-operation.d.ts.map +1 -0
- package/lib/{mcp/domain → domain}/transaction/merge-operation.js +10 -11
- package/lib/domain/transaction/merge-operation.js.map +1 -0
- package/lib/domain/transaction/merge-types.d.ts.map +1 -0
- package/lib/domain/transaction/merge-types.js.map +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/platform/client.d.ts +37 -0
- package/lib/platform/client.d.ts.map +1 -0
- package/lib/platform/client.js +37 -0
- package/lib/platform/client.js.map +1 -0
- package/lib/render/index.d.ts +3 -0
- package/lib/render/index.d.ts.map +1 -0
- package/lib/render/index.js +3 -0
- package/lib/render/index.js.map +1 -0
- package/lib/render/output.d.ts +15 -0
- package/lib/render/output.d.ts.map +1 -0
- package/lib/render/output.js +30 -0
- package/lib/render/output.js.map +1 -0
- package/lib/render/table-formatter.d.ts +34 -0
- package/lib/render/table-formatter.d.ts.map +1 -0
- package/lib/render/table-formatter.js +221 -0
- package/lib/render/table-formatter.js.map +1 -0
- package/lib/utils/properties.d.ts +12 -0
- package/lib/utils/properties.d.ts.map +1 -0
- package/lib/utils/properties.js +23 -0
- package/lib/utils/properties.js.map +1 -0
- package/package.json +23 -22
- package/lib/auth/keys.json +0 -12
- package/lib/commands/apps.d.ts.map +0 -1
- package/lib/commands/apps.js +0 -93
- package/lib/commands/apps.js.map +0 -1
- package/lib/mcp/bkper-factory.d.ts.map +0 -1
- package/lib/mcp/bkper-factory.js.map +0 -1
- package/lib/mcp/domain/transaction/merge-operation.d.ts.map +0 -1
- package/lib/mcp/domain/transaction/merge-operation.js.map +0 -1
- package/lib/mcp/domain/transaction/merge-types.d.ts.map +0 -1
- package/lib/mcp/domain/transaction/merge-types.js.map +0 -1
- package/lib/mcp/server.d.ts +0 -13
- package/lib/mcp/server.d.ts.map +0 -1
- package/lib/mcp/server.js +0 -161
- package/lib/mcp/server.js.map +0 -1
- package/lib/mcp/system-prompt.md +0 -192
- package/lib/mcp/tools/create_transactions.d.ts +0 -59
- package/lib/mcp/tools/create_transactions.d.ts.map +0 -1
- package/lib/mcp/tools/create_transactions.js +0 -163
- package/lib/mcp/tools/create_transactions.js.map +0 -1
- package/lib/mcp/tools/get_balances.d.ts +0 -26
- package/lib/mcp/tools/get_balances.d.ts.map +0 -1
- package/lib/mcp/tools/get_balances.js +0 -106
- package/lib/mcp/tools/get_balances.js.map +0 -1
- package/lib/mcp/tools/get_book.d.ts +0 -21
- package/lib/mcp/tools/get_book.d.ts.map +0 -1
- package/lib/mcp/tools/get_book.js +0 -126
- package/lib/mcp/tools/get_book.js.map +0 -1
- package/lib/mcp/tools/list_books.d.ts +0 -21
- package/lib/mcp/tools/list_books.d.ts.map +0 -1
- package/lib/mcp/tools/list_books.js +0 -67
- package/lib/mcp/tools/list_books.js.map +0 -1
- package/lib/mcp/tools/list_transactions.d.ts +0 -38
- package/lib/mcp/tools/list_transactions.d.ts.map +0 -1
- package/lib/mcp/tools/list_transactions.js +0 -109
- package/lib/mcp/tools/list_transactions.js.map +0 -1
- package/lib/mcp/tools/merge_transactions.d.ts +0 -40
- package/lib/mcp/tools/merge_transactions.d.ts.map +0 -1
- package/lib/mcp/tools/merge_transactions.js +0 -120
- package/lib/mcp/tools/merge_transactions.js.map +0 -1
- /package/lib/{mcp/bkper-factory.d.ts → bkper-factory.d.ts} +0 -0
- /package/lib/{mcp/domain → domain}/transaction/merge-operation.d.ts +0 -0
- /package/lib/{mcp/domain → domain}/transaction/merge-types.d.ts +0 -0
- /package/lib/{mcp/domain → domain}/transaction/merge-types.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026
|
|
4
|
+
|
|
5
|
+
### **February 2026**
|
|
6
|
+
|
|
7
|
+
**CLI**
|
|
8
|
+
|
|
9
|
+
- Table-formatted output is now the default for all commands
|
|
10
|
+
- Added `--json` global flag to output raw JSON instead of formatted tables
|
|
11
|
+
- Added `-b, --book` required option for scoping commands to a book
|
|
12
|
+
- Added `-p, --properties` flag to `transaction list` to include custom properties
|
|
13
|
+
- Transaction tables show formatted dates and values with IDs
|
|
14
|
+
- Group tables render as indented trees showing hierarchy
|
|
15
|
+
- Single-item commands display as indented key-value pairs
|
|
16
|
+
- Removed MCP server (`mcp start` command)
|
|
17
|
+
|
|
3
18
|
## 2025
|
|
4
19
|
|
|
5
20
|
### **October 2025**
|
|
6
21
|
|
|
7
22
|
**MCP Server**
|
|
23
|
+
|
|
8
24
|
- Added smart transaction merging - combine multiple transactions intelligently based on date and account matching
|
|
9
25
|
- Simplified transaction creation - accounts are now optional, making it easier to record simple income and expenses
|
|
10
26
|
- Improved transaction data responses for better AI assistant integration
|
|
@@ -12,12 +28,14 @@
|
|
|
12
28
|
### **September 2025**
|
|
13
29
|
|
|
14
30
|
**MCP Server**
|
|
31
|
+
|
|
15
32
|
- Streamlined transaction data for cleaner AI assistant responses
|
|
16
33
|
- Fixed credential storage to follow standard configuration directories
|
|
17
34
|
|
|
18
35
|
### **July 2025**
|
|
19
36
|
|
|
20
37
|
**MCP Server**
|
|
38
|
+
|
|
21
39
|
- Added support for AI assistants to analyze your books with monthly and year-to-date balances
|
|
22
40
|
- Improved date filtering with more intuitive `before:` operator
|
|
23
41
|
- Added setup instructions for Claude Desktop and other AI tools
|
|
@@ -25,5 +43,6 @@
|
|
|
25
43
|
### **June 2025**
|
|
26
44
|
|
|
27
45
|
**bkper-node CLI**
|
|
46
|
+
|
|
28
47
|
- Introduced MCP server - connect AI assistants to your Bkper books with `bkper mcp start`
|
|
29
|
-
- Added book name filtering to quickly find specific books
|
|
48
|
+
- Added book name filtering to quickly find specific books
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[Bkper REST API]: https://bkper.com/docs/#rest-api-enabling
|
|
2
2
|
|
|
3
|
-
A **command line** utility for managing [Bkper Apps
|
|
3
|
+
A **command line** utility for managing [Bkper Apps](https://bkper.com/docs/) and interacting with Bkper data.
|
|
4
4
|
|
|
5
|
-
The
|
|
5
|
+
The CLI provides atomic operations for app deployment and management, plus data commands for books, accounts, groups, transactions, and balances. Designed to work seamlessly with AI coding agents (Claude Code, OpenCode) that orchestrate the development workflow.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/bkper)
|
|
8
8
|
|
|
@@ -20,98 +20,237 @@ npm i -g bkper
|
|
|
20
20
|
yarn global add bkper
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
### bun
|
|
23
|
+
### bun (recommended)
|
|
24
24
|
|
|
25
25
|
```
|
|
26
26
|
bun add -g bkper
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
##
|
|
30
|
-
|
|
31
|
-
- `login` - Logs the user in, storing local credentials.
|
|
32
|
-
- `logout` - Logs out the user by deleting client credentials.
|
|
33
|
-
- `mcp start` - Start the Bkper MCP (Model Context Protocol) server.
|
|
34
|
-
- `apps list` - List all apps you have access to.
|
|
35
|
-
- `apps create` - Create a new App based on `./bkperapp.yaml` file.
|
|
36
|
-
- `apps update` - Update an existing App based on `./bkperapp.yaml` file.
|
|
29
|
+
## Development Model
|
|
37
30
|
|
|
38
|
-
|
|
31
|
+
Bkper apps are developed with AI coding agents as the primary interface. The CLI provides **atomic, composable operations** that agents orchestrate:
|
|
39
32
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
```
|
|
33
|
+
- **Typical developers**: Work with AI agents (Claude Code, OpenCode) that handle build, watch, and deploy decisions
|
|
34
|
+
- **Advanced developers**: Use CLI directly with the same atomic commands
|
|
43
35
|
|
|
44
|
-
|
|
36
|
+
The CLI focuses on **platform operations** (deploy, sync, secrets) while build and development workflows are handled by standard tools (`bun run build`, `bun run dev`) orchestrated by agents or developers directly.
|
|
45
37
|
|
|
46
|
-
|
|
38
|
+
## Commands
|
|
47
39
|
|
|
48
|
-
|
|
40
|
+
### Authentication
|
|
41
|
+
|
|
42
|
+
- `login` - Authenticate with Bkper, storing credentials locally
|
|
43
|
+
- `logout` - Remove stored credentials
|
|
44
|
+
|
|
45
|
+
### App Management
|
|
46
|
+
|
|
47
|
+
- `app init <name>` - Scaffold a new app from the template
|
|
48
|
+
- `app list` - List all apps you have access to
|
|
49
|
+
- `app sync` - Sync `bkper.yaml` configuration (URLs, description) to Bkper API
|
|
50
|
+
- `app deploy` - Deploy built artifacts to Cloudflare Workers for Platforms
|
|
51
|
+
- `--dev` - Deploy to development environment
|
|
52
|
+
- `--events` - Deploy events handler instead of web handler
|
|
53
|
+
- `app status` - Show deployment status
|
|
54
|
+
- `app undeploy` - Remove app from platform
|
|
55
|
+
- `--dev` - Remove from development environment
|
|
56
|
+
- `--events` - Remove events handler instead of web handler
|
|
57
|
+
- `--delete-data` - Permanently delete all associated data (requires confirmation)
|
|
58
|
+
- `--force` - Skip confirmation prompts (use with `--delete-data` for automation)
|
|
59
|
+
- `app dev` - Run local development servers
|
|
60
|
+
- `--cp, --client-port <port>` - Client dev server port (default: `5173`)
|
|
61
|
+
- `--sp, --server-port <port>` - Server simulation port (default: `8787`)
|
|
62
|
+
- `--ep, --events-port <port>` - Events handler port (default: `8791`)
|
|
63
|
+
- `-w, --web` - Run only the web handler
|
|
64
|
+
- `-e, --events` - Run only the events handler
|
|
65
|
+
- `app build` - Build app artifacts
|
|
66
|
+
- `app install <appId> -b <bookId>` - Install an app on a book
|
|
67
|
+
- `app uninstall <appId> -b <bookId>` - Uninstall an app from a book
|
|
68
|
+
|
|
69
|
+
> **Note:** `sync` and `deploy` are independent operations. Use `sync` to update your app's URLs
|
|
70
|
+
> in Bkper (required for webhooks and menu integration). Use `deploy` to push code to Cloudflare.
|
|
71
|
+
> For a typical deployment workflow, run both: `bkper app sync && bkper app deploy`
|
|
72
|
+
|
|
73
|
+
### Secrets Management
|
|
74
|
+
|
|
75
|
+
- `app secrets put <name>` - Store a secret
|
|
76
|
+
- `app secrets list` - List all secrets
|
|
77
|
+
- `app secrets delete <name>` - Delete a secret
|
|
78
|
+
|
|
79
|
+
### Data Commands
|
|
80
|
+
|
|
81
|
+
All data commands that operate within a book use `-b, --book <bookId>` to specify the book context.
|
|
82
|
+
|
|
83
|
+
#### Books
|
|
84
|
+
|
|
85
|
+
- `book list` - List all books
|
|
86
|
+
- `-q, --query <query>` - Search query
|
|
87
|
+
- `book get <bookId>` - Get a book's details
|
|
88
|
+
- `book create` - Create a new book
|
|
89
|
+
- `--name <name>` - Book name (required)
|
|
90
|
+
- `--fraction-digits <digits>` - Number of decimal places (`0`-`8`)
|
|
91
|
+
- `--date-pattern <pattern>` - Date format pattern (`dd/MM/yyyy`, `MM/dd/yyyy`, or `yyyy/MM/dd`)
|
|
92
|
+
- `--decimal-separator <separator>` - Decimal separator (`DOT` or `COMMA`)
|
|
93
|
+
- `--time-zone <timezone>` - IANA time zone (e.g. `America/New_York`, `UTC`)
|
|
94
|
+
- `--period <period>` - Period (`MONTH`, `QUARTER`, or `YEAR`)
|
|
95
|
+
- `-p, --property <key=value>` - Set a property (repeatable)
|
|
96
|
+
- `book update <bookId>` - Update a book
|
|
97
|
+
- `--name <name>` - Book name
|
|
98
|
+
- `--fraction-digits <digits>` - Number of decimal places (`0`-`8`)
|
|
99
|
+
- `--date-pattern <pattern>` - Date format pattern (`dd/MM/yyyy`, `MM/dd/yyyy`, or `yyyy/MM/dd`)
|
|
100
|
+
- `--decimal-separator <separator>` - Decimal separator (`DOT` or `COMMA`)
|
|
101
|
+
- `--time-zone <timezone>` - IANA time zone identifier (e.g. `America/New_York`, `Europe/London`, `UTC`)
|
|
102
|
+
- `--lock-date <date>` - Lock date in ISO format (`yyyy-MM-dd`, e.g. `2024-01-31`)
|
|
103
|
+
- `--closing-date <date>` - Closing date in ISO format (`yyyy-MM-dd`)
|
|
104
|
+
- `--period <period>` - Period (`MONTH`, `QUARTER`, or `YEAR`)
|
|
105
|
+
- `-p, --property <key=value>` - Set a property (repeatable, e.g. `-p code=1010 -p branch=NYC`; empty value deletes the property)
|
|
106
|
+
|
|
107
|
+
#### Accounts
|
|
108
|
+
|
|
109
|
+
- `account list -b <bookId>` - List accounts in a book
|
|
110
|
+
- `account get <nameOrId> -b <bookId>` - Get an account
|
|
111
|
+
- `account create -b <bookId>` - Create a new account
|
|
112
|
+
- `--name <name>` - Account name (required)
|
|
113
|
+
- `--type <type>` - Account type (`ASSET`, `LIABILITY`, `INCOMING`, `OUTGOING`)
|
|
114
|
+
- `--description <description>` - Account description
|
|
115
|
+
- `--groups <groups>` - Comma-separated group names
|
|
116
|
+
- `-p, --property <key=value>` - Set a property (repeatable)
|
|
117
|
+
- `account update <nameOrId> -b <bookId>` - Update an account
|
|
118
|
+
- `--name <name>` - Account name
|
|
119
|
+
- `--type <type>` - Account type (`ASSET`, `LIABILITY`, `INCOMING`, `OUTGOING`)
|
|
120
|
+
- `--archived <true|false>` - Archive status
|
|
121
|
+
- `-p, --property <key=value>` - Set a property (repeatable, merges with existing)
|
|
122
|
+
- `account delete <nameOrId> -b <bookId>` - Delete an account
|
|
123
|
+
|
|
124
|
+
#### Groups
|
|
125
|
+
|
|
126
|
+
- `group list -b <bookId>` - List groups in a book
|
|
127
|
+
- `group get <nameOrId> -b <bookId>` - Get a group
|
|
128
|
+
- `group create -b <bookId>` - Create a new group
|
|
129
|
+
- `--name <name>` - Group name (required)
|
|
130
|
+
- `--parent <parent>` - Parent group name or ID
|
|
131
|
+
- `--hidden` - Hide the group
|
|
132
|
+
- `-p, --property <key=value>` - Set a property (repeatable)
|
|
133
|
+
- `group update <nameOrId> -b <bookId>` - Update a group
|
|
134
|
+
- `--name <name>` - Group name
|
|
135
|
+
- `--hidden <true|false>` - Hide status
|
|
136
|
+
- `-p, --property <key=value>` - Set a property (repeatable, merges with existing)
|
|
137
|
+
- `group delete <nameOrId> -b <bookId>` - Delete a group
|
|
138
|
+
|
|
139
|
+
#### Transactions
|
|
140
|
+
|
|
141
|
+
- `transaction list -b <bookId> -q <query>` - List transactions matching a query
|
|
142
|
+
- `-l, --limit <limit>` - Maximum number of results (`1`-`1000`, default `100`)
|
|
143
|
+
- `-c, --cursor <cursor>` - Pagination cursor
|
|
144
|
+
- `-p, --properties` - Include custom properties in the output
|
|
145
|
+
- `transaction create -b <bookId>` - Create a transaction
|
|
146
|
+
- `--date <date>` - Transaction date (required)
|
|
147
|
+
- `--amount <amount>` - Transaction amount (required)
|
|
148
|
+
- `--description <description>` - Transaction description
|
|
149
|
+
- `--from <from>` - Credit account (source)
|
|
150
|
+
- `--to <to>` - Debit account (destination)
|
|
151
|
+
- `--url <url>` - URL (repeatable)
|
|
152
|
+
- `--remote-id <remoteId>` - Remote ID (repeatable)
|
|
153
|
+
- `-p, --property <key=value>` - Set a property (repeatable, empty value deletes)
|
|
154
|
+
- `transaction update <transactionId> -b <bookId>` - Update a transaction
|
|
155
|
+
- `--date <date>` - Transaction date
|
|
156
|
+
- `--amount <amount>` - Transaction amount
|
|
157
|
+
- `--description <description>` - Transaction description
|
|
158
|
+
- `--from <from>` - Credit account (source)
|
|
159
|
+
- `--to <to>` - Debit account (destination)
|
|
160
|
+
- `--url <url>` - URL (repeatable, replaces all)
|
|
161
|
+
- `-p, --property <key=value>` - Set a property (repeatable, empty value deletes)
|
|
162
|
+
- `transaction post <id> -b <bookId>` - Post a draft transaction
|
|
163
|
+
- `transaction check <id> -b <bookId>` - Check a transaction
|
|
164
|
+
- `transaction trash <id> -b <bookId>` - Trash a transaction
|
|
165
|
+
- `transaction merge <id1> <id2> -b <bookId>` - Merge two transactions
|
|
166
|
+
|
|
167
|
+
#### Balances
|
|
168
|
+
|
|
169
|
+
- `balance get -b <bookId> -q <query>` - Get account balances
|
|
170
|
+
- `--expanded <level>` - Expand groups to specified depth (`0`+)
|
|
171
|
+
|
|
172
|
+
#### Collections
|
|
173
|
+
|
|
174
|
+
- `collection list` - List all collections
|
|
175
|
+
- `collection get <collectionId>` - Get a collection
|
|
176
|
+
- `collection create` - Create a new collection
|
|
177
|
+
- `--name <name>` - Collection name (required)
|
|
178
|
+
- `collection update <collectionId>` - Update a collection
|
|
179
|
+
- `--name <name>` - Collection name
|
|
180
|
+
- `collection delete <collectionId>` - Delete a collection
|
|
181
|
+
- `collection add-book <collectionId>` - Add books to a collection
|
|
182
|
+
- `-b, --book <bookId>` - Book ID (repeatable)
|
|
183
|
+
- `collection remove-book <collectionId>` - Remove books from a collection
|
|
184
|
+
- `-b, --book <bookId>` - Book ID (repeatable)
|
|
185
|
+
|
|
186
|
+
### Output Format
|
|
187
|
+
|
|
188
|
+
All commands output human-readable formatted tables by default. Use the `--json` global flag to get raw JSON output instead.
|
|
49
189
|
|
|
50
190
|
```bash
|
|
51
|
-
|
|
52
|
-
|
|
191
|
+
# Table output (default)
|
|
192
|
+
bkper book list
|
|
53
193
|
|
|
54
|
-
|
|
194
|
+
# JSON output
|
|
195
|
+
bkper book list --json
|
|
55
196
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
- **get_balances** - Get account balances with query filtering
|
|
59
|
-
- **list_transactions** - List transactions with filtering and pagination
|
|
60
|
-
- **create_transactions** - Create transactions in batch
|
|
61
|
-
- **merge_transactions** - Merge duplicate transactions into one
|
|
197
|
+
# List accounts in a book
|
|
198
|
+
bkper account list -b abc123
|
|
62
199
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
200
|
+
# List transactions with properties
|
|
201
|
+
bkper transaction list -b abc123 -q "after:2025-01-01" -p
|
|
202
|
+
```
|
|
66
203
|
|
|
67
|
-
|
|
204
|
+
### Examples
|
|
68
205
|
|
|
69
|
-
|
|
206
|
+
```bash
|
|
207
|
+
# Authenticate
|
|
208
|
+
bkper login
|
|
70
209
|
|
|
71
|
-
|
|
210
|
+
# Create a new app
|
|
211
|
+
bkper app init my-app
|
|
72
212
|
|
|
73
|
-
|
|
213
|
+
# Deploy to production (run from app directory)
|
|
214
|
+
bkper app deploy
|
|
74
215
|
|
|
75
|
-
|
|
216
|
+
# Deploy to development environment
|
|
217
|
+
bkper app deploy --dev
|
|
76
218
|
|
|
77
|
-
|
|
78
|
-
|
|
219
|
+
# Deploy only the events handler to dev
|
|
220
|
+
bkper app deploy --dev --events
|
|
79
221
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"mcpServers": {
|
|
83
|
-
"bkper": {
|
|
84
|
-
"command": "bkper",
|
|
85
|
-
"args": ["mcp", "start"]
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
```
|
|
222
|
+
# Check deployment status
|
|
223
|
+
bkper app status
|
|
90
224
|
|
|
91
|
-
|
|
225
|
+
# Manage secrets
|
|
226
|
+
bkper app secrets put API_KEY
|
|
227
|
+
bkper app secrets list
|
|
92
228
|
|
|
93
|
-
|
|
229
|
+
# Install/uninstall apps
|
|
230
|
+
bkper app install my-app -b abc123
|
|
231
|
+
bkper app uninstall my-app -b abc123
|
|
94
232
|
|
|
95
|
-
|
|
96
|
-
bkper
|
|
97
|
-
```
|
|
233
|
+
# Create a transaction
|
|
234
|
+
bkper transaction create -b abc123 --date 2025-01-15 --amount 100.50 --from "Bank Account" --to "Office Supplies" --description "Printer paper"
|
|
98
235
|
|
|
99
|
-
|
|
236
|
+
# Update a transaction
|
|
237
|
+
bkper transaction update tx_456 -b abc123 --amount 120.00 --description "Printer paper (corrected)"
|
|
100
238
|
|
|
101
|
-
|
|
239
|
+
# Create a new book with Brazilian settings
|
|
240
|
+
bkper book create --name "My Company" --fraction-digits 2 --date-pattern "dd/MM/yyyy" --decimal-separator COMMA --time-zone "America/Sao_Paulo"
|
|
102
241
|
|
|
103
|
-
|
|
242
|
+
# Create a book with custom properties
|
|
243
|
+
bkper book create --name "Project X" -p "code=PX001" -p "department=Engineering"
|
|
104
244
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
- Merge duplicate transactions
|
|
245
|
+
# Create and manage collections
|
|
246
|
+
bkper collection create --name "My Collection"
|
|
247
|
+
bkper collection add-book col_789 -b abc123 -b def456
|
|
248
|
+
bkper collection list
|
|
249
|
+
```
|
|
111
250
|
|
|
112
|
-
|
|
251
|
+
## Apps Configuration
|
|
113
252
|
|
|
114
|
-
|
|
253
|
+
Apps are configured via a `bkper.yaml` file in the project root.
|
|
115
254
|
|
|
116
255
|
### Environment Variables
|
|
117
256
|
|
|
@@ -119,134 +258,27 @@ For more information about the Model Context Protocol, visit [modelcontextprotoc
|
|
|
119
258
|
|
|
120
259
|
Set it for direct API access with your own quotas and attribution. Follow [these](https://bkper.com/docs/#rest-api-enabling) steps.
|
|
121
260
|
|
|
122
|
-
###
|
|
123
|
-
|
|
124
|
-
```yaml
|
|
125
|
-
# BASIC APP CONFIGURATION
|
|
126
|
-
|
|
127
|
-
# The agent id of the App or Bot. It can NOT be changed after the App or Bot is created.
|
|
128
|
-
id: my-custom-app
|
|
129
|
-
|
|
130
|
-
# The readable name of the App or Bot.
|
|
131
|
-
name: My Custom App
|
|
132
|
-
|
|
133
|
-
# The logo url from public host. Best fit 200x200 px. Use https://
|
|
134
|
-
logoUrl: https://static.thenounproject.com/png/2318500-200.png
|
|
135
|
-
|
|
136
|
-
# The logo url to be used when in dark mode
|
|
137
|
-
logoUrlDark: https://static.thenounproject.com/png/2318500-200.png
|
|
138
|
-
|
|
139
|
-
# ACCESS CONTROL (safe to version - uses usernames, not emails)
|
|
140
|
-
|
|
141
|
-
# Developers who can update the App. Comma or space separated usernames.
|
|
142
|
-
# Supports domain wildcards for registered custom domains (e.g., *@bkper.com)
|
|
143
|
-
developers: victor, aldo, *@bkper.com
|
|
144
|
-
|
|
145
|
-
# Users who can use the App while not yet published. Comma or space separated usernames.
|
|
146
|
-
# Supports domain wildcards for registered custom domains (e.g., *@acme.com)
|
|
147
|
-
users: maria, *@acme.com
|
|
148
|
-
|
|
149
|
-
# CONTEXT MENU CONFIGURATION
|
|
150
|
-
|
|
151
|
-
# The menu production url to open in the popup window. See accepted expressions bellow.
|
|
152
|
-
menuUrl: https://script.google.com/macros/s/AKfycbxz1Fl1A_KpvAtWLSXtGh1oRaFdWibPweoJfa3yYrFRAAC6gRM/exec?bookId=${book.id}
|
|
153
|
-
|
|
154
|
-
# The menu development url that will be used while developing.
|
|
155
|
-
menuUrlDev: https://script.google.com/a/bkper.com/macros/s/AKfycbwg42np5A-niYBI7Qq2yxOguhcoNgEkqqe0aRLw628/dev?bookId=${book.id}
|
|
156
|
-
|
|
157
|
-
# The context menu call to action.
|
|
158
|
-
menuText: Open My Custom App
|
|
159
|
-
|
|
160
|
-
menuPopupWidth: 500 # width in pixels. Default to 80% of screen width.
|
|
161
|
-
menuPopupHeight: 300 # height in pixels. Default to 90% of screen height.
|
|
162
|
-
|
|
163
|
-
# BOT EVENTS CONFIGURATION
|
|
164
|
-
|
|
165
|
-
# The webhook url to be called by Bkper when an event occurs.
|
|
166
|
-
webhookUrl: https://us-central1-bkper-tax-trigger.cloudfunctions.net/events
|
|
167
|
-
|
|
168
|
-
# The events the Bot is capable of processing by the webhook.
|
|
169
|
-
# This is optional and, if not specified, no events will be processed.
|
|
170
|
-
events:
|
|
171
|
-
- "TRANSACTION_POSTED"
|
|
172
|
-
- "TRANSACTION_CHECKED"
|
|
173
|
-
- "TRANSACTION_UNCHECKED"
|
|
174
|
-
- "TRANSACTION_UPDATED"
|
|
175
|
-
- "TRANSACTION_DELETED"
|
|
176
|
-
- "TRANSACTION_RESTORED"
|
|
177
|
-
- "ACCOUNT_CREATED"
|
|
178
|
-
- "ACCOUNT_UPDATED"
|
|
179
|
-
- "ACCOUNT_DELETED"
|
|
180
|
-
- "GROUP_CREATED"
|
|
181
|
-
- "GROUP_UPDATED"
|
|
182
|
-
- "GROUP_DELETED"
|
|
183
|
-
- "FILE_CREATED"
|
|
184
|
-
- "BOOK_UPDATED"
|
|
185
|
-
|
|
186
|
-
# The file patterns the Bot is capable of processing. It accepts wildcards. E.g.
|
|
187
|
-
filePatterns:
|
|
188
|
-
- "radiusbank*.ofx"
|
|
189
|
-
- "-*.qif"
|
|
190
|
-
- "*.csv"
|
|
191
|
-
|
|
192
|
-
# Schema to provide autocompletion on properties editor.
|
|
193
|
-
propertiesSchema:
|
|
194
|
-
book:
|
|
195
|
-
keys:
|
|
196
|
-
- "key1"
|
|
197
|
-
- "key2"
|
|
198
|
-
values:
|
|
199
|
-
- "value2"
|
|
200
|
-
- "value2"
|
|
201
|
-
group:
|
|
202
|
-
keys:
|
|
203
|
-
- "key1"
|
|
204
|
-
- "key2"
|
|
205
|
-
values:
|
|
206
|
-
- "value2"
|
|
207
|
-
- "value2"
|
|
208
|
-
account:
|
|
209
|
-
keys:
|
|
210
|
-
- "key1"
|
|
211
|
-
- "key2"
|
|
212
|
-
values:
|
|
213
|
-
- "value2"
|
|
214
|
-
- "value2"
|
|
215
|
-
transaction:
|
|
216
|
-
keys:
|
|
217
|
-
- "key1"
|
|
218
|
-
- "key2"
|
|
219
|
-
values:
|
|
220
|
-
- "value2"
|
|
221
|
-
- "value2"
|
|
222
|
-
```
|
|
261
|
+
### `bkper.yaml` Reference
|
|
223
262
|
|
|
224
|
-
|
|
263
|
+
See the complete reference with all available fields and documentation:
|
|
225
264
|
|
|
226
|
-
-
|
|
227
|
-
- `${book.properties.xxxxx}` - any property value from the current book
|
|
228
|
-
- `${transactions.query}` - the current query being executed on transactions list
|
|
229
|
-
- `${transactions.ids}` - the ids of selected transactions, splitted by comma
|
|
230
|
-
- `${account.id}` - the current account being filterd
|
|
231
|
-
- `${account.properties.xxxxx}` - any property value from the current account being filtered
|
|
232
|
-
- `${group.id}` - the current group being filterd
|
|
233
|
-
- `${group.properties.xxxxx}` - any property value from the current group being filtered
|
|
265
|
+
**[docs/bkper-reference.yaml](https://raw.githubusercontent.com/bkper/bkper-cli/main/docs/bkper-reference.yaml)**
|
|
234
266
|
|
|
235
|
-
|
|
267
|
+
## Developer Tooling (Skills)
|
|
236
268
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
269
|
+
The CLI automatically syncs AI agent skills from the [skills repository](https://github.com/bkper/skills). Skills provide procedural knowledge to AI coding assistants (Claude Code, OpenCode) when working on Bkper apps.
|
|
270
|
+
|
|
271
|
+
Skills are synced when running:
|
|
240
272
|
|
|
241
|
-
|
|
273
|
+
- `bkper app init <name>` - when creating a new app
|
|
242
274
|
|
|
243
|
-
|
|
275
|
+
## Library
|
|
244
276
|
|
|
245
|
-
|
|
277
|
+
The `getOAuthToken` function returns a Promise that resolves to a valid OAuth token, for use with the [`bkper-js`](https://github.com/bkper/bkper-js) library:
|
|
246
278
|
|
|
247
279
|
```javascript
|
|
248
|
-
import { Bkper } from
|
|
249
|
-
import { getOAuthToken } from
|
|
280
|
+
import { Bkper } from 'bkper-js';
|
|
281
|
+
import { getOAuthToken } from 'bkper';
|
|
250
282
|
|
|
251
283
|
Bkper.setConfig({
|
|
252
284
|
oauthTokenProvider: async () => getOAuthToken(),
|
|
@@ -255,4 +287,6 @@ Bkper.setConfig({
|
|
|
255
287
|
|
|
256
288
|
## Documentation
|
|
257
289
|
|
|
258
|
-
-
|
|
290
|
+
- [Developer Docs](https://bkper.com/docs)
|
|
291
|
+
- [App Template](https://github.com/bkper/bkper-app-template)
|
|
292
|
+
- [Skills Repository](https://github.com/bkper/skills)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth callback page generation for Bkper CLI.
|
|
3
|
+
* Renders styled HTML pages for authentication success/error states.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Generates a styled HTML page for OAuth callback responses.
|
|
7
|
+
* Uses the Bkper logo and brand colors for a professional appearance.
|
|
8
|
+
*/
|
|
9
|
+
export declare function generateAuthPage(options: {
|
|
10
|
+
type: 'success' | 'error';
|
|
11
|
+
title: string;
|
|
12
|
+
message: string;
|
|
13
|
+
}): string;
|
|
14
|
+
//# sourceMappingURL=auth-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-page.d.ts","sourceRoot":"","sources":["../../src/auth/auth-page.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACtC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAqGT"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth callback page generation for Bkper CLI.
|
|
3
|
+
* Renders styled HTML pages for authentication success/error states.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Bkper CLI logo URL (from GitHub raw)
|
|
7
|
+
*/
|
|
8
|
+
const LOGO_URL = 'https://raw.githubusercontent.com/bkper/bkper-cli/main/assets/bkper-cli-logo.svg';
|
|
9
|
+
/**
|
|
10
|
+
* Generates a styled HTML page for OAuth callback responses.
|
|
11
|
+
* Uses the Bkper logo and brand colors for a professional appearance.
|
|
12
|
+
*/
|
|
13
|
+
export function generateAuthPage(options) {
|
|
14
|
+
const { type, title, message } = options;
|
|
15
|
+
const isSuccess = type === 'success';
|
|
16
|
+
// Colors from Bkper brand
|
|
17
|
+
const accentColor = isSuccess ? '#3aaa57' : '#d14836';
|
|
18
|
+
// Status icons (checkmark for success, X for error)
|
|
19
|
+
const icon = isSuccess
|
|
20
|
+
? `<svg class="status-icon" viewBox="0 0 24 24" fill="none" stroke="${accentColor}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>`
|
|
21
|
+
: `<svg class="status-icon" viewBox="0 0 24 24" fill="none" stroke="${accentColor}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>`;
|
|
22
|
+
return `<!DOCTYPE html>
|
|
23
|
+
<html lang="en">
|
|
24
|
+
<head>
|
|
25
|
+
<meta charset="UTF-8">
|
|
26
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
27
|
+
<title>${title} - Bkper CLI</title>
|
|
28
|
+
<style>
|
|
29
|
+
*, *::before, *::after {
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
}
|
|
32
|
+
body {
|
|
33
|
+
margin: 0;
|
|
34
|
+
min-height: 100vh;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
39
|
+
background: #f5f5f5;
|
|
40
|
+
color: #333;
|
|
41
|
+
line-height: 1.5;
|
|
42
|
+
}
|
|
43
|
+
@media (prefers-color-scheme: dark) {
|
|
44
|
+
body {
|
|
45
|
+
background: #1a1a1a;
|
|
46
|
+
color: #e0e0e0;
|
|
47
|
+
}
|
|
48
|
+
.card {
|
|
49
|
+
background: #2d2d2d;
|
|
50
|
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
.card {
|
|
54
|
+
background: white;
|
|
55
|
+
border-radius: 12px;
|
|
56
|
+
padding: 48px 40px;
|
|
57
|
+
max-width: 420px;
|
|
58
|
+
width: 90%;
|
|
59
|
+
text-align: center;
|
|
60
|
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
|
|
61
|
+
}
|
|
62
|
+
.logo {
|
|
63
|
+
width: 100px;
|
|
64
|
+
height: 100px;
|
|
65
|
+
margin-bottom: 24px;
|
|
66
|
+
}
|
|
67
|
+
.status-icon {
|
|
68
|
+
width: 56px;
|
|
69
|
+
height: 56px;
|
|
70
|
+
margin-bottom: 16px;
|
|
71
|
+
}
|
|
72
|
+
h1 {
|
|
73
|
+
margin: 0 0 12px;
|
|
74
|
+
font-size: 24px;
|
|
75
|
+
font-weight: 600;
|
|
76
|
+
color: ${accentColor};
|
|
77
|
+
}
|
|
78
|
+
p {
|
|
79
|
+
margin: 0;
|
|
80
|
+
font-size: 16px;
|
|
81
|
+
color: #555;
|
|
82
|
+
}
|
|
83
|
+
@media (prefers-color-scheme: dark) {
|
|
84
|
+
p {
|
|
85
|
+
color: #ccc;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
.hint {
|
|
89
|
+
margin-top: 24px;
|
|
90
|
+
padding-top: 24px;
|
|
91
|
+
border-top: 1px solid rgba(128, 128, 128, 0.2);
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
color: #888;
|
|
94
|
+
}
|
|
95
|
+
</style>
|
|
96
|
+
</head>
|
|
97
|
+
<body>
|
|
98
|
+
<div class="card">
|
|
99
|
+
<img class="logo" src="${LOGO_URL}" alt="Bkper CLI" />
|
|
100
|
+
${icon}
|
|
101
|
+
<h1>${title}</h1>
|
|
102
|
+
<p>${message}</p>
|
|
103
|
+
${isSuccess
|
|
104
|
+
? '<p class="hint">You can close this window and return to the terminal.</p>'
|
|
105
|
+
: ''}
|
|
106
|
+
</div>
|
|
107
|
+
</body>
|
|
108
|
+
</html>`;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=auth-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-page.js","sourceRoot":"","sources":["../../src/auth/auth-page.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,QAAQ,GAAG,kFAAkF,CAAC;AAEpG;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAIhC;IACG,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IACzC,MAAM,SAAS,GAAG,IAAI,KAAK,SAAS,CAAC;IAErC,0BAA0B;IAC1B,MAAM,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IAEtD,oDAAoD;IACpD,MAAM,IAAI,GAAG,SAAS;QAClB,CAAC,CAAC,oEAAoE,WAAW,kKAAkK;QACnP,CAAC,CAAC,oEAAoE,WAAW,oLAAoL,CAAC;IAE1Q,OAAO;;;;;aAKE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiDG,WAAW;;;;;;;;;;;;;;;;;;;;;;;iCAuBC,QAAQ;UAC/B,IAAI;cACA,KAAK;aACN,OAAO;UAER,SAAS;QACL,CAAC,CAAC,2EAA2E;QAC7E,CAAC,CAAC,EACV;;;QAGA,CAAC;AACT,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-auth-service.d.ts","sourceRoot":"","sources":["../../src/auth/local-auth-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local-auth-service.d.ts","sourceRoot":"","sources":["../../src/auth/local-auth-service.ts"],"names":[],"mappings":"AAoDA,wBAAsB,KAAK,kBAK1B;AAED,wBAAgB,MAAM,SAKrB;AAED,wBAAgB,UAAU,YAEzB;AA6HD;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAyBrD"}
|