bkper 4.6.2 → 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 +161 -131
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -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
|
|
|
@@ -95,27 +100,27 @@ bkper book update abc123 --lock-date 2024-12-31
|
|
|
95
100
|
<details>
|
|
96
101
|
<summary>Command reference</summary>
|
|
97
102
|
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
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)
|
|
119
124
|
|
|
120
125
|
</details>
|
|
121
126
|
|
|
@@ -146,20 +151,20 @@ bkper account delete "Old Account" -b abc123
|
|
|
146
151
|
<details>
|
|
147
152
|
<summary>Command reference</summary>
|
|
148
153
|
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
-
|
|
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
|
|
163
168
|
|
|
164
169
|
</details>
|
|
165
170
|
|
|
@@ -187,18 +192,18 @@ bkper group delete "Cash" -b abc123
|
|
|
187
192
|
<details>
|
|
188
193
|
<summary>Command reference</summary>
|
|
189
194
|
|
|
190
|
-
-
|
|
191
|
-
-
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
-
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
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
|
|
202
207
|
|
|
203
208
|
</details>
|
|
204
209
|
|
|
@@ -239,30 +244,30 @@ bkper transaction merge tx_123 tx_456 -b abc123
|
|
|
239
244
|
<details>
|
|
240
245
|
<summary>Command reference</summary>
|
|
241
246
|
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
-
|
|
245
|
-
-
|
|
246
|
-
-
|
|
247
|
-
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
250
|
-
-
|
|
251
|
-
-
|
|
252
|
-
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
-
|
|
256
|
-
-
|
|
257
|
-
-
|
|
258
|
-
-
|
|
259
|
-
-
|
|
260
|
-
-
|
|
261
|
-
-
|
|
262
|
-
-
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
-
|
|
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
|
|
266
271
|
|
|
267
272
|
</details>
|
|
268
273
|
|
|
@@ -281,8 +286,8 @@ bkper balance list -b abc123 -q "period:2025-01" --expanded 2
|
|
|
281
286
|
<details>
|
|
282
287
|
<summary>Command reference</summary>
|
|
283
288
|
|
|
284
|
-
-
|
|
285
|
-
-
|
|
289
|
+
- `balance list -b <bookId> -q <query>` - List balances
|
|
290
|
+
- `--expanded <level>` - Expand groups to specified depth (`0`+)
|
|
286
291
|
|
|
287
292
|
</details>
|
|
288
293
|
|
|
@@ -310,17 +315,17 @@ bkper collection delete col_789
|
|
|
310
315
|
<details>
|
|
311
316
|
<summary>Command reference</summary>
|
|
312
317
|
|
|
313
|
-
-
|
|
314
|
-
-
|
|
315
|
-
-
|
|
316
|
-
-
|
|
317
|
-
-
|
|
318
|
-
-
|
|
319
|
-
-
|
|
320
|
-
-
|
|
321
|
-
-
|
|
322
|
-
-
|
|
323
|
-
-
|
|
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)
|
|
324
329
|
|
|
325
330
|
</details>
|
|
326
331
|
|
|
@@ -347,18 +352,18 @@ bkper account list -b abc123 --format csv
|
|
|
347
352
|
|
|
348
353
|
**CSV output details:**
|
|
349
354
|
|
|
350
|
-
-
|
|
351
|
-
-
|
|
352
|
-
-
|
|
353
|
-
-
|
|
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
|
|
354
359
|
|
|
355
360
|
**AI agent guidance:**
|
|
356
361
|
|
|
357
362
|
When using the CLI from an AI agent, LLM, or automated script:
|
|
358
363
|
|
|
359
|
-
-
|
|
360
|
-
-
|
|
361
|
-
-
|
|
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).
|
|
362
367
|
|
|
363
368
|
### Batch Operations & Piping
|
|
364
369
|
|
|
@@ -660,20 +665,45 @@ apiVersion: v5
|
|
|
660
665
|
|
|
661
666
|
# Events to subscribe to (remove events you don't need)
|
|
662
667
|
events:
|
|
668
|
+
# Transaction
|
|
669
|
+
- TRANSACTION_CREATED
|
|
663
670
|
- TRANSACTION_POSTED
|
|
664
671
|
- TRANSACTION_CHECKED
|
|
665
672
|
- TRANSACTION_UNCHECKED
|
|
666
673
|
- TRANSACTION_UPDATED
|
|
667
674
|
- TRANSACTION_DELETED
|
|
668
675
|
- TRANSACTION_RESTORED
|
|
676
|
+
# Account
|
|
669
677
|
- ACCOUNT_CREATED
|
|
670
678
|
- ACCOUNT_UPDATED
|
|
671
679
|
- ACCOUNT_DELETED
|
|
680
|
+
# Group
|
|
672
681
|
- GROUP_CREATED
|
|
673
682
|
- GROUP_UPDATED
|
|
674
683
|
- GROUP_DELETED
|
|
684
|
+
# File
|
|
675
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
|
|
676
704
|
- BOOK_UPDATED
|
|
705
|
+
- BOOK_DELETED
|
|
706
|
+
- BOOK_AUDITED
|
|
677
707
|
|
|
678
708
|
# -----------------------------------------------------------------------------
|
|
679
709
|
# FILE PATTERNS (optional)
|
|
@@ -734,55 +764,55 @@ deployment:
|
|
|
734
764
|
|
|
735
765
|
**Environment variables:**
|
|
736
766
|
|
|
737
|
-
-
|
|
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.
|
|
738
768
|
|
|
739
769
|
<details>
|
|
740
770
|
<summary>Command reference</summary>
|
|
741
771
|
|
|
742
772
|
#### Authentication
|
|
743
773
|
|
|
744
|
-
-
|
|
745
|
-
-
|
|
746
|
-
-
|
|
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
|
|
747
777
|
|
|
748
778
|
#### App Lifecycle
|
|
749
779
|
|
|
750
|
-
-
|
|
751
|
-
-
|
|
752
|
-
-
|
|
753
|
-
-
|
|
754
|
-
-
|
|
755
|
-
-
|
|
756
|
-
-
|
|
757
|
-
-
|
|
758
|
-
-
|
|
759
|
-
-
|
|
760
|
-
-
|
|
761
|
-
-
|
|
762
|
-
-
|
|
763
|
-
-
|
|
764
|
-
-
|
|
765
|
-
-
|
|
766
|
-
-
|
|
767
|
-
-
|
|
768
|
-
-
|
|
769
|
-
-
|
|
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
|
|
770
800
|
|
|
771
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`
|
|
772
802
|
|
|
773
803
|
#### App Installation
|
|
774
804
|
|
|
775
|
-
-
|
|
776
|
-
-
|
|
805
|
+
- `app install <appId> -b <bookId>` - Install an app on a book
|
|
806
|
+
- `app uninstall <appId> -b <bookId>` - Uninstall an app from a book
|
|
777
807
|
|
|
778
808
|
#### Secrets Management
|
|
779
809
|
|
|
780
|
-
-
|
|
781
|
-
-
|
|
782
|
-
-
|
|
783
|
-
-
|
|
784
|
-
-
|
|
785
|
-
-
|
|
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
|
|
786
816
|
|
|
787
817
|
</details>
|
|
788
818
|
|
|
@@ -803,6 +833,6 @@ Bkper.setConfig({
|
|
|
803
833
|
|
|
804
834
|
## Documentation
|
|
805
835
|
|
|
806
|
-
-
|
|
807
|
-
-
|
|
808
|
-
-
|
|
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",
|