@v0idd0/tabsnap 1.0.0 → 1.0.2
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 +87 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
# tabsnap
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@v0idd0/tabsnap)
|
|
4
|
+
[](https://www.npmjs.com/package/@v0idd0/tabsnap)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](https://developer.chrome.com/docs/extensions/mv3/intro/)
|
|
7
|
+
[](https://voiddo.com/)
|
|
5
8
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
> Capture every open tab as plain text, markdown, JSON, or a readme file.
|
|
10
|
+
> One click in the browser. One pipe in the terminal.
|
|
11
|
+
> Free, MIT, zero telemetry.
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
[Browser-extension landing](https://extensions.voiddo.com/tabsnap/) ·
|
|
14
|
+
[CLI landing](https://tools.voiddo.com/tabsnap/) ·
|
|
15
|
+
[npm](https://www.npmjs.com/package/@v0idd0/tabsnap) ·
|
|
16
|
+
[Privacy](https://extensions.voiddo.com/tabsnap/privacy/)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Two faces, one engine
|
|
21
|
+
|
|
22
|
+
The same `snapshot.js` formatters drive both the **browser extension** popup
|
|
23
|
+
and the **`@v0idd0/tabsnap` CLI** on npm. Output bytes are identical for the
|
|
24
|
+
same inputs.
|
|
25
|
+
|
|
26
|
+
### As a browser extension
|
|
11
27
|
|
|
12
28
|
Click the toolbar icon → tabsnap reads the title and URL of every tab you have
|
|
13
29
|
open and renders them in the popup as one of four formats:
|
|
@@ -19,6 +35,53 @@ open and renders them in the popup as one of four formats:
|
|
|
19
35
|
|
|
20
36
|
Hit **copy** or **download** and you're done.
|
|
21
37
|
|
|
38
|
+
### As a CLI
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
npm i -g @v0idd0/tabsnap
|
|
42
|
+
|
|
43
|
+
# pipe any tabs-shaped JSON in, get a snapshot out
|
|
44
|
+
cat tabs.json | tabsnap # markdown (default)
|
|
45
|
+
cat tabs.json | tabsnap --format=readme # readme.md
|
|
46
|
+
cat tabs.json | tabsnap -f json --no-group # flat structured array
|
|
47
|
+
|
|
48
|
+
# from file
|
|
49
|
+
tabsnap --file=tabs.json -f plain
|
|
50
|
+
|
|
51
|
+
# include pinned + incognito tabs (skipped by default)
|
|
52
|
+
tabsnap --include-pinned --include-incognito < tabs.json
|
|
53
|
+
|
|
54
|
+
# pipe to clipboard (macOS) or any tool
|
|
55
|
+
tabsnap --format=readme < tabs.json | pbcopy
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Accepted input shapes (the CLI auto-detects):
|
|
59
|
+
|
|
60
|
+
```jsonc
|
|
61
|
+
// 1) bare array
|
|
62
|
+
[ {"title":"…","url":"…","windowId":1,"pinned":false}, … ]
|
|
63
|
+
|
|
64
|
+
// 2) {tabs:[…]} wrapper
|
|
65
|
+
{ "tabs": [ … ] }
|
|
66
|
+
|
|
67
|
+
// 3) {windows:[{tabs:[…]}]} wrapper — also matches the JSON tabsnap exports
|
|
68
|
+
{ "windows": [ {"window_index":1, "tabs":[…]}, … ] }
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### As a library
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
const { formatTabs, filterTabs, groupTabsByWindow, countByDomain } = require('@v0idd0/tabsnap');
|
|
75
|
+
|
|
76
|
+
const out = formatTabs(myTabs, 'markdown', {
|
|
77
|
+
groupByWindow: true,
|
|
78
|
+
includePinned: false,
|
|
79
|
+
includeIncognito: false,
|
|
80
|
+
});
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Pure functions, zero deps, works in any JS runtime that has `URL` + `Date`.
|
|
84
|
+
|
|
22
85
|
## Privacy
|
|
23
86
|
|
|
24
87
|
tabsnap reads only `chrome.tabs` metadata (title, URL, windowId, pinned,
|
|
@@ -33,24 +96,39 @@ Permissions:
|
|
|
33
96
|
|
|
34
97
|
No host permissions. No `activeTab`. No content scripts.
|
|
35
98
|
|
|
99
|
+
The CLI is a Node.js process — it cannot reach the browser. It only formats
|
|
100
|
+
JSON you hand it.
|
|
101
|
+
|
|
36
102
|
## Repo layout
|
|
37
103
|
|
|
38
104
|
chrome/ Manifest V3 source for Chrome / Edge / Brave
|
|
39
105
|
firefox/ Manifest V3 source with browser_specific_settings.gecko
|
|
40
106
|
edge/ Manifest V3 source (mirrors chrome/)
|
|
107
|
+
src/ CLI / library source — published to npm as @v0idd0/tabsnap
|
|
108
|
+
bin/ CLI entry point
|
|
109
|
+
test.js 40 smoke tests for the lib + CLI
|
|
41
110
|
dist/ Pre-built ZIPs ready for store submission
|
|
42
111
|
shared/ Files copied into each platform tree at build time
|
|
43
112
|
|
|
44
113
|
## Build
|
|
45
114
|
|
|
46
|
-
The platform directories are already self-contained —
|
|
115
|
+
The platform directories are already self-contained — load any of
|
|
47
116
|
`chrome/`, `firefox/`, or `edge/` as an unpacked extension in the matching
|
|
48
117
|
browser. The pre-built ZIPs in `dist/` are produced by zipping each platform
|
|
49
118
|
directory.
|
|
50
119
|
|
|
120
|
+
The npm package ships only `src/`, `bin/`, `README.md`, and `LICENSE` (whitelisted
|
|
121
|
+
via the `files` field in `package.json`).
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
node test.js # run all 40 tests
|
|
125
|
+
npm publish --access public
|
|
126
|
+
```
|
|
127
|
+
|
|
51
128
|
## License
|
|
52
129
|
|
|
53
130
|
MIT — see `LICENSE`.
|
|
54
131
|
|
|
55
|
-
|
|
56
|
-
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
Built by [vøiddo](https://voiddo.com/) — a small studio shipping AI-flavoured products, free dev tools, Chrome extensions and weird browser games.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v0idd0/tabsnap",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "tabsnap — format a tab list (or any tabs-shaped JSON) as markdown, plain text, JSON, or a readme file. Library + CLI. Same formatters that power the tabsnap browser extension. Zero deps. Free forever from vøiddo.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"author": "vøiddo <support@voiddo.com> (https://voiddo.com)",
|
|
36
36
|
"license": "MIT",
|
|
37
|
-
"homepage": "https://
|
|
37
|
+
"homepage": "https://tools.voiddo.com/tabsnap/?ref=tabsnap-npm",
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
40
40
|
"url": "git+https://github.com/voidd0/tabsnap.git"
|
|
@@ -53,4 +53,4 @@
|
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=14"
|
|
55
55
|
}
|
|
56
|
-
}
|
|
56
|
+
}
|