@hivemynd/node
v0.1.0
Published
HiveMind Node - Local AI gateway with multi-provider auth
Downloads
14
Readme
HiveMind Node
Local AI gateway with multi-provider authentication.
Installation
npm install -g @hivemind/nodeOr link locally during development:
cd packages/hivemind-node
npm linkQuick Start
# Interactive setup (recommended)
hivemind setupThis walks you through:
- Select providers — Anthropic, OpenAI, DeepSeek, Google, Ollama
- Authenticate — API key or browser session
- See models — Shows available models per provider
- Set default — Pick your primary provider
- Connect — Optionally link to HiveMind server
Commands
# Setup & Status
hivemind setup # Interactive setup wizard
hivemind status # Show configured providers
# Models
hivemind models # List available models
hivemind models -p anthropic # Filter by provider
# Chat
hivemind chat "Hello" # Quick chat with default provider
hivemind chat -p openai "Hi" # Use specific provider
hivemind chat -m gpt-4o "Hi" # Use specific model
# Provider Management
hivemind auth add <provider> # Add a provider
hivemind auth list # List providers
hivemind auth remove <provider> # Remove a provider
hivemind default <provider> # Set default provider
# HiveMind Connection
hivemind connect <url> # Connect to HiveMind serverAuthentication Methods
API Key
Direct API access. Pay per token.
hivemind auth add anthropic
# Then enter your API key when promptedOr with the key directly:
hivemind auth add anthropic -k sk-ant-xxxBrowser Session (Subscription)
Use your existing Claude Max ($20/mo) or ChatGPT Plus subscription.
During hivemind setup, choose "Browser Session" and paste your session cookie from DevTools:
- Go to claude.ai (logged in)
- DevTools → Application → Cookies
- Copy
sessionKeyvalue
Environment Variables
The CLI auto-detects these:
export ANTHROPIC_API_KEY=sk-ant-xxx
export OPENAI_API_KEY=sk-xxx
export DEEPSEEK_API_KEY=sk-xxxSupported Providers
| Provider | Models | Auth Methods | |----------|--------|--------------| | Anthropic | claude-opus-4, claude-sonnet-4, claude-3.5-* | API Key, Session | | OpenAI | gpt-4o, gpt-4-turbo, o1-* | API Key, Session | | DeepSeek | deepseek-chat, deepseek-coder | API Key | | Google | gemini-2.0-flash, gemini-1.5-pro | API Key | | Ollama | llama3, mistral, codellama | Local (no auth) |
How It Works
- Encrypted Storage — Credentials in
~/.hivemind/auth.enc(AES-256-GCM) - Auto-Detection — Checks env vars and existing sessions
- Health Checks — Validates credentials before use
- HiveMind Integration — Reports capabilities for routing
HiveMind Connection
When connected to a HiveMind server, your node becomes an execution endpoint:
hivemind connect https://your-hivemind.vercel.appThe server can route LLM requests to your node based on:
- Which providers you have configured
- Which models you have access to
- Your node's availability
Credentials stay local — only capability info is shared with the server.
Development
cd packages/hivemind-node
npm install
npm run build
npm link
# Test
hivemind statusLicense
MIT
