Skip to content
DiveshK007Public

About

A pet in your MacBook notch that earns its own AI on NEAR while your coding agent works

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

297 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gremlo. Your agent makes you wait. Gremlo makes the wait pay.

A tiny pet that lives behind your MacBook notch, reacts to Claude Code, and earns from one sponsored line while your agent works.

Try it · How it works · The full walkthrough · Proof · What's real · Run from source

Live now, no Mac needed: web app · judge tour · live numbers · park · a live campaign · API health

macOS 13+ Works with Claude Code NEAR testnet World ID MIT license

Watch the explainer (1:30)

Judging? Two minutes, no Mac, no wallet, no keys.

  1. Take the guided tour: the pet, the money loop and live testnet numbers.
  2. Check the API yourself: curl https://16-4-100-95.sslip.io/stats returns campaigns, settled views, NEAR paid and NEAR charged for AI. A share of each payment (20% now) is credited to the pet's AI budget; "charged" is the part it has spent so far, so it is at most 20% of paid.
  3. Open any "charged on chain" link on /live. Each is a charge_compute call on vault.gremlo.testnet carrying the NEAR AI completion id.
  4. Every transaction from the final run is linked in PROOF.md, and the vault's code hash matches a cargo near build of contracts-near (Rust 1.95, pinned in rust-toolchain.toml).

Gremlo was built for the NEAR Hackathon (Nov 2026) and is now in active development as a product. The submission snapshot is the hackathon-submission tag.

What it does

The pet reporting from the notch
It lives in the notch.
It drops out when Claude Code starts working, knocks when the agent needs your approval, and celebrates when the run is done.
A brand funding a campaign
It holds one sponsored line.
A brand writes a line of 6 to 40 characters and pays into a vault from its own wallet. The line shows only while your agent works, labelled AD.
The pet's earnings in the menu bar
It keeps its own books.
Each verified view is settled onchain. Most goes to you; a share goes into the pet's compute budget, which its AI calls are charged against.

All three clips are real screen recordings from the final run on 15 Nov 2026.

Try it in two minutes

You need a Mac on macOS 13 or later and the Xcode Command Line Tools (xcode-select --install).

curl -fsSL https://raw.githubusercontent.com/DiveshK007/GREMLO/main/install.sh | bash

That builds Gremlo from source on your Mac (a few minutes the first time), puts it in ~/Applications/Gremlo.app and starts it. Then:

  1. Click the Gremlo icon in the menu bar.
  2. Open Settings → General → Claude Code → Connect.
  3. Start a Claude Code run and watch the notch.

Run the same line again to update. To quit, use the bottom of the menu bar panel.

Hosted server: https://16-4-100-95.sslip.io (NEAR testnet). Point the app at it with GREMLO_SERVER=https://16-4-100-95.sslip.io GREMLO_WEB=https://gremlo.vercel.app (for an app opened from Finder, use launchctl setenv). Without it the app talks to http://localhost:8787, so you can also run the full loop yourself.

Why build from source, and what about a download?

There is no Apple Developer account behind Gremlo yet, so the app isn't notarized. Built on your own Mac, macOS opens it without a warning. A .dmg will appear under Releases when the first v* tag is pushed; it will be ad hoc signed, so you'll need System Settings → Privacy & Security → Open Anyway the first time, or xattr -dr com.apple.quarantine /Applications/Gremlo.app.

How it works

Architecture: Claude Code hooks, the Mac app, the server, NEAR AI Cloud, World ID and the vault on NEAR testnet

One view, start to finish: brand, sign, proof, settle, budget, think

  1. Get a pet. On /pet you connect a NEAR wallet and prove you are a person with World ID. The server checks the proof and registers the pet in the vault with your payout account.
  2. A brand funds a campaign. On /brand the brand writes up to four lines (or picks from hooks NEAR AI writes, each with its completion id) and pays into the vault from its own wallet.
  3. The pet holds the line while your agent works. Each view is a report signed by your Mac's Secure Enclave and appended to the campaign's public log.
  4. Settlement feeds the pet. The server settles views in the vault. Most goes to the payout account; a share goes into the pet's compute budget. Each NEAR AI call is charged a fixed per-tier rate against that budget, with the TEE-signed completion id in the log. The pet's mood follows the real budget: thriving, stable, hungry, or asleep.

What counts as a view

Two real entries from the campaign log: shown for 5340 ms, unlocked, visible, signed, and hash-chained

A view counts only when all of these hold:

  • the sign was on screen for 5 seconds;
  • the screen was unlocked, not shared and not recorded;
  • someone used the Mac in the last 5 minutes;
  • the Mac is paired to the pet (one wallet signature on /pair);
  • at most 12 lines an hour.

A log entry holds the campaign, which line was shown, for how long, the visible and unlocked flags, idle seconds, the pet key and the signature. gremlo verify <campaign> replays the log against the bill.

Where the money goes

One view paid 0.003 NEAR: 0.0024 to the owner and 0.0006 to the compute budget

In the final run each view paid 0.003 NEAR: 0.0024 to the owner's payout account and 0.0006 (the 20% compute share) into the pet's budget. A smart-model call cost 0.0005 and a cheap one 0.0001, which took the budget back to zero.

The full walkthrough

Watch the full walkthrough (4:40)

4:40. One view from start to finish: the brand's campaign, the signed view, settlement on NEAR testnet, the compute budget, and the ten transactions from the final run.

Proof

The final run: ten transactions on NEAR testnet and the compute budget they moved

The final run on vault.gremlo.testnet, 15 Nov 2026. Every hash was checked on testnet RPC: each ended in SuccessValue.

# What happened Call Tx
1 Pet registered after the World ID check register_pet 5xuUysyi…fWho
2 Pet verified set_verified 6EAhsDt7…zu9X
3 Brand funds campaign 1 with 0.1 NEAR create_campaign 214EyrLM…ugn7
4 View 1 settled: 0.0024 NEAR paid, +0.0006 to the budget settle_impressions FFdmieVQ…QUQB
5 Smart-model call charged: 0.0005 NEAR charge_compute E1vh3VKe…MH1d
6 Cheap-model call charged: 0.0001 NEAR charge_compute GHMAHr4a…rBzq
7 Brand tops up campaign 1 top_up Akz9UDRZ…tNcr
8 View 2 settled: 0.0024 NEAR paid, +0.0006 to the budget settle_impressions CNvNmMvB…a95M
9 Smart-model call charged: 0.0005 NEAR charge_compute 8gDVVjKk…1V9Z
10 Cheap-model call charged: 0.0001 NEAR charge_compute J6a5MxUP…U5cg

npm run verify chatcmpl-cc26d4e5-abf1-4837-b10f-7543f37ce156 returns SIGNED: the signature recovers to 0xfe0071895500a9755c18044948ab4f4e1a7f337e, an attested key of the NEAR TEE that served the call.

npm run verify returns SIGNED

Accounts, the deploy transaction, the vault state after the run and the earlier dry run are in PROOF.md.

What's real

Status Detail
Vault on NEAR testnet Live vault.gremlo.testnet, operator operator.gremlo.testnet; the code hash matches a local build of contracts-near
The full loop Live on testnet register, verify, fund, two views settled, four NEAR AI calls charged, each with its completion id
TEE-signed inference Live one completion verified with npm run verify
World ID Simulator the final run used the World ID simulator, not a real Orb or app proof
iPhone and Watch apps Simulator only apps/ios builds and launches in the simulators; signing and TestFlight need an Apple Developer account
The pet's own purse Built, not deployed factory and purse contracts in contracts-accounts (14 tests); pets use the vault's compute budget for now
Hosted server and website Live gremlo.vercel.app on Vercel, API on AWS EC2 behind HTTPS (/health)
Signed Mac download Not yet build from source with the install line
Mainnet Not yet nothing is on mainnet

Known limits:

  • AI calls are charged at a fixed per-tier rate in NEAR, not the real USD bill, and the operator holds the NEAR AI credits. The pet can't buy credits directly yet.
  • The platform fee isn't published.
  • A system Focus can't be read without an Apple entitlement, and browser screen sharing isn't detected (mic and Zoom or system recording are).
  • Community species can't be installed from the gallery yet.
  • The notch app is macOS only. The server, web app, brain and contracts build and test on Linux and macOS; on Windows use WSL2.
  • The vault account still has a full-access key held by the deployer (testnet). The mainnet plan is to lock it after deploy.

Run the full loop from source

Needs macOS 13+ with Swift 5.9+ for the Mac app, Node 22+, and Rust 1.95 (pinned in rust-toolchain.toml) plus cargo-near 0.22 for the contracts. Everything except the Mac app also builds on Linux; the commands below are bash.

git clone https://github.com/DiveshK007/GREMLO.git && cd GREMLO

cp apps/server/.env.example apps/server/.env    # NEAR operator account and key, vault id, NEAR AI key, World app id
cp apps/web/.env.example apps/web/.env          # server URL, vault id, World app id

(cd apps/server && npm ci && npm start)         # :8787
(cd apps/web && npm ci && npm run dev)          # :3000
(cd apps/mac && swift run Gremlo)               # then menu bar → Settings → General → Claude Code → Connect

Then open http://localhost:3000/pet to get a pet, /pair to pair this Mac, and /brand to fund a campaign. Every env var name is listed in HANDOFF.md.

Build and test everything (no keys needed)
(cd apps/mac && swift build && swift test)                                   # Mac app + GremloCore: 114 tests
(cd apps/server && npm ci && npm test)                                       # 79 tests
(cd packages/brain && npm test)                                              # 16 tests
(cd apps/web && npm ci && npm run typecheck && npm run build && npm test)    # 4 tests
(cd contracts-near && cargo test)                                            # vault: 3 unit + 18 integration tests
(cd contracts-accounts && cargo test)                                        # factory and purse: 14 tests
Deploy the vault yourself

Build with cargo near build non-reproducible-wasm in contracts-near, then deploy with the near CLI. Steps are in docs/DEPLOY.md.

Repo map

Part Where
Mac app: eight species, the sign, Notch Live and approvals, growth and the Closet, bug hunt, git moods, room, focus, privacy rules, stream mode apps/mac (rules and tests in GremloCore)
gremlo CLI, gremlo:// links apps/mac/Sources/GremloCLI
Server: campaigns, signed views with a public log, settlement, park, gallery apps/server
NEAR AI calls, mood to model, claim checks packages/brain
Web: the site and the app pages apps/web
iPhone and Watch (simulator only) apps/ios
VS Code and Cursor extension, Raycast extension apps/vscode, apps/raycast
Vault (campaigns, compute budget) contracts-near
Factory and purse (not deployed) contracts-accounts

Prior art and history

sk-ruban/notchi is an open-source notch companion for Claude Code. Gremlo differs by its sponsored-view economy, onchain settlement and the compute budget its AI calls are charged against.

Gremlo started at ETHGlobal Mumbai 2026 as Notchi, on a different stack. That build lives on the ethglobal-0g branch and is described in docs/HISTORY.md; nothing there describes main.

Team

Built by @DiveshK007.

License

MIT.

AI usage: docs/AI_USAGE.md.

About

A pet in your MacBook notch that earns its own AI on NEAR while your coding agent works

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages