officedesk 0.0.14 → 0.0.18

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 (3) hide show
  1. package/README.md +149 -0
  2. package/bin/run.js +2 -2
  3. package/package.json +3 -8
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
@@ -10,8 +10,8 @@ function getPlatformPkg() {
10
10
  const platform = os.platform(); // 'linux', 'win32', 'darwin', ...
11
11
  const arch = os.arch(); // 'x64', 'arm64', ...
12
12
 
13
- if (platform === 'win32' && arch === 'x64') return 'officedesk-win32-x64';
14
- if (platform === 'linux' && arch === 'x64') return 'officedesk-linux-x64';
13
+ if (platform === 'win32' && arch === 'x64') return '@officedesk/win32-x64';
14
+ if (platform === 'linux' && arch === 'x64') return '@officedesk/linux-x64';
15
15
 
16
16
  throw new Error(
17
17
  `officedesk: unsupported platform ${platform}/${arch}. ` +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "officedesk",
3
- "version": "0.0.14",
3
+ "version": "0.0.18",
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,8 @@
12
12
  "access": "public"
13
13
  },
14
14
  "optionalDependencies": {
15
- "@officedesk/linux-x64": "0.0.14",
16
- "@officedesk/win32-x64": "0.0.14"
15
+ "@officedesk/linux-x64": "0.0.18",
16
+ "@officedesk/win32-x64": "0.0.18"
17
17
  },
18
18
  "scripts": {
19
19
  "build": "tsc",
@@ -33,10 +33,5 @@
33
33
  "repository": {
34
34
  "type": "git",
35
35
  "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
36
  }
42
37
  }