npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ai-assistant-auth

v1.0.0

Published

CLI authentication tool for AI Assistant Deployment Hub with Ollama Cloud integration

Readme

AI Assistant Authentication CLI

A powerful CLI tool for authenticating with Ollama Cloud and managing AI Assistant configurations. This tool replaces Google Cloud authentication with Ollama Cloud authentication, allowing you to use your self-hosted Ollama agent as a Google-search replacement.

Features

  • 🔐 Ollama Cloud OAuth Authentication - Secure browser-based authentication flow
  • ⚙️ Configuration Management - Easy setup and management of AI assistant settings
  • 🌐 Self-hosted Integration - Connect to your Ollama instance running on OCI
  • 📋 Status Monitoring - Check authentication and configuration status
  • 🛠️ Global CLI Access - Install globally and use with npx ai-assistant-auth

Installation

Global Installation (Recommended)

npm install -g ai-assistant-auth

Local Installation

npm install ai-assistant-auth

Usage

Initialize Configuration

ai-auth init

Sets up the initial configuration file at ~/.ai-assistant/config.json

Authenticate with Ollama Cloud

ai-auth auth

Opens your browser to authenticate with Ollama Cloud and obtain your API key.

Check Status

ai-auth status

Displays current authentication status and configuration details.

Manage Configuration

# List all configuration settings
ai-auth config --list

# Get a specific configuration value
ai-auth config --get "assistant.defaultModel"

# Set a configuration value
ai-auth config --set "assistant.defaultModel=llama3.2"

Using Your Authenticated Ollama API

After authentication, you can use your OLLAMA_API_KEY with the Ollama client:

Node.js Example

import { Ollama } from "ollama";

const ollama = new Ollama({
  host: "https://ollama.com",
  headers: {
    Authorization: "Bearer " + process.env.OLLAMA_API_KEY,
  },
});

const response = await ollama.chat({
  model: "llama3.2",
  messages: [{ role: "user", content: "Explain quantum computing" }],
  stream: true,
});

for await (const part of response) {
  process.stdout.write(part.message.content);
}

Python Example

import os
from ollama import Client

client = Client(
    host="https://ollama.com",
    headers={'Authorization': 'Bearer ' + os.environ.get('OLLAMA_API_KEY')}
)

messages = [
  {
    'role': 'user',
    'content': 'Why is the sky blue?',
  },
]

for part in client.chat('llama3.2', messages=messages, stream=True):
  print(part['message']['content'], end='', flush=True)

Environment Variables

After authentication, set your OLLAMA_API_KEY:

export OLLAMA_API_KEY="your-api-key-from-authentication"

Commands

| Command | Description | |---------|-------------| | ai-auth auth | Authenticate with Ollama Cloud | | ai-auth init | Initialize configuration | | ai-auth status | Check authentication status | | ai-auth config --list | List all configuration | | ai-auth config --get <key> | Get configuration value | | ai-auth config --set <key=value> | Set configuration value |

Configuration File

The tool creates a configuration file at ~/.ai-assistant/config.json with default settings:

{
  "ollama": {
    "baseUrl": "http://localhost:11434",
    "cloudEnabled": true
  },
  "assistant": {
    "defaultModel": "llama3.1",
    "temperature": 0.7,
    "maxTokens": 2048
  },
  "features": {
    "chat": true,
    "fileUpload": true,
    "camera": true
  }
}

Development

Building from Source

npm run build

Running Development Version

npm run dev

Testing CLI

node dist/cli.js --help

Publishing to npm

To publish updates:

npm login
npm publish

License

MIT

Author

AI Assistant Deployment Hub