soundcloud-api-ts 1.6.0 → 1.6.1

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.
Files changed (2) hide show
  1. package/README.md +56 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  [![coverage](https://img.shields.io/badge/coverage-94%25-brightgreen.svg)]()
10
10
  [![docs](https://img.shields.io/badge/docs-TypeDoc-blue.svg)](https://twin-paws.github.io/soundcloud-api-ts/)
11
11
 
12
- A TypeScript client for the SoundCloud API. Zero dependencies, uses native `fetch`.
12
+ A fully-typed TypeScript client for the SoundCloud API. Zero dependencies, native `fetch`, built-in OAuth 2.0 + PKCE, automatic retry, and an interactive CLI.
13
13
 
14
14
  ## Why soundcloud-api-ts?
15
15
 
@@ -17,8 +17,11 @@ A TypeScript client for the SoundCloud API. Zero dependencies, uses native `fetc
17
17
  - **Full TypeScript types** for all API responses
18
18
  - **Token management built-in** — `setToken()`, auto-refresh on 401
19
19
  - **PKCE support** for public clients and SPAs
20
+ - **Interactive CLI** — explore the API from your terminal with `soundcloud-cli`
20
21
  - **Clean API** — `sc.tracks.getTrack(id)` not `getTrack(token, id)`
22
+ - **Automatic retry** — exponential backoff on 429 and 5xx
21
23
  - **Dual ESM/CJS output** — works everywhere
24
+ - **LLM-friendly** — includes `llms.txt` and `AGENTS.md` for AI coding agents
22
25
 
23
26
  ## Comparison
24
27
 
@@ -37,6 +40,50 @@ A TypeScript client for the SoundCloud API. Zero dependencies, uses native `fetc
37
40
  npm install soundcloud-api-ts
38
41
  ```
39
42
 
43
+ ## CLI
44
+
45
+ Explore the SoundCloud API right from your terminal — no code required:
46
+
47
+ ```bash
48
+ # Install globally
49
+ npm install -g soundcloud-api-ts
50
+
51
+ # Set up credentials (interactive)
52
+ soundcloud-cli auth
53
+
54
+ # Search tracks — colorful formatted table
55
+ soundcloud-cli search "lofi beats"
56
+
57
+ # Get track details
58
+ soundcloud-cli track 293
59
+
60
+ # View user profile
61
+ soundcloud-cli user 12345
62
+
63
+ # Get stream URLs
64
+ soundcloud-cli stream 293
65
+
66
+ # Show playlist with track listing
67
+ soundcloud-cli playlist 456
68
+
69
+ # Resolve a SoundCloud URL
70
+ soundcloud-cli resolve https://soundcloud.com/artist/track
71
+
72
+ # OAuth login for authenticated endpoints
73
+ soundcloud-cli login
74
+ soundcloud-cli me
75
+ soundcloud-cli likes
76
+ ```
77
+
78
+ Every command supports `--json` for machine-readable output (great for piping to `jq` or using in scripts). Run `soundcloud-cli --help` for the full command list.
79
+
80
+ ```
81
+ ⚡ soundcloud-cli — Explore the SoundCloud API from your terminal
82
+
83
+ Commands: auth, login, search, track, user, playlist, stream, resolve, me, likes
84
+ Options: --json (raw JSON output), --help (per-command help)
85
+ ```
86
+
40
87
  ## Quick Start
41
88
 
42
89
  ```ts
@@ -345,6 +392,14 @@ const sc = new SoundCloudClient({
345
392
  - **401 errors** trigger `onTokenRefresh` (if configured) instead of retry
346
393
  - Backoff formula: `baseDelay × 2^attempt` with jitter
347
394
 
395
+ ## AI / LLM Integration
396
+
397
+ This package is designed to be easily used by AI coding agents:
398
+
399
+ - **[`llms.txt`](llms.txt)** — Complete method reference in plain text, optimized for LLM consumption
400
+ - **[`AGENTS.md`](AGENTS.md)** — Setup guide, common patterns, and gotchas for AI agents
401
+ - **Full JSDoc** with `@example` on every export — works great with GitHub Copilot, Cursor, etc.
402
+
348
403
  ## Documentation
349
404
 
350
405
  Full API documentation is available at **[twin-paws.github.io/soundcloud-api-ts](https://twin-paws.github.io/soundcloud-api-ts/)** — auto-generated from source with TypeDoc.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soundcloud-api-ts",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "A TypeScript client for the SoundCloud API. Zero dependencies, native fetch, full OAuth 2.0 + PKCE support.",
5
5
  "bin": {
6
6
  "soundcloud-cli": "./dist/cli.js"