nowai-cli
v1.0.0
Published
Your AI doesn't know what time it is. Fix it in one command. Zero-dependency CLI + daemon for fully automatic time awareness in every AI tool.
Maintainers
Readme
https://github.com/user-attachments/assets/00000000-0000-0000-0000-000000000000
The Problem
Every time you ask an AI "what's today's date?" or "summarize this week's news," it has no idea what "today" or "this week" means. LLMs don't have a clock. They don't know it's Monday.
Without nowai:
You: "What's the weather today?"
AI: "I don't have access to real-time information..."With nowai:
<span style="color:#667eea"><context time="2026-07-06T14:30:00+03:00">
Current date: Monday, July 6, 2026
Current time: 14:30 EAT (UTC+03:00)
</context></span>
You: "What's the weather today?"
AI: "Today is Monday, July 6, 2026. Let me help you with the weather..."nowai gives every AI tool temporal awareness — automatically, in the background, with zero effort.
Quick Install
# One command — works everywhere, zero dependencies
npx nowai-cliThat's it. You don't even need to install anything — npx runs it directly from npm.
Output:
Today is Monday, July 6, 2026. The current time is 14:30 EAT (UTC+03:00). It is Q3 2026 (week 28, day 187).Usage
CLI — Manual injection
# Print time context for pasting into any AI prompt
npx nowai-cli --prompt
# Get JSON for scripting
npx nowai-cli --json
# Pipe into any AI CLI tool
echo "Summarize this week's key events" | npx nowai-cli --prompt | llmDaemon — Fully automatic background service
# Start the background daemon
npx nowai-cli daemon start
# Auto-start on boot (macOS/Linux/Windows)
npx nowai-cli daemon install
# Check status
npx nowai-cli daemon status
# HTTP API available at http://localhost:5789
curl http://localhost:5789/now
curl http://localhost:5789/promptThe daemon runs a tiny HTTP server on localhost:5789 and keeps ~/.nowai/state.json updated every second. Other tools can query it instantly.
Ollama — Auto-inject time into every request
# Sets up a proxy that injects time into every Ollama request
npx nowai-cli install ollama
# Then just set:
export OLLAMA_HOST=http://127.0.0.1:11435
# Every Ollama request now includes current time context automatically
ollama run llama3 "What's the current quarter?"
# → "We are in Q3 2026"Claude CLI — Wrapper script
# Creates a transparent wrapper that prepends time context
npx nowai-cli install claude
# Now every Claude CLI session knows the current time
claude "What timezone am I in?"OpenAI SDK — Middleware generation
# Generates Python and Node.js middleware files
npx nowai-cli install openai
# Python:
from nowai_openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "What day is it?"}]
)
# Node.js:
const OpenAI = require('./.nowai/openai-middleware');
const client = new OpenAI();Browser Extension — Chrome/Edge/Firefox
Adds time context to ChatGPT, Claude.ai, and Perplexity automatically. Every message you send includes the current date and time.
- Install from the Chrome Web Store (coming soon)
- Load unpacked: open
chrome://extensions→ Load unpacked → selectbrowser-extension/ - Toggle on/off with one click
VSCode Extension — Cursor + Copilot + Claude Dev
Shows a status bar indicator with the current time. Automatically injects time context into AI assistant conversations.
Install from the VS Code Marketplace (coming soon) or load from vscode-extension/ directory.
How It Works
┌────────────┐ ┌──────────────────────┐ ┌─────────────┐
│ CLI │───▶│ nowai core │───▶│ stdout │
│ npx nowai-cli │ │ │ │ JSON/text │
└────────────┘ │ getCurrentTime() │ └─────────────┘
│ formatTime() │
┌────────────┐ │ │ ┌─────────────┐
│ Daemon │───▶│ HTTP :5789 │───▶│ Plugins │
│ background│ │ state file │ │ Ollama │
└────────────┘ │ WebSocket │ │ Claude │
│ │ │ OpenAI │
┌────────────┐ │ │ └─────────────┘
│ Browser │───▶│ Content script │
│ extension │ │ DOM injection │
└────────────┘ └──────────────────────┘Zero dependencies. nowai uses only Node.js built-in modules (http, fs, path, os, child_process). No npm install needed beyond the package itself.
Why nowai?
| Problem | Solution | |---------|----------| | "What's today's date?" — AI guesses wrong | Precisely formatted temporal context | | "Summarize this week" — AI has no reference | Week number + date range available | | Timezone confusion | Automatic timezone detection with UTC offset | | DST ambiguity | DST-aware calculation | | Setup complexity | Zero config — one command, no dependencies | | Mac vs Linux vs Windows | Cross-platform daemon (launchd, systemd, schtasks) |
Commands
| Command | Description |
|---------|-------------|
| npx nowai-cli-cli | Print current date/time |
| npx nowai-cli --prompt | Print time as prompt context block |
| npx nowai-cli --json | Print time as JSON |
| npx nowai-cli daemon start | Start background daemon |
| npx nowai-cli daemon stop | Stop background daemon |
| npx nowai-cli daemon status | Check daemon status |
| npx nowai-cli daemon install | Auto-start daemon on boot |
| npx nowai-cli daemon uninstall | Remove auto-start |
| npx nowai-cli install ollama | Ollama proxy for auto-injection |
| npx nowai-cli install claude | Claude CLI wrapper |
| npx nowai-cli install openai | Generate OpenAI middleware |
| npx nowai-cli --help | Show help |
Platform Support
| Feature | macOS | Linux | Windows | |---------|-------|-------|---------| | CLI | ✅ | ✅ | ✅ | | Daemon (background) | ✅ launchd | ✅ systemd | ✅ Task Scheduler | | Ollama plugin | ✅ | ✅ | ✅ | | Claude plugin | ✅ | ✅ | ✅ | | OpenAI middleware | ✅ | ✅ | ✅ | | Browser extension | ✅ Chrome/Firefox | ✅ Chrome/Firefox | ✅ Chrome/Edge | | VSCode extension | ✅ | ✅ | ✅ |
Roadmap
- [ ] Claude AI plugin — direct Claude API integration
- [ ] ChatGPT plugin — direct OpenAI integration
- [ ] Obsidian plugin — time-aware notes
- [ ] Homebrew formula —
brew install nowai - [ ] Docker image —
docker run nowai - [ ] GUI app — system tray app with config
- [ ] Natural language — "Tell the AI it's 3pm on a rainy Tuesday"
Why We Built This
Every week, someone posts a screenshot of an AI confidently stating the wrong date. It's funny, but it's also a real limitation. As AI tools become part of our daily workflow, they need context — and time is the most fundamental context of all.
nowai is our attempt to solve this problem once, for every AI tool, on every platform.
If this project helps you, please ⭐ star it on GitHub. It helps others find it.
License
MIT
