officedesk 0.0.15 → 0.0.19
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 +149 -0
- package/bin/run.js +3 -1
- package/package.json +8 -9
package/README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# officedesk
|
|
2
|
+
|
|
3
|
+
Master CLI for [OfficeDesk AI](https://github.com/initdsg/officedesk.ai). Discovers and delegates to `officedesk-plugin-*` executables in `$PATH` using the Git-style delegation pattern.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g officedesk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## How it works
|
|
12
|
+
|
|
13
|
+
The `officedesk` CLI scans `$PATH` for executables matching the `officedesk-plugin-*` naming convention and delegates commands to them:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
officedesk <plugin> <command> [options]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This means you can install any OfficeDesk plugin globally and use it immediately through the master CLI without any additional configuration.
|
|
20
|
+
|
|
21
|
+
## Quick start
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Install the CLI and a plugin
|
|
25
|
+
npm install -g officedesk @officedesk/plugin-gmail
|
|
26
|
+
|
|
27
|
+
# Delegate a command to the plugin
|
|
28
|
+
officedesk plugin-gmail search-messages --query="subject:invoice"
|
|
29
|
+
|
|
30
|
+
# List all discovered plugins
|
|
31
|
+
officedesk --list
|
|
32
|
+
|
|
33
|
+
# Show aggregated help from all discovered plugins
|
|
34
|
+
officedesk --help
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
officedesk <plugin> <command> [options]
|
|
41
|
+
officedesk --help
|
|
42
|
+
officedesk --list
|
|
43
|
+
officedesk list-profiles
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Delegate to a plugin
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
officedesk plugin-jira get-ticket --issue=PROJ-123
|
|
50
|
+
officedesk plugin-xero get-accounts
|
|
51
|
+
officedesk plugin-gmail search-messages --query="from:boss"
|
|
52
|
+
officedesk plugin-slack send-message --text="Build complete"
|
|
53
|
+
officedesk plugin-google-drive list-files --folder-path=Finance
|
|
54
|
+
officedesk plugin-odoo list-invoices
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The plugin name can be passed with or without the `plugin-` prefix:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
officedesk plugin-gmail search-messages --query="subject:invoice"
|
|
61
|
+
officedesk gmail search-messages --query="subject:invoice" # same thing
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Plugin aliases
|
|
65
|
+
|
|
66
|
+
Some plugins have short aliases:
|
|
67
|
+
|
|
68
|
+
| Alias | Resolves to |
|
|
69
|
+
|---|---|
|
|
70
|
+
| `sheets` | `plugin-google-sheets` |
|
|
71
|
+
| `google-sheets` | `plugin-google-sheets` |
|
|
72
|
+
| `plugin-sheets` | `plugin-google-sheets` |
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
officedesk sheets append-row --spreadsheet-id=ID --sheet=Sheet1 --data='{"Name":"John"}'
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Global commands
|
|
79
|
+
|
|
80
|
+
### `--help`
|
|
81
|
+
|
|
82
|
+
Show aggregated help output from all discovered plugins.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
officedesk --help
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### `--list`
|
|
89
|
+
|
|
90
|
+
List all discovered plugins and their binary paths.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
officedesk --list
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### `list-profiles`
|
|
97
|
+
|
|
98
|
+
Aggregate and display configured profiles across all profile-aware plugins (`plugin-aws`, `plugin-gmail`, `plugin-google-drive`, `plugin-slack`).
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
officedesk list-profiles
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Returns JSON with profiles from each plugin that supports the `list-profiles` command.
|
|
105
|
+
|
|
106
|
+
### `--version`
|
|
107
|
+
|
|
108
|
+
Print the CLI version.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
officedesk --version
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Plugin discovery
|
|
115
|
+
|
|
116
|
+
The CLI scans the following locations for `officedesk-plugin-*` executables, in order:
|
|
117
|
+
|
|
118
|
+
1. All directories in `$PATH`
|
|
119
|
+
2. `./dist/bin/` relative to the current working directory
|
|
120
|
+
3. The directory containing the `officedesk` binary itself
|
|
121
|
+
|
|
122
|
+
The first matching executable found for each plugin name wins. Platform-specific variants (e.g. `officedesk-plugin-gmail-linux`) and `.exe` suffixes are handled automatically.
|
|
123
|
+
|
|
124
|
+
## Installing plugins
|
|
125
|
+
|
|
126
|
+
Each OfficeDesk plugin is a separate npm package. Install the ones you need globally alongside the CLI:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npm install -g officedesk \
|
|
130
|
+
@officedesk/plugin-gmail \
|
|
131
|
+
@officedesk/plugin-slack \
|
|
132
|
+
@officedesk/plugin-google-drive \
|
|
133
|
+
@officedesk/plugin-jira \
|
|
134
|
+
@officedesk/plugin-xero
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Once installed, they are automatically discovered the next time you run `officedesk`.
|
|
138
|
+
|
|
139
|
+
## Environment variables
|
|
140
|
+
|
|
141
|
+
| Variable | Description |
|
|
142
|
+
|---|---|
|
|
143
|
+
| `OFFICEDESK_HOME` | Base directory for plugin config and tokens (default: `~/.officedesk/`) |
|
|
144
|
+
|
|
145
|
+
`OFFICEDESK_HOME` is passed through to each plugin binary when commands are delegated.
|
|
146
|
+
|
|
147
|
+
## License
|
|
148
|
+
|
|
149
|
+
ISC
|
package/bin/run.js
CHANGED
|
@@ -12,10 +12,12 @@ function getPlatformPkg() {
|
|
|
12
12
|
|
|
13
13
|
if (platform === 'win32' && arch === 'x64') return '@officedesk/win32-x64';
|
|
14
14
|
if (platform === 'linux' && arch === 'x64') return '@officedesk/linux-x64';
|
|
15
|
+
if (platform === 'darwin' && arch === 'x64') return '@officedesk/darwin-x64';
|
|
16
|
+
if (platform === 'darwin' && arch === 'arm64') return '@officedesk/darwin-arm64';
|
|
15
17
|
|
|
16
18
|
throw new Error(
|
|
17
19
|
`officedesk: unsupported platform ${platform}/${arch}. ` +
|
|
18
|
-
`Supported: linux/x64, win32/x64.`
|
|
20
|
+
`Supported: linux/x64, win32/x64, darwin/x64, darwin/arm64.`
|
|
19
21
|
);
|
|
20
22
|
}
|
|
21
23
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "officedesk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "Master CLI for officedesk-ai — discovers and delegates to officedesk-plugin-* executables",
|
|
5
5
|
"bin": {
|
|
6
6
|
"officedesk": "bin/run.js"
|
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
14
|
"optionalDependencies": {
|
|
15
|
-
"@officedesk/linux-x64": "0.0.
|
|
16
|
-
"@officedesk/win32-x64": "0.0.
|
|
15
|
+
"@officedesk/linux-x64": "0.0.19",
|
|
16
|
+
"@officedesk/win32-x64": "0.0.19",
|
|
17
|
+
"@officedesk/darwin-x64": "0.0.19",
|
|
18
|
+
"@officedesk/darwin-arm64": "0.0.19"
|
|
17
19
|
},
|
|
18
20
|
"scripts": {
|
|
19
21
|
"build": "tsc",
|
|
@@ -21,7 +23,9 @@
|
|
|
21
23
|
"test": "tsc && node --test dist/__tests__/*.test.js",
|
|
22
24
|
"build:bin": "bun build src/index.ts --compile --outfile ../../dist/bin/officedesk",
|
|
23
25
|
"build:bin:linux": "bun build src/index.ts --compile --target=bun-linux-x64 --outfile ../../dist/bin/officedesk-linux",
|
|
24
|
-
"build:bin:windows": "bun build src/index.ts --compile --target=bun-windows-x64 --outfile ../../dist/bin/officedesk.exe"
|
|
26
|
+
"build:bin:windows": "bun build src/index.ts --compile --target=bun-windows-x64 --outfile ../../dist/bin/officedesk.exe",
|
|
27
|
+
"build:bin:macos-x64": "bun build src/index.ts --compile --target=bun-darwin-x64 --outfile ../../dist/bin/officedesk-darwin-x64",
|
|
28
|
+
"build:bin:macos-arm64": "bun build src/index.ts --compile --target=bun-darwin-arm64 --outfile ../../dist/bin/officedesk-darwin-arm64"
|
|
25
29
|
},
|
|
26
30
|
"keywords": [
|
|
27
31
|
"officedesk",
|
|
@@ -33,10 +37,5 @@
|
|
|
33
37
|
"repository": {
|
|
34
38
|
"type": "git",
|
|
35
39
|
"url": "git+https://github.com/initdsg/officedesk.ai-cli.git"
|
|
36
|
-
},
|
|
37
|
-
"dependencies": {},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@types/node": "^25.0.10",
|
|
40
|
-
"typescript": "^5.9.3"
|
|
41
40
|
}
|
|
42
41
|
}
|