openlibrary-cli 0.1.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/README.md +75 -0
- package/dist/index.js +2877 -0
- package/package.json +33 -0
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# openlibrary-cli
|
|
2
|
+
|
|
3
|
+
CLI for the [Open Library](https://openlibrary.org) API. Made with [api2cli.dev](https://api2cli.dev).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i -g openlibrary-cli
|
|
9
|
+
# or
|
|
10
|
+
npx openlibrary-cli --help
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
No API key needed — the Open Library API is public.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
openlibrary-cli search books "dune" --limit 5
|
|
19
|
+
openlibrary-cli books isbn 9780140328721
|
|
20
|
+
openlibrary-cli authors get OL23919A
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Resources
|
|
24
|
+
|
|
25
|
+
### search
|
|
26
|
+
|
|
27
|
+
| Command | Description |
|
|
28
|
+
|---------|-------------|
|
|
29
|
+
| `openlibrary-cli search books "query"` | Search for books/works |
|
|
30
|
+
| `openlibrary-cli search books "query" --author "name"` | Search by author |
|
|
31
|
+
| `openlibrary-cli search authors "query"` | Search for authors |
|
|
32
|
+
| `openlibrary-cli search lists "query"` | Search user lists |
|
|
33
|
+
|
|
34
|
+
### works
|
|
35
|
+
|
|
36
|
+
| Command | Description |
|
|
37
|
+
|---------|-------------|
|
|
38
|
+
| `openlibrary-cli works get OL45804W` | Get a work by OLID |
|
|
39
|
+
| `openlibrary-cli works editions OL45804W` | List editions of a work |
|
|
40
|
+
| `openlibrary-cli works ratings OL45804W` | Get ratings for a work |
|
|
41
|
+
| `openlibrary-cli works bookshelves OL45804W` | Get reading log counts |
|
|
42
|
+
|
|
43
|
+
### books
|
|
44
|
+
|
|
45
|
+
| Command | Description |
|
|
46
|
+
|---------|-------------|
|
|
47
|
+
| `openlibrary-cli books get OL7353617M` | Get an edition by OLID |
|
|
48
|
+
| `openlibrary-cli books isbn 9780140328721` | Look up a book by ISBN |
|
|
49
|
+
|
|
50
|
+
### authors
|
|
51
|
+
|
|
52
|
+
| Command | Description |
|
|
53
|
+
|---------|-------------|
|
|
54
|
+
| `openlibrary-cli authors get OL23919A` | Get author details |
|
|
55
|
+
| `openlibrary-cli authors works OL23919A` | List works by an author |
|
|
56
|
+
|
|
57
|
+
### subjects
|
|
58
|
+
|
|
59
|
+
| Command | Description |
|
|
60
|
+
|---------|-------------|
|
|
61
|
+
| `openlibrary-cli subjects get fantasy` | Get works for a subject |
|
|
62
|
+
| `openlibrary-cli subjects get fantasy --ebooks` | Filter to e-books only |
|
|
63
|
+
|
|
64
|
+
### recent
|
|
65
|
+
|
|
66
|
+
| Command | Description |
|
|
67
|
+
|---------|-------------|
|
|
68
|
+
| `openlibrary-cli recent list` | List recent changes |
|
|
69
|
+
| `openlibrary-cli recent list --kind add-book` | Filter by change kind |
|
|
70
|
+
|
|
71
|
+
## Global Flags
|
|
72
|
+
|
|
73
|
+
All commands support: `--json`, `--format`, `--verbose`, `--no-color`, `--no-header`
|
|
74
|
+
|
|
75
|
+
Format options: `text`, `json`, `csv`, `yaml`
|