1- # workit — Quick Install for OpenClaw Agents
1+ # workit — Installation Guide
22
33> Give your OpenClaw agent full access to Google Workspace (Gmail, Calendar, Drive, Docs, Sheets, Contacts, Tasks, and more) via CLI.
44
5- ## 1. Install the Binary
5+ ## 1. Quick Install (Recommended)
6+
7+ Install the latest release binary and Claude Code skill in one command:
68
79``` bash
8- curl -fsSL https://raw.githubusercontent.com/automagik-dev/workit/main/scripts/ install.sh | bash
10+ curl -sSL https://raw.githubusercontent.com/automagik-dev/workit/main/install.sh | sh
911```
1012
11- For subsequent upgrades:
13+ This downloads the pre-built binary for your platform from GitHub Releases and installs it to ` ~/.local/bin/wk ` .
14+
15+ ### Installer Flags
16+
17+ Pass flags after a ` -- ` separator when piping to ` sh ` :
18+
19+ ``` bash
20+ # Force overwrite an existing installation
21+ curl -sSL https://raw.githubusercontent.com/automagik-dev/workit/main/install.sh | sh -s -- --force
22+
23+ # Install a specific version
24+ curl -sSL https://raw.githubusercontent.com/automagik-dev/workit/main/install.sh | sh -s -- --version v0.5.0
25+
26+ # Show installer help
27+ curl -sSL https://raw.githubusercontent.com/automagik-dev/workit/main/install.sh | sh -s -- --help
28+ ```
29+
30+ | Flag | Description |
31+ | ------| -------------|
32+ | ` --force ` | Overwrite existing installation without prompting |
33+ | ` --version VERSION ` | Install a specific release tag (e.g. ` v0.5.0 ` ) |
34+ | ` --help ` | Show installer usage |
35+
36+ ### Environment Variables
37+
38+ | Variable | Description |
39+ | ----------| -------------|
40+ | ` WK_RELEASE_URL ` | Override the download URL (useful for offline/air-gapped testing) |
41+
42+ ### Update
1243
1344``` bash
1445wk update
1546```
1647
48+ ---
49+
1750## 2. Configure Credentials
1851
1952** Option A: Pre-built binary (recommended for internal use)**
2053
21- If the binary was built with ` make build-internal ` , it already has OAuth credentials. Skip to step 3.
54+ If the binary was built with ` make build-internal ` , it already has OAuth credentials baked in . Skip to step 3.
2255
2356** Option B: Environment variables**
2457
@@ -34,6 +67,8 @@ export WK_CALLBACK_SERVER="https://auth.example.com"
3467wk auth credentials ~ /path/to/client_secret.json
3568```
3669
70+ ---
71+
3772## 3. Authenticate a Google Account
3873
3974### For agents (headless — no browser needed):
@@ -57,6 +92,8 @@ wk auth add you@gmail.com --services=user
5792# Opens browser, complete login, done.
5893```
5994
95+ ---
96+
6097## 4. Set Up Keyring (Headless Environments)
6198
6299On servers without a desktop keychain:
@@ -69,6 +106,8 @@ wk auth keyring file
69106export WK_KEYRING_PASSWORD=" your-secure-password"
70107```
71108
109+ ---
110+
72111## 5. Verify It Works
73112
74113``` bash
@@ -81,6 +120,8 @@ wk drive list --account you@gmail.com
81120wk calendar events list --account you@gmail.com
82121```
83122
123+ ---
124+
84125## 6. Add to OpenClaw Config
85126
86127Add ` wk ` to your agent's workspace. In your agent's ` TOOLS.md ` :
@@ -132,6 +173,8 @@ Access Gmail, Calendar, Drive, Docs, Sheets, Contacts, Tasks via `wk` CLI.
132173- Multiple accounts supported: ` wk auth add second@gmail.com `
133174```
134175
176+ ---
177+
135178## 7. Drive Sync Setup (optional)
136179
137180To sync a Google Drive folder to a local directory:
@@ -160,18 +203,78 @@ Changes sync bidirectionally:
160203
161204---
162205
206+ ## 8. Build from Source (Developer / Contributor)
207+
208+ If you want to contribute to workit or build a custom binary, you need Go 1.21+ and the repo cloned locally.
209+
210+ ### Requirements
211+
212+ - Go 1.21 or newer — [ go.dev/doc/install] ( https://go.dev/doc/install )
213+ - GNU Make
214+
215+ ### Quick Build
216+
217+ ``` bash
218+ git clone https://github.com/automagik-dev/workit.git
219+ cd workit
220+ make build
221+ ./bin/wk --help
222+ ```
223+
224+ ### Makefile Targets
225+
226+ | Target | Description |
227+ | --------| -------------|
228+ | ` make build ` | Build binary to ` bin/wk ` (community build, no baked-in credentials) |
229+ | ` make build-automagik ` | Build with Automagik OAuth credentials (requires internal secrets) |
230+ | ` make build-internal ` | Build with internal-use baked-in credentials |
231+ | ` make tools ` | Install dev tools (` gofumpt ` , ` goimports ` , ` golangci-lint ` ) to ` .tools/ ` |
232+ | ` make test ` | Run test suite |
233+ | ` make lint ` | Run linter |
234+ | ` make install ` | Install ` bin/wk ` to ` ~/.local/bin ` |
235+
236+ ### Developer Credential Setup
237+
238+ When building from source you need to supply your own OAuth credentials:
239+
240+ ``` bash
241+ # Option A: Environment variables
242+ export WK_CLIENT_ID=" your-client-id"
243+ export WK_CLIENT_SECRET=" your-client-secret"
244+ export WK_CALLBACK_SERVER=" https://auth.example.com"
245+
246+ # Option B: Credentials file
247+ mkdir -p ~ /.config/workit && chmod 700 ~ /.config/workit
248+ cat > ~ /.config/workit/credentials.env << 'CRED '
249+ WK_CLIENT_ID=your-client-id
250+ WK_CLIENT_SECRET=your-client-secret
251+ WK_CALLBACK_SERVER=https://your-callback-server.example.com
252+ CRED
253+ ```
254+
255+ Then build and install:
256+
257+ ``` bash
258+ make build
259+ make install # copies bin/wk to ~/.local/bin
260+ ```
261+
262+ After building, proceed with [ Configure Credentials] ( #2-configure-credentials ) above.
263+
264+ ---
265+
163266## TL;DR for Agents
164267
165268``` bash
166269# Install
167- curl -fsSL https://raw.githubusercontent.com/automagik-dev/workit/main/scripts/ install.sh | bash
270+ curl -sSL https://raw.githubusercontent.com/automagik-dev/workit/main/install.sh | sh
168271
169272# Update
170273wk update
171274
172275# Configure (if not using pre-built binary)
173276export WK_CLIENT_ID=" xxx"
174- export WK_CLIENT_SECRET=" xxx"
277+ export WK_CLIENT_SECRET=" xxx"
175278export WK_CALLBACK_SERVER=" https://auth.example.com"
176279export WK_KEYRING_BACKEND=file
177280export WK_KEYRING_PASSWORD=" secure-password"
0 commit comments