@wavyx/pdcli 0.1.0 → 0.2.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 CHANGED
@@ -4,7 +4,27 @@ All notable changes to `pdcli` are documented here. Format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/); versions follow
5
5
  [SemVer](https://semver.org/).
6
6
 
7
- ## [Unreleased]
7
+ ## [0.2.0] - 2026-06-04
8
+
9
+ ### Added
10
+
11
+ - Write paths for core CRM: `deal|person|org|activity create/update/delete`
12
+ (v2 PATCH semantics — only provided fields change). Destructive deletes
13
+ prompt unless `--yes`.
14
+ - Custom-field input resolution: repeatable `--field "Name=Value"` resolves
15
+ human field names to hash keys and option labels to IDs (enum, set, and
16
+ numeric coercion); `--body` accepts raw JSON (typed flags win).
17
+ - `product` topic: `list/get/create/update/delete` with `--price`/`--currency`
18
+ pairs.
19
+ - OAuth 2.0: `auth login --oauth` (browser authorization-code flow against
20
+ your own Developer Hub app). Access/refresh tokens, `api_domain`, and the
21
+ client secret are stored only in the OS keychain; access tokens refresh
22
+ automatically on expiry and on 401. `auth status` shows mode and expiry;
23
+ `auth logout` clears both auth modes.
24
+ - `activity create/update --person` maps to a primary participant
25
+ (`person_id` is read-only on v2 activity writes).
26
+
27
+ ## [0.1.0] - 2026-06-03
8
28
 
9
29
  ### Added
10
30
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Command-line interface for [Pipedrive](https://www.pipedrive.com/) — fast, scriptable, built for terminals, CI pipelines, and AI agents.
4
4
 
5
- > **Status: pre-release (v0.1 in development).** Not affiliated with or endorsed by Pipedrive.
5
+ > Not affiliated with or endorsed by Pipedrive.
6
6
 
7
7
  ## Install
8
8
 
@@ -10,22 +10,57 @@ Command-line interface for [Pipedrive](https://www.pipedrive.com/) — fast, scr
10
10
  npm install -g @wavyx/pdcli
11
11
  ```
12
12
 
13
- ## Quick start
13
+ ## Authenticate
14
14
 
15
15
  ```bash
16
- pdcli auth login # company domain + API token (stored in your OS keychain)
17
- pdcli user me
18
- pdcli deal list --limit 10
19
- pdcli deal list --output json | jq '.[].id'
20
- pdcli field list deal # custom fields with their hash keys
16
+ pdcli auth login # personal API token (app.pipedrive.com/settings/api)
17
+ pdcli auth login --oauth # OAuth 2.0 via your own Developer Hub app
18
+ pdcli auth status
19
+ ```
20
+
21
+ Credentials live **only in your OS keychain** — never in plaintext on disk. OAuth
22
+ access tokens refresh automatically. CI/scripts can use env vars instead:
23
+ `PDCLI_COMPANY_DOMAIN=acme PDCLI_API_TOKEN=... pdcli deal list`
24
+
25
+ ## Read
26
+
27
+ ```bash
28
+ pdcli deal list --status open --limit 20
29
+ pdcli deal get 42
30
+ pdcli person list --org 7 --output json | jq '.[].id'
31
+ pdcli activity list --todo
21
32
  pdcli search "acme"
22
- pdcli api GET /api/v1/currencies # raw, host-locked escape hatch
33
+ pdcli field list deal # custom fields with their hash keys
34
+ ```
35
+
36
+ ## Write
37
+
38
+ ```bash
39
+ pdcli deal create --title "Acme renewal" --value 5000 --currency EUR --stage 3
40
+ pdcli deal update 42 --status won
41
+ pdcli activity create --subject "Follow up" --type call --due-date 2026-06-10 --deal 42
42
+ pdcli product create --name "Consulting" --price 150 --currency EUR
43
+ pdcli deal delete 42 # asks first; --yes to skip
44
+ ```
45
+
46
+ Custom fields by **human name** — labels and option IDs resolve automatically:
47
+
48
+ ```bash
49
+ pdcli deal create --title "Sized" --field "Deal Size=Large" --field "Score=4.5"
50
+ pdcli deal update 42 --body '{"probability":75}' # raw JSON escape hatch
51
+ ```
52
+
53
+ ## Anything else
54
+
55
+ ```bash
56
+ pdcli api GET /api/v2/pipelines # raw, host-locked to YOUR domain
57
+ pdcli api POST /api/v2/deals --body '{"title":"Raw deal"}'
58
+ pdcli doctor # diagnose auth/keychain/connectivity
23
59
  ```
24
60
 
25
- - Token lives **only** in the OS keychain never in plaintext on disk.
26
- - `--output table|json` on every command; table in a TTY, JSON when piped.
61
+ - `--output table|json` everywhere; table in a TTY, JSON when piped.
27
62
  - Deterministic [sysexits](https://man.freebsd.org/cgi/man.cgi?query=sysexits) exit codes for scripting.
28
- - CI: `PDCLI_COMPANY_DOMAIN=acme PDCLI_API_TOKEN=... pdcli deal list`
63
+ - Full reference: [docs/commands.md](docs/commands.md) (generated from the CLI manifest).
29
64
 
30
65
  ## License
31
66