@kamilio/wire 0.1.4 → 0.1.5
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 +57 -18
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Wire
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@kamilio/wire)
|
|
4
|
+
|
|
3
5
|
Sync Notion, Google Docs, Slack, Gmail, Asana, ChatGPT, and Zoom into local Markdown.
|
|
4
6
|
|
|
5
|
-
Wire turns web
|
|
7
|
+
Wire turns web resources into files your editor, repo, and coding agents can use. Attach a URL once, edit it as Markdown, and sync — pulling remote changes down and pushing supported local edits back.
|
|
6
8
|
|
|
7
9
|
## Install
|
|
8
10
|
|
|
@@ -10,41 +12,78 @@ Wire turns web-based knowledge into files your editor, repo, scripts, and coding
|
|
|
10
12
|
npm install -g @kamilio/wire
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
Requires Node 20+.
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
14
18
|
|
|
15
19
|
```sh
|
|
16
|
-
wire init
|
|
17
|
-
wire
|
|
18
|
-
wire
|
|
20
|
+
wire init # initialize a workspace
|
|
21
|
+
wire notion login # authenticate a service once
|
|
22
|
+
wire https://www.notion.so/example/page # attach a URL as tracked Markdown
|
|
23
|
+
wire sync-all # refresh everything, push local edits back
|
|
19
24
|
```
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
## Providers
|
|
22
27
|
|
|
23
|
-
|
|
28
|
+
| Provider | Resources | Sync |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| Notion | Pages | Two-way |
|
|
31
|
+
| Google Docs | Documents | Two-way |
|
|
32
|
+
| Google Sheets | Spreadsheets | Two-way |
|
|
33
|
+
| Google Slides | Presentations | One-way |
|
|
34
|
+
| Google Forms | Forms | Two-way |
|
|
35
|
+
| Asana | Projects | Two-way |
|
|
36
|
+
| Asana | Tasks | One-way |
|
|
37
|
+
| Slack | Messages and threads | One-way |
|
|
38
|
+
| Gmail | Email threads | One-way |
|
|
39
|
+
| ChatGPT | Conversations | One-way |
|
|
40
|
+
| Zoom | Docs and meeting transcripts | One-way |
|
|
24
41
|
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- `wire-mcp` for exposing the same tools to MCP clients
|
|
42
|
+
Two-way syncs pull remote changes and push local Markdown edits back to the source. One-way syncs only refresh the local file.
|
|
43
|
+
|
|
44
|
+
Each service authenticates separately with `wire <service> login`, `wire <service> status`, and `wire <service> logout`.
|
|
29
45
|
|
|
30
46
|
## Commands
|
|
31
47
|
|
|
32
48
|
```sh
|
|
49
|
+
wire <url> # attach a URL as tracked Markdown
|
|
33
50
|
wire preview <url> # inspect a resource without writing files
|
|
34
51
|
wire download <url> # save Markdown once without tracking it
|
|
35
|
-
wire sync <file-or-url> # sync one
|
|
52
|
+
wire sync <file-or-url> # sync one tracked resource
|
|
53
|
+
wire sync-all # sync the current directory tree
|
|
36
54
|
wire open <resource> # open the source and show local details
|
|
37
55
|
wire detach <resource> # download once, then stop tracking it
|
|
56
|
+
wire watch <file> # sync a file whenever it changes
|
|
38
57
|
```
|
|
39
58
|
|
|
40
|
-
|
|
59
|
+
Run `wire --help` for the full CLI.
|
|
60
|
+
|
|
61
|
+
## MCP
|
|
62
|
+
|
|
63
|
+
`wire-mcp` exposes the same tools to MCP clients over stdio:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{ "mcpServers": { "wire": { "command": "wire-mcp" } } }
|
|
67
|
+
```
|
|
41
68
|
|
|
42
|
-
|
|
69
|
+
## Hooks
|
|
70
|
+
|
|
71
|
+
Wire follows Husky-style lifecycle hooks: executable files in `.wire/hooks` run automatically, no enabling needed.
|
|
72
|
+
|
|
73
|
+
- `.wire/hooks/post-resource` and `.wire/hooks/post-resource.d/*` — after each synced resource
|
|
74
|
+
- `.wire/hooks/post-batch` — after a batch of syncs
|
|
75
|
+
- `.wire/hooks/post-command` — after every command
|
|
76
|
+
|
|
77
|
+
Hooks run from the workspace root with `WIRE_*` env vars such as `WIRE_COMMAND`, `WIRE_ROOT`, `WIRE_SERVICE`, `WIRE_TITLE`, `WIRE_PATH`, and `WIRE_RESULT_COUNT`. Exit non-zero to fail Wire. Example `post-resource` hook that files docs by service:
|
|
43
78
|
|
|
44
79
|
```sh
|
|
45
|
-
|
|
46
|
-
wire google-docs login
|
|
47
|
-
wire slack login
|
|
80
|
+
mkdir -p "docs/$WIRE_SERVICE" && dest="docs/$WIRE_SERVICE/$WIRE_TITLE.md" && mv "$WIRE_PATH" "$dest" && echo "WIRE_PATH=$dest"
|
|
48
81
|
```
|
|
49
82
|
|
|
50
|
-
|
|
83
|
+
## Configuration
|
|
84
|
+
|
|
85
|
+
Workspace config lives in `.wire/config.json` and applies to Wire plus hooks:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{ "backend": "sqlite", "path": "registry.sqlite3", "env": { "WIRE_CUSTOM_VALUE": "example" } }
|
|
89
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kamilio/wire",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Attach Notion, Google Docs, Slack, Gmail, Asana, ChatGPT, and Zoom resources as local Markdown you can sync.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
"scripts": {
|
|
88
88
|
"build": "tsc -p tsconfig.json",
|
|
89
89
|
"dev-link": "npm link",
|
|
90
|
-
"prepack": "rm -rf node_modules && mkdir -p node_modules && for package in provider-asana provider-chatgpt provider-gmail provider-google-docs provider-notion provider-slack provider-zoom wire-core; do cp -R ../$package node_modules/$package; done && for package in ajv commander fast-deep-equal fast-string-truncated-width fast-string-width fast-wrap-ansi fast-uri ignore jose jsonc-parser json-schema-traverse pct-encode require-from-string sisteransi smol-toml tiny-stdio-mcp-server toolcraft toolcraft-schema uri-template uri-template-lite yaml; do cp -R ../../node_modules/$package node_modules/$package; done",
|
|
91
|
-
"postpack": "rm -rf node_modules",
|
|
90
|
+
"prepack": "cp ../../README.md README.md && rm -rf node_modules && mkdir -p node_modules && for package in provider-asana provider-chatgpt provider-gmail provider-google-docs provider-notion provider-slack provider-zoom wire-core; do cp -R ../$package node_modules/$package; done && for package in ajv commander fast-deep-equal fast-string-truncated-width fast-string-width fast-wrap-ansi fast-uri ignore jose jsonc-parser json-schema-traverse pct-encode require-from-string sisteransi smol-toml tiny-stdio-mcp-server toolcraft toolcraft-schema uri-template uri-template-lite yaml; do cp -R ../../node_modules/$package node_modules/$package; done",
|
|
91
|
+
"postpack": "rm -rf node_modules README.md",
|
|
92
92
|
"test": "node --test --test-concurrency=1 test/**/*.test.mjs",
|
|
93
93
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
94
94
|
"check": "npm run typecheck && npm run build && npm test"
|