New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

anouk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anouk

A framework for creating AI-powered browser extensions with support for any OpenAI-compatible provider

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Anouk - AI Browser Extension Framework

Overview

Anouk is a framework for creating browser extensions with AI capabilities. It provides a flexible foundation for developers to build extensions that work with any OpenAI-compatible provider, including OpenAI, Together.xyz, Anthropic, and local models like Ollama.

The framework includes the Gmail Assistant as a reference implementation showing how to build a powerful email productivity tool.

Features

  • Multi-Provider Support: Works with any OpenAI-compatible API provider
  • Configurable UI Components: Reusable sidebar, floating buttons, and settings panels
  • Caching System: Built-in caching to reduce API calls
  • Rate Limiting: Queue management for API calls
  • Easy Configuration: In-extension settings panel for runtime configuration
  • Modular Design: Extensible architecture for custom functionality
  • CLI Tool: Command-line interface for generating projects and templates

Installation

  • Clone this repository:

    git clone https://github.com/yourusername/anouk.git
    cd anouk
    
  • Install dependencies:

    npm install
    
  • Build the extension:

    npm run build
    
  • Load the extension in Chrome:

    • Open Chrome and navigate to chrome://extensions
    • Enable "Developer mode" in the top right corner
    • Click "Load unpacked" and select the project directory

CLI Usage

Anouk provides a command-line interface for generating projects and templates:

anouk <command> [options]

Commands:
  init <project-name>        Initialize a new Anouk project
  generate <template> <name> Generate a template file
  help                       Show help message

Templates:
  extension                  Generate a basic extension template
  service                    Generate an AI service template
  config                     Generate a configuration template

Examples:
  anouk init my-extension
  anouk generate extension email-analyzer
  anouk generate service custom-ai-service

Configuration

The extension now supports any OpenAI-compatible provider. You can configure the AI service through the settings panel in the extension UI or programmatically.

Using the Settings Panel

  • Click the green settings button in the bottom-right corner of Gmail
  • Enter your provider URL, API key, model name, and system prompt
  • Click "Save Settings"

Programmatic Configuration

You can also configure the AI service programmatically by modifying the src/aiConfig.js file or by passing configuration to the AIService constructor.

Supported Providers

The extension has predefined configurations for:

  • Together.xyz (default)
  • OpenAI
  • Anthropic Claude
  • Ollama (local models)
  • Hugging Face

Example configuration for OpenAI:

{
    providerUrl: 'https://api.openai.com/v1/chat/completions',
    apiKey: 'your-openai-api-key',
    model: 'gpt-4',
    systemPrompt: 'You are a helpful assistant that analyzes emails.'
}

Usage as a Library

Developers can use this project as a library to create their own AI-powered browser extensions:

import { AIService } from 'anouk';

// Create an AI service instance
const aiService = new AIService({
    providerUrl: 'https://api.openai.com/v1/chat/completions',
    apiKey: 'your-api-key',
    model: 'gpt-4'
});

// Make AI calls
const response = await aiService.call(
    'Summarize this text:', 
    'Your content here', 
    'unique-id', 
    'cache-key'
);

Development

  • Run the development build with watch mode:
    npm run dev
    
  • The extension will automatically rebuild when you make changes to the source files.

Project Structure

  • src/: Source files
    • aiService.js: Configurable AI service for any OpenAI-compatible provider
    • configManager.js: Configuration management
    • settingsPanel.js: UI component for in-extension settings
    • extension.js: Main extension logic (Gmail Assistant reference implementation)
    • api.js: API interaction and caching logic
    • gmailJsLoader.js: Gmail.js initialization
  • dist/: Built files (generated after running npm run build)
  • manifest.json: Chrome extension manifest file
  • bin/: CLI tools
  • templates/: Template files for CLI

Dependencies

  • gmail.js: Library for interacting with Gmail
  • esbuild: Fast JavaScript bundler

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This extension is not affiliated with or endorsed by Google. Use at your own risk and ensure compliance with Gmail's terms of service.

Installation

  • Clone this repository:

    git clone https://github.com/yourusername/gmail-assistant.git
    cd gmail-assistant
    
  • Install dependencies:

    npm install
    
  • Build the extension:

    npm run build
    
  • Load the extension in Chrome:

    • Open Chrome and navigate to chrome://extensions
    • Enable "Developer mode" in the top right corner
    • Click "Load unpacked" and select the dist directory in the project folder

Configuration

The extension now supports any OpenAI-compatible provider. You can configure the AI service through the settings panel in the extension UI or programmatically.

Using the Settings Panel

  • Click the green settings button in the bottom-right corner of Gmail
  • Enter your provider URL, API key, model name, and system prompt
  • Click "Save Settings"

Programmatic Configuration

You can also configure the AI service programmatically by modifying the src/aiConfig.js file or by passing configuration to the AIService constructor.

Supported Providers

The extension has predefined configurations for:

  • Together.xyz (default)
  • OpenAI
  • Anthropic Claude
  • Ollama (local models)
  • Hugging Face

Example configuration for OpenAI:

{
    providerUrl: 'https://api.openai.com/v1/chat/completions',
    apiKey: 'your-openai-api-key',
    model: 'gpt-4',
    systemPrompt: 'You are a helpful assistant that analyzes emails.'
}

Usage

  • Open Gmail in Chrome.
  • The Gmail Assistant sidebar will appear on the right side of the screen.
  • As you view emails, the assistant will automatically analyze them and provide summaries, structured data, and potential replies.
  • Use the "Send Automatic Reply" button to trigger automatic replies based on predefined rules.

Development

  • Run the development build with watch mode:
    npm run dev
    
  • The extension will automatically rebuild when you make changes to the source files.

Project Structure

  • src/: Source files
    • extension.js: Main extension logic
    • api.js: API interaction and caching logic
    • gmailJsLoader.js: Gmail.js initialization
  • dist/: Built files (generated after running npm run build)
  • manifest.json: Chrome extension manifest file

Dependencies

  • gmail.js: Library for interacting with Gmail
  • sqlite3: SQLite database for caching
  • esbuild: Fast JavaScript bundler

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This extension is not affiliated with or endorsed by Google. Use at your own risk and ensure compliance with Gmail's terms of service.

Keywords

ai

FAQs

Package last updated on 22 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts