bkper 4.6.0 → 4.6.3
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/README.md +370 -133
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[bkper.yaml reference]:
|
|
1
|
+
[bkper.yaml reference]: #bkperyaml-reference
|
|
2
2
|
[Developer Docs]: https://bkper.com/docs
|
|
3
3
|
[App Template]: https://github.com/bkper/bkper-app-template
|
|
4
4
|
[Skills Repository]: https://github.com/bkper/skills
|
|
@@ -11,18 +11,23 @@ A **command-line interface** for [Bkper](https://bkper.com), a financial account
|
|
|
11
11
|
|
|
12
12
|
### Prerequisites
|
|
13
13
|
|
|
14
|
-
-
|
|
14
|
+
- [Node.js](https://nodejs.org/) >= 18
|
|
15
15
|
|
|
16
16
|
### Install (choose one)
|
|
17
17
|
|
|
18
|
-
```bash
|
|
19
|
-
# bun
|
|
18
|
+
```bash tab="bun"
|
|
20
19
|
bun add -g bkper
|
|
20
|
+
```
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
```bash tab="npm"
|
|
23
23
|
npm i -g bkper
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```bash tab="pnpm"
|
|
27
|
+
pnpm add -g bkper
|
|
28
|
+
```
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
```bash tab="yarn"
|
|
26
31
|
yarn global add bkper
|
|
27
32
|
```
|
|
28
33
|
|
|
@@ -32,6 +37,19 @@ yarn global add bkper
|
|
|
32
37
|
bkper auth login
|
|
33
38
|
```
|
|
34
39
|
|
|
40
|
+
### Access Token
|
|
41
|
+
|
|
42
|
+
Use the access token for direct API calls from any tool:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Print the current access token
|
|
46
|
+
TOKEN=$(bkper auth token)
|
|
47
|
+
|
|
48
|
+
# Use it with curl, httpie, or any HTTP client
|
|
49
|
+
curl -s -H "Authorization: Bearer $TOKEN" \
|
|
50
|
+
https://api.bkper.app/v5/books | jq '.items[].name'
|
|
51
|
+
```
|
|
52
|
+
|
|
35
53
|
### Try It
|
|
36
54
|
|
|
37
55
|
```bash
|
|
@@ -82,27 +100,27 @@ bkper book update abc123 --lock-date 2024-12-31
|
|
|
82
100
|
<details>
|
|
83
101
|
<summary>Command reference</summary>
|
|
84
102
|
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
103
|
+
- `book list` - List all books
|
|
104
|
+
- `-q, --query <query>` - Search query
|
|
105
|
+
- `book get <bookId>` - Get a book's details
|
|
106
|
+
- `book create` - Create a new book
|
|
107
|
+
- `--name <name>` - Book name (required)
|
|
108
|
+
- `--fraction-digits <digits>` - Number of decimal places (`0`-`8`)
|
|
109
|
+
- `--date-pattern <pattern>` - Date format pattern (`dd/MM/yyyy`, `MM/dd/yyyy`, or `yyyy/MM/dd`)
|
|
110
|
+
- `--decimal-separator <separator>` - Decimal separator (`DOT` or `COMMA`)
|
|
111
|
+
- `--time-zone <timezone>` - IANA time zone (e.g. `America/New_York`, `UTC`)
|
|
112
|
+
- `--period <period>` - Period (`MONTH`, `QUARTER`, or `YEAR`)
|
|
113
|
+
- `-p, --property <key=value>` - Set a property (repeatable)
|
|
114
|
+
- `book update <bookId>` - Update a book
|
|
115
|
+
- `--name <name>` - Book name
|
|
116
|
+
- `--fraction-digits <digits>` - Number of decimal places (`0`-`8`)
|
|
117
|
+
- `--date-pattern <pattern>` - Date format pattern (`dd/MM/yyyy`, `MM/dd/yyyy`, or `yyyy/MM/dd`)
|
|
118
|
+
- `--decimal-separator <separator>` - Decimal separator (`DOT` or `COMMA`)
|
|
119
|
+
- `--time-zone <timezone>` - IANA time zone identifier (e.g. `America/New_York`, `Europe/London`, `UTC`)
|
|
120
|
+
- `--lock-date <date>` - Lock date in ISO format (`yyyy-MM-dd`, e.g. `2024-01-31`)
|
|
121
|
+
- `--closing-date <date>` - Closing date in ISO format (`yyyy-MM-dd`)
|
|
122
|
+
- `--period <period>` - Period (`MONTH`, `QUARTER`, or `YEAR`)
|
|
123
|
+
- `-p, --property <key=value>` - Set a property (repeatable, e.g. `-p code=1010 -p branch=NYC`; empty value deletes the property)
|
|
106
124
|
|
|
107
125
|
</details>
|
|
108
126
|
|
|
@@ -133,20 +151,20 @@ bkper account delete "Old Account" -b abc123
|
|
|
133
151
|
<details>
|
|
134
152
|
<summary>Command reference</summary>
|
|
135
153
|
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
154
|
+
- `account list -b <bookId>` - List accounts in a book
|
|
155
|
+
- `account get <nameOrId> -b <bookId>` - Get an account
|
|
156
|
+
- `account create -b <bookId>` - Create a new account
|
|
157
|
+
- `--name <name>` - Account name (required)
|
|
158
|
+
- `--type <type>` - Account type (`ASSET`, `LIABILITY`, `INCOMING`, `OUTGOING`)
|
|
159
|
+
- `--description <description>` - Account description
|
|
160
|
+
- `--groups <groups>` - Comma-separated group names
|
|
161
|
+
- `-p, --property <key=value>` - Set a property (repeatable)
|
|
162
|
+
- `account update <nameOrId> -b <bookId>` - Update an account
|
|
163
|
+
- `--name <name>` - Account name
|
|
164
|
+
- `--type <type>` - Account type (`ASSET`, `LIABILITY`, `INCOMING`, `OUTGOING`)
|
|
165
|
+
- `--archived <true|false>` - Archive status
|
|
166
|
+
- `-p, --property <key=value>` - Set a property (repeatable, merges with existing)
|
|
167
|
+
- `account delete <nameOrId> -b <bookId>` - Delete an account
|
|
150
168
|
|
|
151
169
|
</details>
|
|
152
170
|
|
|
@@ -174,18 +192,18 @@ bkper group delete "Cash" -b abc123
|
|
|
174
192
|
<details>
|
|
175
193
|
<summary>Command reference</summary>
|
|
176
194
|
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
195
|
+
- `group list -b <bookId>` - List groups in a book
|
|
196
|
+
- `group get <nameOrId> -b <bookId>` - Get a group
|
|
197
|
+
- `group create -b <bookId>` - Create a new group
|
|
198
|
+
- `--name <name>` - Group name (required)
|
|
199
|
+
- `--parent <parent>` - Parent group name or ID
|
|
200
|
+
- `--hidden` - Hide the group
|
|
201
|
+
- `-p, --property <key=value>` - Set a property (repeatable)
|
|
202
|
+
- `group update <nameOrId> -b <bookId>` - Update a group
|
|
203
|
+
- `--name <name>` - Group name
|
|
204
|
+
- `--hidden <true|false>` - Hide status
|
|
205
|
+
- `-p, --property <key=value>` - Set a property (repeatable, merges with existing)
|
|
206
|
+
- `group delete <nameOrId> -b <bookId>` - Delete a group
|
|
189
207
|
|
|
190
208
|
</details>
|
|
191
209
|
|
|
@@ -226,30 +244,30 @@ bkper transaction merge tx_123 tx_456 -b abc123
|
|
|
226
244
|
<details>
|
|
227
245
|
<summary>Command reference</summary>
|
|
228
246
|
|
|
229
|
-
-
|
|
230
|
-
-
|
|
231
|
-
-
|
|
232
|
-
-
|
|
233
|
-
-
|
|
234
|
-
-
|
|
235
|
-
-
|
|
236
|
-
-
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
-
|
|
240
|
-
-
|
|
241
|
-
-
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
-
|
|
245
|
-
-
|
|
246
|
-
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
252
|
-
-
|
|
247
|
+
- `transaction list -b <bookId> -q <query>` - List transactions matching a query (auto-paginates through all results)
|
|
248
|
+
- `-p, --properties` - Include custom properties in the output
|
|
249
|
+
- `transaction create -b <bookId>` - Create a transaction
|
|
250
|
+
- `--date <date>` - Transaction date
|
|
251
|
+
- `--amount <amount>` - Transaction amount
|
|
252
|
+
- `--description <description>` - Transaction description
|
|
253
|
+
- `--from <from>` - Credit account (source)
|
|
254
|
+
- `--to <to>` - Debit account (destination)
|
|
255
|
+
- `--url <url>` - URL (repeatable)
|
|
256
|
+
- `--remote-id <remoteId>` - Remote ID (repeatable)
|
|
257
|
+
- `-p, --property <key=value>` - Set a property (repeatable, empty value deletes)
|
|
258
|
+
- `transaction update [transactionId] -b <bookId>` - Update a transaction (or batch update via stdin)
|
|
259
|
+
- `--date <date>` - Transaction date
|
|
260
|
+
- `--amount <amount>` - Transaction amount
|
|
261
|
+
- `--description <description>` - Transaction description
|
|
262
|
+
- `--from <from>` - Credit account (source)
|
|
263
|
+
- `--to <to>` - Debit account (destination)
|
|
264
|
+
- `--url <url>` - URL (repeatable, replaces all)
|
|
265
|
+
- `--update-checked` - Also update checked transactions
|
|
266
|
+
- `-p, --property <key=value>` - Set a property (repeatable, empty value deletes)
|
|
267
|
+
- `transaction post <id> -b <bookId>` - Post a draft transaction
|
|
268
|
+
- `transaction check <id> -b <bookId>` - Check a transaction
|
|
269
|
+
- `transaction trash <id> -b <bookId>` - Trash a transaction
|
|
270
|
+
- `transaction merge <id1> <id2> -b <bookId>` - Merge two transactions
|
|
253
271
|
|
|
254
272
|
</details>
|
|
255
273
|
|
|
@@ -268,8 +286,8 @@ bkper balance list -b abc123 -q "period:2025-01" --expanded 2
|
|
|
268
286
|
<details>
|
|
269
287
|
<summary>Command reference</summary>
|
|
270
288
|
|
|
271
|
-
-
|
|
272
|
-
-
|
|
289
|
+
- `balance list -b <bookId> -q <query>` - List balances
|
|
290
|
+
- `--expanded <level>` - Expand groups to specified depth (`0`+)
|
|
273
291
|
|
|
274
292
|
</details>
|
|
275
293
|
|
|
@@ -297,17 +315,17 @@ bkper collection delete col_789
|
|
|
297
315
|
<details>
|
|
298
316
|
<summary>Command reference</summary>
|
|
299
317
|
|
|
300
|
-
-
|
|
301
|
-
-
|
|
302
|
-
-
|
|
303
|
-
-
|
|
304
|
-
-
|
|
305
|
-
-
|
|
306
|
-
-
|
|
307
|
-
-
|
|
308
|
-
-
|
|
309
|
-
-
|
|
310
|
-
-
|
|
318
|
+
- `collection list` - List all collections
|
|
319
|
+
- `collection get <collectionId>` - Get a collection
|
|
320
|
+
- `collection create` - Create a new collection
|
|
321
|
+
- `--name <name>` - Collection name (required)
|
|
322
|
+
- `collection update <collectionId>` - Update a collection
|
|
323
|
+
- `--name <name>` - Collection name
|
|
324
|
+
- `collection delete <collectionId>` - Delete a collection
|
|
325
|
+
- `collection add-book <collectionId>` - Add books to a collection
|
|
326
|
+
- `-b, --book <bookId>` - Book ID (repeatable)
|
|
327
|
+
- `collection remove-book <collectionId>` - Remove books from a collection
|
|
328
|
+
- `-b, --book <bookId>` - Book ID (repeatable)
|
|
311
329
|
|
|
312
330
|
</details>
|
|
313
331
|
|
|
@@ -334,18 +352,18 @@ bkper account list -b abc123 --format csv
|
|
|
334
352
|
|
|
335
353
|
**CSV output details:**
|
|
336
354
|
|
|
337
|
-
-
|
|
338
|
-
-
|
|
339
|
-
-
|
|
340
|
-
-
|
|
355
|
+
- **RFC 4180 compliant** -- proper quoting, CRLF line endings, no truncation
|
|
356
|
+
- **All metadata included** -- IDs, properties, hidden properties, URLs, and timestamps are enabled
|
|
357
|
+
- **Raw values** -- dates stay in ISO format, numbers are unformatted (no locale formatting)
|
|
358
|
+
- **Single-item commands** (e.g. `account get`, `transaction create`) fall back to JSON since CSV adds no value for non-tabular data
|
|
341
359
|
|
|
342
360
|
**AI agent guidance:**
|
|
343
361
|
|
|
344
362
|
When using the CLI from an AI agent, LLM, or automated script:
|
|
345
363
|
|
|
346
|
-
-
|
|
347
|
-
-
|
|
348
|
-
-
|
|
364
|
+
- **Use `--format csv` for list commands.** CSV is dramatically more token-efficient than JSON for tabular data -- typically 3-5x fewer tokens for the same information.
|
|
365
|
+
- **Use `--format json` for single-item commands** (`get`, `create`, `update`) where you need structured field access.
|
|
366
|
+
- **Pipe data in via stdin** for batch operations (see below).
|
|
349
367
|
|
|
350
368
|
### Batch Operations & Piping
|
|
351
369
|
|
|
@@ -523,59 +541,278 @@ bkper app secrets delete API_KEY
|
|
|
523
541
|
|
|
524
542
|
### Configuration
|
|
525
543
|
|
|
526
|
-
Apps are configured via a `bkper.yaml` file in the project root. See the complete
|
|
544
|
+
Apps are configured via a `bkper.yaml` file in the project root. See the complete **[bkper.yaml reference]** below.
|
|
545
|
+
|
|
546
|
+
<details>
|
|
547
|
+
<summary>bkper.yaml reference</summary>
|
|
548
|
+
|
|
549
|
+
```yaml
|
|
550
|
+
# =============================================================================
|
|
551
|
+
# bkper.yaml Reference
|
|
552
|
+
# =============================================================================
|
|
553
|
+
# This file documents all available configuration options for Bkper Apps.
|
|
554
|
+
# Copy the fields you need to your app's bkper.yaml file.
|
|
555
|
+
#
|
|
556
|
+
# For a minimal working template, see:
|
|
557
|
+
# https://github.com/bkper/bkper-app-template
|
|
558
|
+
# =============================================================================
|
|
559
|
+
|
|
560
|
+
# -----------------------------------------------------------------------------
|
|
561
|
+
# APP IDENTITY
|
|
562
|
+
# -----------------------------------------------------------------------------
|
|
563
|
+
# The app id is permanent and cannot be changed after creation.
|
|
564
|
+
# Use lowercase letters, numbers, and hyphens only.
|
|
565
|
+
id: my-app
|
|
566
|
+
|
|
567
|
+
# Display name shown in the Bkper UI
|
|
568
|
+
name: My App
|
|
569
|
+
|
|
570
|
+
# Brief description of what the app does
|
|
571
|
+
description: A Bkper app that does something useful
|
|
572
|
+
|
|
573
|
+
# -----------------------------------------------------------------------------
|
|
574
|
+
# BRANDING
|
|
575
|
+
# -----------------------------------------------------------------------------
|
|
576
|
+
# App logo for light mode (SVG recommended, PNG/JPG supported)
|
|
577
|
+
logoUrl: https://example.com/logo.svg
|
|
578
|
+
|
|
579
|
+
# App logo for dark mode (required for proper theming)
|
|
580
|
+
logoUrlDark: https://example.com/logo-dark.svg
|
|
581
|
+
|
|
582
|
+
# App website or documentation URL
|
|
583
|
+
website: https://example.com
|
|
584
|
+
|
|
585
|
+
# -----------------------------------------------------------------------------
|
|
586
|
+
# OWNERSHIP
|
|
587
|
+
# -----------------------------------------------------------------------------
|
|
588
|
+
# Developer/company name
|
|
589
|
+
ownerName: Your Name
|
|
590
|
+
|
|
591
|
+
# Owner's logo/avatar URL
|
|
592
|
+
ownerLogoUrl: https://example.com/owner-logo.png
|
|
593
|
+
|
|
594
|
+
# Owner's website
|
|
595
|
+
ownerWebsite: https://yoursite.com
|
|
596
|
+
|
|
597
|
+
# Source code repository URL
|
|
598
|
+
repoUrl: https://github.com/you/my-app
|
|
599
|
+
|
|
600
|
+
# Whether the repository is private
|
|
601
|
+
repoPrivate: true
|
|
602
|
+
|
|
603
|
+
# Mark as deprecated (hides from app listings, existing installs continue working)
|
|
604
|
+
deprecated: false
|
|
605
|
+
|
|
606
|
+
# -----------------------------------------------------------------------------
|
|
607
|
+
# ACCESS CONTROL
|
|
608
|
+
# -----------------------------------------------------------------------------
|
|
609
|
+
# Who can update the app configuration and deploy new versions.
|
|
610
|
+
# Comma-separated list of Bkper usernames (not emails).
|
|
611
|
+
# Supports domain wildcards for registered custom domains: *@yourdomain.com
|
|
612
|
+
developers: victor, aldo, *@bkper.com
|
|
613
|
+
|
|
614
|
+
# Who can install and use the app.
|
|
615
|
+
# Same format as developers. Leave empty for public apps.
|
|
616
|
+
users: maria, *@acme.com
|
|
617
|
+
|
|
618
|
+
# -----------------------------------------------------------------------------
|
|
619
|
+
# MENU INTEGRATION (optional)
|
|
620
|
+
# -----------------------------------------------------------------------------
|
|
621
|
+
# When configured, adds a menu item to Bkper's "More" menu.
|
|
622
|
+
# Clicking opens a popup with the specified URL.
|
|
623
|
+
|
|
624
|
+
# Production menu URL (supports variable substitution)
|
|
625
|
+
menuUrl: https://${id}.bkper.app?bookId=${book.id}
|
|
626
|
+
|
|
627
|
+
# Development menu URL (used when developer runs the app)
|
|
628
|
+
menuUrlDev: http://localhost:8787?bookId=${book.id}
|
|
629
|
+
|
|
630
|
+
# Custom menu text (defaults to app name if not specified)
|
|
631
|
+
menuText: Open My App
|
|
632
|
+
|
|
633
|
+
# Popup dimensions in pixels
|
|
634
|
+
menuPopupWidth: 500
|
|
635
|
+
menuPopupHeight: 300
|
|
636
|
+
|
|
637
|
+
# -----------------------------------------------------------------------------
|
|
638
|
+
# Menu URL Variables
|
|
639
|
+
# -----------------------------------------------------------------------------
|
|
640
|
+
# The following variables can be used in menuUrl and menuUrlDev:
|
|
641
|
+
#
|
|
642
|
+
# ${book.id} - Current book ID
|
|
643
|
+
# ${book.properties.xxx} - Book property value (replace xxx with property key)
|
|
644
|
+
# ${account.id} - Selected account ID (in account context)
|
|
645
|
+
# ${account.properties.xxx} - Account property value
|
|
646
|
+
# ${group.id} - Selected group ID (in group context)
|
|
647
|
+
# ${group.properties.xxx} - Group property value
|
|
648
|
+
# ${transactions.ids} - Comma-separated selected transaction IDs
|
|
649
|
+
# ${transactions.query} - Current search query
|
|
650
|
+
# -----------------------------------------------------------------------------
|
|
651
|
+
|
|
652
|
+
# -----------------------------------------------------------------------------
|
|
653
|
+
# EVENT HANDLING (optional)
|
|
654
|
+
# -----------------------------------------------------------------------------
|
|
655
|
+
# When configured, Bkper calls your webhook URL when subscribed events occur.
|
|
656
|
+
|
|
657
|
+
# Production webhook URL
|
|
658
|
+
webhookUrl: https://${id}.bkper.app/events
|
|
659
|
+
|
|
660
|
+
# Development webhook URL (auto-updated by bkper app dev)
|
|
661
|
+
webhookUrlDev: https://<random>.trycloudflare.com/events
|
|
662
|
+
|
|
663
|
+
# API version for event payloads
|
|
664
|
+
apiVersion: v5
|
|
665
|
+
|
|
666
|
+
# Events to subscribe to (remove events you don't need)
|
|
667
|
+
events:
|
|
668
|
+
# Transaction
|
|
669
|
+
- TRANSACTION_CREATED
|
|
670
|
+
- TRANSACTION_POSTED
|
|
671
|
+
- TRANSACTION_CHECKED
|
|
672
|
+
- TRANSACTION_UNCHECKED
|
|
673
|
+
- TRANSACTION_UPDATED
|
|
674
|
+
- TRANSACTION_DELETED
|
|
675
|
+
- TRANSACTION_RESTORED
|
|
676
|
+
# Account
|
|
677
|
+
- ACCOUNT_CREATED
|
|
678
|
+
- ACCOUNT_UPDATED
|
|
679
|
+
- ACCOUNT_DELETED
|
|
680
|
+
# Group
|
|
681
|
+
- GROUP_CREATED
|
|
682
|
+
- GROUP_UPDATED
|
|
683
|
+
- GROUP_DELETED
|
|
684
|
+
# File
|
|
685
|
+
- FILE_CREATED
|
|
686
|
+
- FILE_UPDATED
|
|
687
|
+
# Query
|
|
688
|
+
- QUERY_CREATED
|
|
689
|
+
- QUERY_UPDATED
|
|
690
|
+
- QUERY_DELETED
|
|
691
|
+
# Comment
|
|
692
|
+
- COMMENT_CREATED
|
|
693
|
+
- COMMENT_DELETED
|
|
694
|
+
# Collaborator
|
|
695
|
+
- COLLABORATOR_ADDED
|
|
696
|
+
- COLLABORATOR_UPDATED
|
|
697
|
+
- COLLABORATOR_REMOVED
|
|
698
|
+
# Integration
|
|
699
|
+
- INTEGRATION_CREATED
|
|
700
|
+
- INTEGRATION_UPDATED
|
|
701
|
+
- INTEGRATION_DELETED
|
|
702
|
+
# Book
|
|
703
|
+
- BOOK_CREATED
|
|
704
|
+
- BOOK_UPDATED
|
|
705
|
+
- BOOK_DELETED
|
|
706
|
+
- BOOK_AUDITED
|
|
707
|
+
|
|
708
|
+
# -----------------------------------------------------------------------------
|
|
709
|
+
# FILE PATTERNS (optional)
|
|
710
|
+
# -----------------------------------------------------------------------------
|
|
711
|
+
# For file processing apps. When a file matching these patterns is uploaded,
|
|
712
|
+
# a FILE_CREATED event is triggered with the file content.
|
|
713
|
+
filePatterns:
|
|
714
|
+
- '*.ofx'
|
|
715
|
+
- '*.csv'
|
|
716
|
+
|
|
717
|
+
# -----------------------------------------------------------------------------
|
|
718
|
+
# PROPERTIES SCHEMA (optional)
|
|
719
|
+
# -----------------------------------------------------------------------------
|
|
720
|
+
# Defines autocomplete suggestions for custom properties in the Bkper UI.
|
|
721
|
+
# Helps users discover and use the correct property keys/values for your app.
|
|
722
|
+
propertiesSchema:
|
|
723
|
+
book:
|
|
724
|
+
keys:
|
|
725
|
+
- my_app_enabled
|
|
726
|
+
- my_app_config
|
|
727
|
+
values:
|
|
728
|
+
- 'true'
|
|
729
|
+
- 'false'
|
|
730
|
+
group:
|
|
731
|
+
keys:
|
|
732
|
+
- my_app_category
|
|
733
|
+
values:
|
|
734
|
+
- category_a
|
|
735
|
+
- category_b
|
|
736
|
+
account:
|
|
737
|
+
keys:
|
|
738
|
+
- my_app_sync_id
|
|
739
|
+
transaction:
|
|
740
|
+
keys:
|
|
741
|
+
- my_app_reference
|
|
742
|
+
|
|
743
|
+
# -----------------------------------------------------------------------------
|
|
744
|
+
# DEPLOYMENT CONFIGURATION (optional)
|
|
745
|
+
# -----------------------------------------------------------------------------
|
|
746
|
+
# For apps deployed to Bkper's Workers for Platforms infrastructure.
|
|
747
|
+
deployment:
|
|
748
|
+
# Web handler (serves UI and API)
|
|
749
|
+
web:
|
|
750
|
+
bundle: packages/web/server/dist
|
|
751
|
+
# assets: packages/web/client/dist # Static assets (when supported)
|
|
752
|
+
|
|
753
|
+
# Events handler (processes webhooks)
|
|
754
|
+
events:
|
|
755
|
+
bundle: packages/events/dist
|
|
756
|
+
|
|
757
|
+
# Platform services available to your app (one per type, auto-provisioned)
|
|
758
|
+
# See: https://developers.cloudflare.com/kv/
|
|
759
|
+
services:
|
|
760
|
+
- KV # Key-value storage
|
|
761
|
+
```
|
|
762
|
+
|
|
763
|
+
</details>
|
|
527
764
|
|
|
528
765
|
**Environment variables:**
|
|
529
766
|
|
|
530
|
-
-
|
|
767
|
+
- `BKPER_API_KEY` -- Optional. If not set, uses the Bkper API proxy with a managed API key. Set it for direct API access with your own quotas. Follow [these steps](https://bkper.com/docs/#rest-api-enabling) to enable.
|
|
531
768
|
|
|
532
769
|
<details>
|
|
533
770
|
<summary>Command reference</summary>
|
|
534
771
|
|
|
535
772
|
#### Authentication
|
|
536
773
|
|
|
537
|
-
-
|
|
538
|
-
-
|
|
539
|
-
-
|
|
774
|
+
- `auth login` - Authenticate with Bkper, storing credentials locally
|
|
775
|
+
- `auth logout` - Remove stored credentials
|
|
776
|
+
- `auth token` - Print the current OAuth access token to stdout
|
|
540
777
|
|
|
541
778
|
#### App Lifecycle
|
|
542
779
|
|
|
543
|
-
-
|
|
544
|
-
-
|
|
545
|
-
-
|
|
546
|
-
-
|
|
547
|
-
-
|
|
548
|
-
-
|
|
549
|
-
-
|
|
550
|
-
-
|
|
551
|
-
-
|
|
552
|
-
-
|
|
553
|
-
-
|
|
554
|
-
-
|
|
555
|
-
-
|
|
556
|
-
-
|
|
557
|
-
-
|
|
558
|
-
-
|
|
559
|
-
-
|
|
560
|
-
-
|
|
561
|
-
-
|
|
562
|
-
-
|
|
780
|
+
- `app init <name>` - Scaffold a new app from the template
|
|
781
|
+
- `app list` - List all apps you have access to
|
|
782
|
+
- `app sync` - Sync [bkper.yaml][bkper.yaml reference] configuration (URLs, description) to Bkper API
|
|
783
|
+
- `app build` - Build app artifacts
|
|
784
|
+
- `app deploy` - Deploy built artifacts to Cloudflare Workers for Platforms
|
|
785
|
+
- `-p, --preview` - Deploy to preview environment
|
|
786
|
+
- `--events` - Deploy events handler instead of web handler
|
|
787
|
+
- `app status` - Show deployment status
|
|
788
|
+
- `app undeploy` - Remove app from platform
|
|
789
|
+
- `-p, --preview` - Remove from preview environment
|
|
790
|
+
- `--events` - Remove events handler instead of web handler
|
|
791
|
+
- `--delete-data` - Permanently delete all associated data (requires confirmation)
|
|
792
|
+
- `--force` - Skip confirmation prompts (use with `--delete-data` for automation)
|
|
793
|
+
- `app dev` - Run local development servers
|
|
794
|
+
- `--cp, --client-port <port>` - Client dev server port (default: `5173`)
|
|
795
|
+
- `--sp, --server-port <port>` - Server simulation port (default: `8787`)
|
|
796
|
+
- `--ep, --events-port <port>` - Events handler port (default: `8791`)
|
|
797
|
+
- `-w, --web` - Run only the web handler
|
|
798
|
+
- `-e, --events` - Run only the events handler
|
|
799
|
+
- `--no-open` - Do not open browser on startup
|
|
563
800
|
|
|
564
801
|
> **Note:** `sync` and `deploy` are independent operations. Use `sync` to update your app's URLs in Bkper (required for webhooks and menu integration). Use `deploy` to push code to Cloudflare. For a typical deployment workflow, run both: `bkper app sync && bkper app deploy`
|
|
565
802
|
|
|
566
803
|
#### App Installation
|
|
567
804
|
|
|
568
|
-
-
|
|
569
|
-
-
|
|
805
|
+
- `app install <appId> -b <bookId>` - Install an app on a book
|
|
806
|
+
- `app uninstall <appId> -b <bookId>` - Uninstall an app from a book
|
|
570
807
|
|
|
571
808
|
#### Secrets Management
|
|
572
809
|
|
|
573
|
-
-
|
|
574
|
-
-
|
|
575
|
-
-
|
|
576
|
-
-
|
|
577
|
-
-
|
|
578
|
-
-
|
|
810
|
+
- `app secrets put <name>` - Store a secret
|
|
811
|
+
- `-p, --preview` - Set in preview environment
|
|
812
|
+
- `app secrets list` - List all secrets
|
|
813
|
+
- `-p, --preview` - List from preview environment
|
|
814
|
+
- `app secrets delete <name>` - Delete a secret
|
|
815
|
+
- `-p, --preview` - Delete from preview environment
|
|
579
816
|
|
|
580
817
|
</details>
|
|
581
818
|
|
|
@@ -596,6 +833,6 @@ Bkper.setConfig({
|
|
|
596
833
|
|
|
597
834
|
## Documentation
|
|
598
835
|
|
|
599
|
-
-
|
|
600
|
-
-
|
|
601
|
-
-
|
|
836
|
+
- [Developer Docs]
|
|
837
|
+
- [App Template]
|
|
838
|
+
- [Skills Repository]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bkper",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.3",
|
|
4
4
|
"description": "Command line client for Bkper",
|
|
5
5
|
"bin": {
|
|
6
6
|
"bkper": "./lib/cli.js"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"postversion": "git push --tags && yarn publish --new-version $npm_package_version && git push && echo \"Successfully released version $npm_package_version!\""
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"bkper-js": "^2.29.
|
|
48
|
+
"bkper-js": "^2.29.4",
|
|
49
49
|
"chokidar": "^5.0.0",
|
|
50
50
|
"commander": "^13.1.0",
|
|
51
51
|
"dotenv": "^8.2.0",
|