Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notif

A CLI tool that sends stdin content to Pushover notifications with optional AI-powered formatting via LM Studio.

Features

  • Pipe any command output to Pushover
  • Multi-app support with AI-based app selection
  • AI-powered message formatting and summarization
  • Process context awareness (AI sees what command produced the output)
  • Interactive configuration wizard
  • Transparent output (echoes stdin by default)

Installation

From Source

git clone https://github.com/agusx1211/notif.git
cd notif
./install.sh

The install script tries ~/.local/bin first, then /usr/local/bin.

Manual

go build -o notif ./src
install notif ~/.local/bin/  # or /usr/local/bin/

Or use the Makefile:

make build    # Build binary
make install  # Build and install
make clean    # Remove binary

Usage

# Basic usage
echo "Hello World" | notif

# Send command output
make build 2>&1 | notif

# Use a specific app
echo "Alert!" | notif --app alerts

# Silent mode (don't echo input)
long_running_command | notif --silent

# Debug mode
echo "test" | notif --debug

Options

Flag Short Description
--app <name> -a Use a specific Pushover app
--silent -s Don't echo input to stdout
--debug -d Show detailed debug information
--help -h Show help
--version -v Show version

Configuration

notif config

The interactive wizard lets you configure:

  • Pushover user key
  • Multiple apps with descriptions (for AI selection)
  • Default app
  • Device and priority settings
  • LM Studio integration (URL, model, reasoning effort)

Environment Variables

export PUSHOVER_API_TOKEN="your_token"  # Overrides default app's API key

Configuration File

Stored at ~/.notif:

{
  "pushover": {
    "user_key": "your_user_key",
    "device": "",
    "priority": 0,
    "default_app": "default",
    "apps": [
      {
        "name": "default",
        "api_key": "your_api_key",
        "description": "General notifications"
      },
      {
        "name": "alerts",
        "api_key": "another_api_key",
        "description": "Critical alerts and errors"
      }
    ]
  },
  "lmstudio": {
    "enable": true,
    "url": "http://localhost:1234",
    "model": "your-model-name",
    "reasoning_effort": "medium"
  }
}

AI Features

When LM Studio is enabled:

Message Formatting

  • Generates concise titles summarizing content
  • Keeps messages within Pushover's 1024 character limit
  • Extracts URLs when present
  • Falls back gracefully if AI fails

App Selection

With multiple apps configured, the AI reads app descriptions and selects the most appropriate one based on content.

Process Context

The AI receives information about the parent process, so it understands what command produced the output. For example, when you run make test | notif, the AI knows the output came from make test.

Tool Limits

The AI has access to a count_characters tool to verify message lengths, limited to 2 calls per notification to ensure efficient processing.

LM Studio Setup

  1. Install LM Studio
  2. Load a model (Llama, Mistral, etc.)
  3. Start the local server
  4. Run notif config and enable LM Studio

Reasoning Effort

Controls how much "thinking" the model does:

  • low - Faster, simpler responses
  • medium - Balanced
  • high - More thorough analysis

Requirements

Uninstall

./uninstall.sh

License

MIT

About

Pipe anything to pushover notifications, with AI summaries

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages