hindsight-ai
v1.6.0
Published
CLI and SDK for the Hindsight platform — Discord log archive and AI agent
Readme
Hindsight
CLI and TypeScript SDK for the Hindsight platform — archive and search Discord message history.
Access your Discord server logs via CLI, REST API, or programmatic SDK. Generate NotebookLM notebooks from channel history.
Full documentation: https://136-119-5-93.sslip.io/docs
Quick Start
# Authenticate (opens browser)
npx -y hindsight-ai auth login --server https://136-119-5-93.sslip.io
# List your bots
npx -y hindsight-ai bots list
# List channels
npx -y hindsight-ai channels list --bot <bot-id>
# Get logs
npx -y hindsight-ai logs get --bot <bot-id> --channel general
# Search
npx -y hindsight-ai search "keyword" --bot <bot-id>Or install globally and use hindsight directly:
npm install -g hindsight-ai
hindsight bots listCLI Commands
| Command | Description |
|---------|-------------|
| hindsight auth login --server <url> | Log in via OAuth (opens browser) |
| hindsight auth status | Show current auth status |
| hindsight auth logout | Remove stored tokens |
| hindsight bots list | List accessible bots |
| hindsight channels list --bot <id> | List channels for a bot |
| hindsight logs get --bot <id> --channel <name> | Get channel logs |
| hindsight search "<query>" --bot <id> | Search across channels |
| hindsight summaries list --bot <id> | List summaries grouped by date |
| hindsight summaries get --bot <id> --type daily --channel <name> --date <date> | Get a specific summary |
| hindsight notebooklm create --bot <id> --from <date> --to <date> | Create NotebookLM notebook |
SDK
import { HindsightClient } from 'hindsight-ai';
// Uses tokens from ~/.config/hindsight/tokens.json (after CLI login)
const client = new HindsightClient();
// List bots
const { owned, shared } = await client.listBots();
// Get logs
const result = await client.getLogs(botId, 'general', {
from: '2026-01-01',
to: '2026-06-01',
page: 1,
pageSize: 100,
});
// Search
const search = await client.search(botId, 'keyword');
// Summaries
const summaries = await client.listSummaries(botId, { type: 'daily' });
// Create NotebookLM notebook
const { jobId } = await client.createNotebook(botId, '2026-05-01', '2026-05-07');Direct token initialization
const client = new HindsightClient({
accessToken: '...',
refreshToken: '...',
expiresAt: Date.now() + 3600000,
scope: 'read:logs read:bots',
serverUrl: 'https://136-119-5-93.sslip.io',
clientId: 'your-client-id',
});REST API
All endpoints require a Bearer token. Base URL: https://136-119-5-93.sslip.io/api/v1
| Method | Endpoint | Scope | Description |
|--------|----------|-------|-------------|
| GET | /bots | read:bots | List accessible bots |
| GET | /bots/:botId | read:bots | Get bot details |
| GET | /bots/:botId/servers | read:bots | List servers |
| GET | /bots/:botId/channels | read:logs | List channels |
| GET | /bots/:botId/logs/:channel | read:logs | Get channel logs |
| GET | /bots/:botId/search?q=term | read:logs | Search logs |
| GET | /bots/:botId/summaries | read:logs | Bulk summaries with content |
| GET | /bots/:botId/summaries/:type/:channel/:date | read:logs | Get specific summary |
| POST | /bots/:botId/notebooklm | read:logs | Create NotebookLM notebook |
| GET | /bots/:botId/notebooklm/jobs/:jobId | read:logs | Check notebook job status |
| GET | /bots/:botId/notebooklm/audio/:notebookId | read:logs | Check audio status |
For AI Agents
Point your agent to the SKILL.md:
https://136-119-5-93.sslip.io/docs/SKILL.mdThe agent will install the CLI, authenticate, and save itself as a local skill automatically.
TypeScript Types
import type {
Bot, Channel, LogMessage, LogResult,
SearchMessage, SearchResult, ServerConfig, TokenSet,
SummaryContent, SummaryChannelContent, SummaryDateGroup,
SummaryPagination, SummariesBulkResult,
NotebookCreateResult, NotebookJob, NotebookAudioStatus,
} from 'hindsight-ai';License
MIT
