@bitplanet/deva-genie
v0.0.3
Published
CLI bridge for Claude Code with Deva infrastructure
Keywords
Readme
Deva AI
Code on the go — control AI coding agents from your mobile device.
Free. Open source. Code anywhere.
Installation
npm install -g @bitplanet/deva-genieUsage
Claude (default)
genieThis will:
- Start a Claude Code session
- Display a QR code to connect from your mobile device
- Allow real-time session sharing between Claude Code and your mobile app
Gemini
genie geminiStart a Gemini CLI session with remote control capabilities.
First time setup:
# Authenticate with Google
genie connect geminiCommands
Main Commands
genie– Start Claude Code session (default)genie gemini– Start Gemini CLI sessiongenie codex– Start Codex mode
Utility Commands
genie auth– Manage authenticationgenie connect– Store AI vendor API keys in Deva cloudgenie notify– Send a push notification to your devicesgenie daemon– Manage background servicegenie doctor– System diagnostics & troubleshooting
Connect Subcommands
genie connect gemini # Authenticate with Google for Gemini
genie connect claude # Authenticate with Anthropic
genie connect codex # Authenticate with OpenAI
genie connect status # Show connection status for all vendorsGemini Subcommands
genie gemini # Start Gemini session
genie gemini model set <model> # Set default model
genie gemini model get # Show current model
genie gemini project set <id> # Set Google Cloud Project ID (for Workspace accounts)
genie gemini project get # Show current Google Cloud Project IDAvailable models: gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite
Options
Claude Options
-m, --model <model>- Claude model to use (default: sonnet)-p, --permission-mode <mode>- Permission mode: auto, default, or plan--claude-env KEY=VALUE- Set environment variable for Claude Code--claude-arg ARG- Pass additional argument to Claude CLI
Global Options
-h, --help- Show help-v, --version- Show version
Environment Variables
Deva Configuration
GENIE_RELAY_SERVER_URL- Custom relay server URLGENIE_CONTENT_SERVER_URL- Custom backend server URLGENIE_HOME_DIR- Custom home directory for Deva data (default: ~/.genie)GENIE_DISABLE_CAFFEINATE- Disable macOS sleep prevention (set totrue,1, oryes)GENIE_EXPERIMENTAL- Enable experimental features (set totrue,1, oryes)
Gemini Configuration
GEMINI_MODEL- Override default Gemini modelGOOGLE_CLOUD_PROJECT- Google Cloud Project ID (required for Workspace accounts)
OIDC Configuration
GENIE_OIDC_SCOPES- Custom OIDC scopes (space-separated)
Deva SSO Authentication
Deva CLI uses Deva SSO for authentication via OIDC with PKCE (Proof Key for Code Exchange).
Authentication Flow
- Run
genie authto start authentication - A browser opens to the Deva SSO login page
- After login, the authorization code is exchanged for tokens
- Tokens are stored in
~/.genie/deva_credentials.json
OAuth Flow (PKCE)
┌─────────────┐ 1. Generate code_verifier + code_challenge (S256)
│ Deva CLI │────────────────────────────────────────────────────────►
│ │
│ │ 2. Open browser: /sso/authorize?code_challenge=...
│ │────────────────────────────────────────────────────────►
│ │ ┌──────────────┐
│ │ 3. User authenticates │ Deva SSO │
│ │◄───────────────────────────────────────────────────│ │
│ │ 4. Receive authorization_code └──────────────┘
│ │
│ │ 5. POST /oidc/token (code + code_verifier)
│ │────────────────────────────────────────────────────────►
│ │ ┌──────────────┐
│ │ 6. Receive tokens (id_token, access_token, │Content Server│
│ │◄───────────────────────────────────────────────────│ │
└─────────────┘ refresh_token) └──────────────┘OIDC Scopes
Default scopes requested during authentication:
| Scope | Description |
|-------|-------------|
| OPENID | OpenID Connect authentication |
| USER:READ | Read user profile |
| PERSONA:READ | Read persona information |
| PERSONA:PUBLIC_READ | Read public persona data |
| GENIE_MACHINE:READ | Read machine information |
| GENIE_MACHINE:CREATE | Register new machines |
| GENIE_MACHINE:UPDATE | Update machine status |
| GENIE_MACHINE:DELETE | Remove machines |
| GENIE_SESSION:READ | Read session data |
| GENIE_SESSION:CREATE | Create new sessions |
| GENIE_SESSION:UPDATE | Update session state |
| GENIE_SESSION:DELETE | Delete sessions |
| GENIE_SESSION_MESSAGE:READ | Read session messages |
| GENIE_SESSION_MESSAGE:CREATE | Send messages |
| GENIE_SESSION_MESSAGE:UPDATE | Update messages |
| GENIE_SESSION_MESSAGE:DELETE | Delete messages |
Token Storage
Credentials are stored in ~/.genie/deva_credentials.json:
Tokens are automatically refreshed when expired.
Gemini Authentication
Personal Google Account
Personal Gmail accounts work out of the box:
genie connect gemini
genie geminiGoogle Workspace Account
Google Workspace (organization) accounts require a Google Cloud Project:
- Create a project in Google Cloud Console
- Enable the Gemini API
- Set the project ID:
genie gemini project set your-project-idOr use environment variable:
GOOGLE_CLOUD_PROJECT=your-project-id genie geminiGuide: https://goo.gle/gemini-cli-auth-docs#workspace-gca
Contributing
Interested in contributing? See CONTRIBUTING.md for development setup and guidelines.
Requirements
- Node.js >= 20.0.0
For Claude
- Claude CLI installed & logged in (
claudecommand available in PATH)
For Gemini
- Gemini CLI installed (
npm install -g @google/gemini-cli) - Google account authenticated via
genie connect gemini
License
MIT
