Skip to content

Commit 0ed59c4

Browse files
committed
2 parents eb931ec + 9927ab8 commit 0ed59c4

13 files changed

Lines changed: 1017 additions & 9 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish OpenCode Plugin to npm
2+
3+
on:
4+
push:
5+
tags:
6+
- "opencode-v*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
defaults:
12+
run:
13+
working-directory: opencode-plugin
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
registry-url: https://registry.npmjs.org
22+
23+
- run: npm install
24+
working-directory: devglobe-core
25+
26+
- run: npm install
27+
28+
- run: npm run build
29+
30+
- run: npm publish --access public
31+
env:
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 69 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
<a href="#zed">Zed</a> &nbsp;·&nbsp;
1818
<a href="#neovim">NeoVim</a> &nbsp;·&nbsp;
1919
<a href="#claude-code">Claude Code</a> &nbsp;·&nbsp;
20-
<a href="#codex">Codex</a>
20+
<a href="#codex">Codex</a> &nbsp;·&nbsp;
21+
<a href="#opencode">OpenCode</a>
2122
</p>
2223

2324
<p align="center">
@@ -46,7 +47,7 @@ DevGlobe is a **free, open-source** platform that lights up a marker on a 3D glo
4647
## Quick Start
4748

4849
```
49-
1. Sign in on devglobe.xyz with GitHub
50+
1. Sign in on devglobe.xyz with GitHub, X (Twitter), or Google
5051
2. Copy your API key from the profile settings
5152
3. Install the extension in your IDE and paste the key
5253
```
@@ -365,6 +366,58 @@ This saves your key, installs heartbeat hooks, and enables the `codex_hooks` fea
365366

366367
---
367368

369+
### OpenCode
370+
371+
#### Installation
372+
373+
Add the plugin to your `opencode.json`:
374+
375+
```json
376+
{
377+
"plugin": ["opencode-devglobe"]
378+
}
379+
```
380+
381+
OpenCode installs it automatically on startup via npm.
382+
383+
#### Setup
384+
385+
Restart OpenCode and ask:
386+
387+
```
388+
setup devglobe with my key YOUR_API_KEY
389+
```
390+
391+
Get your API key at [devglobe.xyz](https://devglobe.xyz) — sign in, then open your **profile settings**.
392+
393+
#### Features
394+
395+
| Feature | Description |
396+
|---------|-------------|
397+
| **Live heartbeat** | Hooks into `tool.execute.after` and `file.edited` events. Sends a heartbeat at most once per minute. |
398+
| **Language detection** | Detects the language from exact file paths provided by OpenCode tool calls. |
399+
| **Git integration** | Detects your repo from the git remote. |
400+
| **Anonymous mode** | **Enabled by default.** Hides your exact location — placed on a random city in your country (from a database of 152,000+ cities worldwide). |
401+
| **Repo sharing** | Ask "share my repo on devglobe" to toggle (disabled by default). |
402+
403+
#### Commands
404+
405+
Just ask in natural language — the plugin registers tools that the AI agent calls on your behalf:
406+
407+
| What you say | Tool | Description |
408+
|--------------|------|-------------|
409+
| "setup devglobe with key X" | `devglobe_setup` | Configure API key and create settings |
410+
| "enable anonymous mode" | `devglobe_anonymous` | Toggle anonymous mode |
411+
| "share my repo on devglobe" | `devglobe_share_repo` | Toggle repo sharing |
412+
| "set my devglobe status to X" | `devglobe_status` | Set a status message on the globe |
413+
| "check devglobe" | `devglobe_check` | Verify installation |
414+
415+
#### Requirements
416+
417+
- [OpenCode](https://github.com/anomalyco/opencode)
418+
419+
---
420+
368421
## The Globe
369422

370423
On [devglobe.xyz](https://devglobe.xyz), you'll find:
@@ -391,7 +444,7 @@ On [devglobe.xyz](https://devglobe.xyz), you'll find:
391444

392445
**What we NEVER touch:** source code, file contents, file names, folder paths, keystrokes, commit messages, Git branches, environment variables, SSH keys. Your IP is used once for geolocation then discarded — never sent to DevGlobe.
393446

394-
**API keys** are stored in your OS keychain (VS Code SecretStorage, JetBrains PasswordSafe) or local config file (Zed, NeoVim, Claude Code, Codex).
447+
**API keys** are stored in your OS keychain (VS Code SecretStorage, JetBrains PasswordSafe) or local config file (Zed, NeoVim, Claude Code, Codex, OpenCode).
395448

396449
**Network:** HTTPS only (TLS 1.2+), no intermediary server, Content Security Policy on webviews, Row Level Security on the database. No telemetry.
397450

@@ -485,6 +538,18 @@ ln -s "$(pwd)" ~/.codex/skills/codex-plugin
485538

486539
Then in Codex: `$devglobe setup YOUR_API_KEY`
487540

541+
### OpenCode
542+
543+
```bash
544+
cd opencode-plugin
545+
npm install && npm run build
546+
```
547+
548+
Then in your `opencode.json`:
549+
```json
550+
{"plugin": ["file:///path/to/devglobe-extension/opencode-plugin/dist/index.js"]}
551+
```
552+
488553
---
489554

490555
## Contributing
@@ -503,7 +568,7 @@ Contributions are welcome — fixes, new features, documentation.
503568
If you like DevGlobe, help us spread the word!
504569

505570
<p align="center">
506-
<a href="https://twitter.com/intent/tweet?text=I%20just%20discovered%20DevGlobe%20%E2%80%94%20a%20free%20open-source%203D%20globe%20that%20shows%20developers%20coding%20in%20real%20time.%20Extensions%20for%20VS%20Code%2C%20JetBrains%2C%20Zed%2C%20NeoVim%2C%20Claude%20Code%20%26%20Codex.&url=https%3A%2F%2Fgithub.com%2FNako0%2Fdevglobe-extension"><img src="https://img.shields.io/badge/Share_on-X%20(Twitter)-000000?style=for-the-badge&logo=x" alt="Share on X" /></a>&nbsp;
571+
<a href="https://twitter.com/intent/tweet?text=I%20just%20discovered%20DevGlobe%20%E2%80%94%20a%20free%20open-source%203D%20globe%20that%20shows%20developers%20coding%20in%20real%20time.%20Extensions%20for%20VS%20Code%2C%20JetBrains%2C%20Zed%2C%20NeoVim%2C%20Claude%20Code%2C%20Codex%20%26%20OpenCode.&url=https%3A%2F%2Fgithub.com%2FNako0%2Fdevglobe-extension"><img src="https://img.shields.io/badge/Share_on-X%20(Twitter)-000000?style=for-the-badge&logo=x" alt="Share on X" /></a>&nbsp;
507572
<a href="https://www.reddit.com/submit?url=https%3A%2F%2Fgithub.com%2FNako0%2Fdevglobe-extension&title=DevGlobe%20%E2%80%94%20See%20developers%20coding%20in%20real%20time%20on%20a%203D%20globe"><img src="https://img.shields.io/badge/Share_on-Reddit-FF4500?style=for-the-badge&logo=reddit&logoColor=white" alt="Share on Reddit" /></a>&nbsp;
508573
<a href="https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fgithub.com%2FNako0%2Fdevglobe-extension&t=DevGlobe%20%E2%80%94%20See%20developers%20coding%20in%20real%20time%20on%20a%203D%20globe"><img src="https://img.shields.io/badge/Share_on-Hacker%20News-F0652F?style=for-the-badge&logo=ycombinator&logoColor=white" alt="Share on HN" /></a>&nbsp;
509574
<a href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgithub.com%2FNako0%2Fdevglobe-extension"><img src="https://img.shields.io/badge/Share_on-LinkedIn-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white" alt="Share on LinkedIn" /></a>

claude-code-plugin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Track your Claude Code activity on the [DevGlobe](https://devglobe.xyz) world ma
66

77
- [Claude Code](https://claude.com/claude-code) installed
88
- [Node.js](https://nodejs.org) (v18+)
9-
- A DevGlobe account (sign in with GitHub at [devglobe.xyz](https://devglobe.xyz))
9+
- A DevGlobe account (sign in at [devglobe.xyz](https://devglobe.xyz) with GitHub, X (Twitter), or Google)
1010

1111
## Install
1212

codex-plugin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Track your Codex CLI activity on the [DevGlobe](https://devglobe.xyz) world map.
66

77
- [Codex CLI](https://github.com/openai/codex) installed
88
- [Node.js](https://nodejs.org) (v18+)
9-
- A DevGlobe account (sign in with GitHub at [devglobe.xyz](https://devglobe.xyz))
9+
- A DevGlobe account (sign in at [devglobe.xyz](https://devglobe.xyz) with GitHub, X (Twitter), or Google)
1010

1111
## Install
1212

jetbrains-plugin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Compatible with **all JetBrains IDEs**: IntelliJ IDEA, WebStorm, PyCharm, GoLand
2525

2626
## How it works
2727

28-
1. Sign in on [devglobe.xyz](https://devglobe.xyz) with GitHub
28+
1. Sign in on [devglobe.xyz](https://devglobe.xyz) with GitHub, X (Twitter), or Google
2929
2. Copy your API key from the site settings
3030
3. Open the **DevGlobe** tool window in your IDE (right sidebar)
3131
4. Paste your API key → **Connect**

opencode-plugin/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

opencode-plugin/README.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# DevGlobe — OpenCode Plugin
2+
3+
Track your OpenCode activity on the [DevGlobe](https://devglobe.xyz) world map.
4+
5+
## Prerequisites
6+
7+
- [OpenCode](https://github.com/anomalyco/opencode) installed
8+
- A DevGlobe account (sign in at [devglobe.xyz](https://devglobe.xyz) with GitHub, X (Twitter), or Google)
9+
10+
## Install
11+
12+
Add `opencode-devglobe` to your `opencode.json`:
13+
14+
```json
15+
{
16+
"plugin": ["opencode-devglobe"]
17+
}
18+
```
19+
20+
OpenCode installs the plugin automatically on startup via npm.
21+
22+
<details>
23+
<summary>Alternative: install from a local clone</summary>
24+
25+
```bash
26+
git clone https://github.com/Nako0/devglobe-extension
27+
cd devglobe-extension/opencode-plugin
28+
npm install && npm run build
29+
```
30+
31+
Then in your `opencode.json`:
32+
33+
```json
34+
{
35+
"plugin": ["file:///path/to/devglobe-extension/opencode-plugin/dist/index.js"]
36+
}
37+
```
38+
39+
</details>
40+
41+
## Setup
42+
43+
After installing, restart OpenCode and ask it to set up DevGlobe:
44+
45+
```
46+
setup devglobe with my key devglobe_YOUR_KEY_HERE
47+
```
48+
49+
Get your API key at [devglobe.xyz](https://devglobe.xyz) — sign in, then open your **profile settings**.
50+
51+
OpenCode will call the `devglobe_setup` tool, which saves your key and creates default settings. Heartbeats start automatically while you code.
52+
53+
### Alternative: manual setup
54+
55+
```bash
56+
mkdir -p ~/.devglobe
57+
echo "your-api-key-here" > ~/.devglobe/api_key
58+
echo '{"anonymousMode": true, "shareRepo": false}' > ~/.devglobe/config.json
59+
```
60+
61+
Or use an environment variable (add to `~/.zshrc` or `~/.bashrc`):
62+
63+
```bash
64+
export DEVGLOBE_API_KEY="your-api-key-here"
65+
```
66+
67+
## Commands
68+
69+
The plugin registers tools that the AI agent can call on your behalf. Just ask in natural language:
70+
71+
| What you say | Tool called | Description |
72+
|--------------|-------------|-------------|
73+
| "setup devglobe with key X" | `devglobe_setup` | Configure your API key and create default settings |
74+
| "enable anonymous mode on devglobe" | `devglobe_anonymous` | Toggle anonymous mode (city-level location) |
75+
| "share my repo on devglobe" | `devglobe_share_repo` | Toggle repository sharing on the globe |
76+
| "set my devglobe status to Working on X" | `devglobe_status` | Set a status message on your globe profile |
77+
| "check devglobe status" | `devglobe_check` | Verify installation (API key, config) |
78+
79+
### Settings
80+
81+
| Setting | Default | Description |
82+
|---------|---------|-------------|
83+
| `anonymousMode` | `true` | Your marker is placed on a random city in your country (from 152,000+ cities). Your real location is never sent. |
84+
| `shareRepo` | `false` | Display your current repo on your DevGlobe profile. |
85+
86+
Settings are stored in `~/.devglobe/config.json` and can also be modified via the tools above.
87+
88+
## How it works
89+
90+
The plugin hooks into OpenCode's `tool.execute.after` and `file.edited` events to detect coding activity. It sends a heartbeat to DevGlobe at most once per minute via devglobe-core. It automatically detects:
91+
92+
- The programming language from the files you interact with (exact file paths from tool calls)
93+
- Your git repository (from `git remote get-url origin`)
94+
- Your approximate location (via IP geolocation, cached for 1 hour)
95+
96+
Your coding session then appears live on the [DevGlobe map](https://devglobe.xyz) with the editor shown as `opencode`.
97+
98+
A forced heartbeat is sent when the session goes idle or is deleted, ensuring your last activity is always recorded.
99+
100+
## Updating
101+
102+
Since the plugin is installed from npm, OpenCode fetches the latest version automatically. To force an update, remove the cache:
103+
104+
```bash
105+
rm -rf ~/.cache/opencode/node_modules/opencode-devglobe
106+
```
107+
108+
Then restart OpenCode.
109+
110+
## GitHub App — Verified commit stats
111+
112+
Commit statistics displayed on DevGlobe (insertions/deletions per week) are **never collected by this plugin**. They are fetched server-side via a [GitHub App](https://github.com/apps/devglobeapp) that requests only **Metadata: Read-only** — the most minimal permission available. No access to source code, file contents, commit messages, issues, or pull requests.
113+
114+
See the [main extensions README](../README.md#-github-app--verified-commit-stats) for details.
115+
116+
## Privacy
117+
118+
| Data | Sent | Detail |
119+
|------|------|--------|
120+
| Programming language | Yes | Detected from file extensions of files being edited. |
121+
| Approximate location | Yes | Coordinates **snapped to your city center** (from a database of 152,000+ cities). |
122+
| Repo name | **You decide** | `owner/repo` is **only sent to the server if `shareRepo` is enabled** (disabled by default). When disabled, your repo name never leaves your machine. |
123+
| Anonymous mode | **You decide** | When enabled, real coordinates are replaced with a random city in your country (from a database of 152,000+ cities worldwide). Your actual location is never transmitted. |
124+
| Coding time | Yes | Accumulated per day, per language. |
125+
126+
The plugin **never** reads your source code, file contents, file names, keystrokes, commit messages, environment variables, or credentials.
127+
128+
## Support
129+
130+
- Website: [devglobe.xyz](https://devglobe.xyz)
131+
- Contact: [contact@devglobe.xyz](mailto:contact@devglobe.xyz)
132+
- Issues: [GitHub Issues](https://github.com/Nako0/devglobe-extension/issues)

0 commit comments

Comments
 (0)