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

@wirelog/wirelog-client

v6.1.1

Published

WireLog SDK - AI development skills injection, automatic session memory extraction, semantic search, zero-knowledge encryption, and security scanning

Readme

WireLog TypeScript SDK

Version: 6.0.2 Official TypeScript/Node.js SDK for WireLog AI agent activity reporting

v6.0 Features: Zero-Knowledge Encryption - End-to-end encryption with client-side key derivation ensures your code and sessions remain private, even from the server. All sensitive data encrypted before transmission.

Local-first session reporting with cloud sync, automatic semantic memory extraction, code backups, and zero-knowledge encryption.


Quick Links


Prerequisites

Before installing the SDK, ensure your system meets these requirements:

| Requirement | Version | Notes | |-------------|---------|-------| | Node.js | 18.0+ | LTS recommended | | npm | 9.0+ | Comes with Node.js 18+ | | Git | 2.0+ | For hooks integration |

Platform Support

| Platform | Status | Notes | |----------|--------|-------| | macOS 12+ | Full | Keychain credential storage | | Windows 10/11 | Full | Credential Manager storage | | Ubuntu 20.04+ | Full | libsecret required | | Other Linux | Full | May need libsecret setup |

Quick Check

node --version   # Should be 18.x or higher
npm --version    # Should be 9.x or higher

Optional Dependencies

NOT required (removed in v5.1.1):

  • jq - Hooks are now pure Node.js
  • Python - Not needed
  • bash - Works on Windows without bash

What's New in v6.0

  • Zero-Knowledge Encryption: Client-side AES-256-GCM encryption for all sensitive data
  • Hierarchical Key System: Master key → Session DEKs → Data encryption
  • PBKDF2 Key Derivation: 310,000 iterations following OWASP 2023 guidelines
  • Encrypted Session Reports: Reports encrypted before upload, decrypted only by you
  • Encrypted Code Backups: File content encrypted at rest with per-session keys
  • Password-Based Recovery: No key files to lose, derive keys from your password

Table of Contents


AI Agent Setup Guide

For AI coding agents (Cursor, Claude Code, Windsurf, etc.) - Follow these steps exactly.

Step 1: Install the CLI

npm install -g @wirelog/wirelog-client

Verify installation:

wirelog --version
# Expected: 5.0.x or higher

Step 2: Authenticate

Option A: Browser OAuth (Interactive - requires human)

wirelog init

This opens a browser for the user to authenticate. The CLI starts a temporary server on localhost:8000-8100 to receive the auth callback.

⚠️ If you get a port conflict error:

# Check what's using port 8000
lsof -i :8000

# Kill it if safe, or use Option B instead

Option B: Direct API Key (Non-interactive - for agents)

If browser auth fails or isn't possible, ask the user for their API key from https://app.wirelog.io/settings/api-keys, then:

wirelog login --api-key sk_xxxxxxxxxxxxxxxx

Or set environment variable:

export WIRELOG_API_KEY=sk_xxxxxxxxxxxxxxxx

Step 3: Verify Authentication

wirelog status

Expected output:

API Status:      ✓ Connected (https://api.wirelog.io)
User ID:         xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Subscription:    free
Skills Summary:
  Total Skills:  35+

If you see "Unauthorized" or connection errors, re-run Step 2.

Step 4: List Available Skills

wirelog skills list

This shows coding skills that can be injected based on file patterns.

Step 5: Check Activation Rules

wirelog rules list

Rules determine which skills activate for which files (e.g., **/*.ts → TypeScript skills).

Step 6: Test Skill Activation

wirelog activate src/example.ts

This shows which skills would activate for the given file(s).

Step 7: Start Auto-Injection (Optional)

wirelog watch

This monitors file changes and auto-injects relevant skills into your IDE context.


Troubleshooting

| Issue | Solution | |-------|----------| | Port 8000 in use | Use wirelog login --api-key instead of wirelog init | | Unauthorized | Re-authenticate with wirelog init --force or check API key | | No skills matched | Create rules with wirelog rules create --skill-id <id> --pattern "**/*.ts" | | Command not found | Run npm install -g @wirelog/wirelog-client again, add npm bin to PATH | | Network error | Check internet connection, API is at https://api.wirelog.io | | Hooks not firing | Check wirelog hooks status, reinstall with --force | | jq not found (legacy) | No longer needed - hooks are pure Node.js since v5.1.1 |

Windows-specific: | Issue | Solution | |-------|----------| | PATH not found | Add %APPDATA%\npm to your system PATH | | Credential issues | Use wirelog login --api-key to bypass Credential Manager |

Linux-specific: | Issue | Solution | |-------|----------| | Keychain errors | Install libsecret: apt install libsecret-1-0 | | Headless servers | Use export WIRELOG_API_KEY=sk_... |

Quick Reference

# Essential commands
wirelog init                    # Authenticate (browser)
wirelog login --api-key <key>   # Authenticate (API key)
wirelog status                  # Check connection
wirelog skills list             # List skills
wirelog rules list              # List activation rules
wirelog activate <file>         # Test activation
wirelog watch                   # Start auto-injection
wirelog --help                  # Full command list

Auto-Injection

WireLog supports automatic context injection for AI coding agents. No more manual skill activation - context is injected automatically based on your machine, agent type, and file patterns.

Install IDE Hooks

# For Cursor IDE
wirelog hooks install cursor

# For Claude Code Desktop
wirelog hooks install claude-code

# For Windsurf/Codeium
wirelog hooks install windsurf

What Gets Installed

| IDE | Files Created | How It Works | |-----|---------------|--------------| | Cursor | .cursor/rules/*.mdc | MDC rules with alwaysApply and file globs | | Claude Code | ~/.claude/hooks/*.js | Node.js hooks on prompt/stop events (v4.0+) | | Windsurf | .windsurfrules + ~/.codeium/windsurf/memories/ | Project rules + Cascade memories |

Context Rules (v3 API)

Context rules define WHO/WHEN/WHERE context injected at session start:

# List your rules
wirelog context-rules list

# Create a machine-specific rule
wirelog context-rules create "My MacBook Context" \
  --rule-type machine \
  --machine-id "my-macbook" \
  --file ./my-rules.md

# Create an agent-specific rule  
wirelog context-rules create "Cursor Guidelines" \
  --rule-type agent \
  --agent-type cursor \
  --file ./cursor-rules.md

# Inject rules for current context
wirelog context-rules inject --agent-type cursor

Session Tracking (v3 API)

Sessions are tracked automatically with the hooks. Manual control:

# Start a new session
wirelog sessions start --agent-type cursor

# Check active session
wirelog sessions active

# List recent sessions
wirelog sessions list

# End session with report
wirelog sessions end <session-id>

Daemon Mode

Run the session daemon for full background tracking:

wirelog watch --daemon

This provides:

  • ✅ Context rules injected at session start
  • ✅ File changes tracked automatically
  • ✅ Session ends on idle timeout (default: 2 hours)
  • ✅ Report auto-generated on session end

Rules vs Skills

| Concept | Purpose | When Injected | Examples | |---------|---------|---------------|----------| | Rules | Machine/agent context (WHO/WHEN/WHERE) | Session start | "Use SSH for deploys", "Follow company guidelines" | | Skills | Task-specific guidance (HOW) | File pattern match | TypeScript best practices, Go testing |


Installation

npm install -g @wirelog/wirelog-client

For programmatic use in a project:

npm install @wirelog/wirelog-client

Dependencies: Node.js 18+ required


Quick Start

Basic Usage

import { WireLogClient } from '@wirelog/wirelog-client';

const client = new WireLogClient({
  apiKey: process.env.WIRELOG_API_KEY!,
  apiUrl: 'https://api.wirelog.io',
});

// Create a session (local-first)
const session = client.createSession({
  title: 'Implement authentication',
  project: 'my-project',
  agent: 'cursor',
});

// Log activity (local updates with optional auto-sync)
client.updateSession(session.id, {
  filesModified: ['src/index.ts', 'src/utils.ts'],
  linesAdded: 125,
  linesDeleted: 34,
});

// Complete session
client.completeSession(session.id, 'Implemented user authentication');

Authentication

WireLog uses API key authentication for SDK and CLI operations. Keys are obtained via a browser OAuth flow and stored securely.

API Key vs OAuth Authentication

| Context | Authentication | Purpose | |---------|---|---| | SDK/CLI | API Key (sk_...) | Programmatic access for agents and scripts | | Web Dashboard | OAuth | User login and interactive dashboard access |

Getting Your API Key (Recommended)

Authenticate with your browser and store the API key in your OS keychain:

wirelog init

Then use it with the SDK:

const client = new WireLogClient({
  apiKey: process.env.WIRELOG_API_KEY!, // or omit to read from keychain
  apiUrl: 'https://api.wirelog.io',
});

Self-Hosted Admins (Optional)

If you run your own API, you can generate keys server-side with the gen-apikey tool in this repo (cmd/gen-apikey). For end users, prefer wirelog init.

API Key Best Practices

  • Store keys in environment variables: WIRELOG_API_KEY
  • Rotate keys regularly
  • Never commit keys to version control
  • Use .env files locally (see .env.example)

Encryption Setup

Setting Your Encryption Password

First Time Setup:

wirelog crypto set-password
# Enter password: ••••••••
# Confirm password: ••••••••
# ✓ Encryption password set successfully

Using Environment Variable:

export WIRELOG_ENCRYPTION_PASSWORD="your-secure-password"

Encrypting Session Reports

Automatic Encryption:

import { WireLogClient } from '@wirelog/wirelog-client';

const client = new WireLogClient({
  apiKey: process.env.WIRELOG_API_KEY!,
  encryptionPassword: process.env.WIRELOG_ENCRYPTION_PASSWORD, // Optional: enables encryption
});

// Reports automatically encrypted before upload
await client.submitReport({
  agentType: 'claude-code',
  summary: 'Implemented authentication',
  filesModified: ['auth.ts'],
  // ... encrypted with your password before transmission
});

Encrypting Code Backups

import { WireLogClient } from '@wirelog/wirelog-client';

const client = new WireLogClient({
  apiKey: process.env.WIRELOG_API_KEY!,
  encryptionPassword: process.env.WIRELOG_ENCRYPTION_PASSWORD,
});

// Create encrypted backup
await client.backup.create({
  message: 'Pre-deployment backup',
  files: ['src/**/*.ts'],
  // Files encrypted with AES-256-GCM before upload
});

// List backups (metadata not encrypted)
const backups = await client.backup.list();

// Download and decrypt backup
const decryptedFiles = await client.backup.download(backups[0].hash);
// Automatically decrypted using your password

Key Derivation Details

// WireLog uses PBKDF2 for key derivation:
// - Algorithm: PBKDF2-SHA256
// - Iterations: 310,000 (OWASP 2023)
// - Salt: Unique per user (stored server-side)
// - Output: 256-bit master key

// Hierarchical key structure:
// 1. Master Key: Derived from password + user salt
// 2. Session DEK: Random AES-256 key per session
// 3. Encrypted DEK: DEK wrapped with master key, stored server-side
// 4. Data: Encrypted with session DEK using AES-256-GCM

Security Best Practices

  • Use a strong, unique encryption password (min 16 characters)
  • Store password in environment variable, not in code
  • Never commit WIRELOG_ENCRYPTION_PASSWORD to git
  • Server never sees your password or unencrypted data
  • Losing your password means losing access to encrypted data (no backdoor)

CLI Commands (v3.0)

WireLog provides a comprehensive CLI for managing skills, reports, and security scanning:

Authentication & Setup

wirelog init               # Authenticate with browser OAuth (first-time setup)
wirelog status             # View account status and skills quota
wirelog config             # Show current configuration

Skills Management

wirelog skills list                # List all available skills (grouped by category)
wirelog skills list --limit 50     # Show more results
wirelog skills search "database"   # Search skills by keyword
wirelog skills show <skill-id>     # View detailed skill information
wirelog skills show fa94daf2       # Short IDs (8 chars) also supported!
wirelog skills create "My Skill" --file ./skill.md --category testing

💡 Tip: Commands accept both short IDs (8 characters, shown in lists) and full UUIDs for convenience.

Activation Rules (Required for Skills)

To activate skills for specific file patterns, create activation rules:

# List all rules
wirelog rules list

# Create a new rule
wirelog rules create \
  --skill-id f8ef71a4-00b4-4740-9cb8-50c3b8b8d1a4 \
  --name "TypeScript Files" \
  --pattern "**/*.ts" \
  --type glob \
  --priority 500

# Test activation
wirelog activate src/main.ts src/utils.ts

⚠️ Important: Skills won't activate without rules! After creating a skill, create at least one activation rule.

Session Reports

wirelog reports list       # List recent session reports
wirelog reports list --limit 20  # Show more reports
wirelog reports show <id>  # View detailed session report
wirelog report             # Generate manual session report

Auto-Injection (Requires AI Agent)

wirelog watch              # Start auto-injection watcher
wirelog watch --daemon     # Full session tracking with auto-reporting

Note: Auto-injection automatically detects your AI agent (Cursor, Claude, Windsurf) and injects relevant skills based on file changes.

🆕 IDE Hooks (v3.0)

wirelog hooks install cursor       # Install Cursor MDC rules
wirelog hooks install claude-code  # Install Claude Code shell hooks
wirelog hooks install windsurf     # Install Windsurf memories
wirelog hooks install <ide> --force  # Overwrite existing hooks

🆕 Context Rules (v3.0)

wirelog context-rules list                    # List all context rules
wirelog context-rules create "Name" --file rules.md --rule-type machine
wirelog context-rules show <id>               # Show rule details
wirelog context-rules inject --agent-type cursor  # Get rules for injection
wirelog context-rules delete <id>             # Delete a rule

🆕 Sessions (v3.0)

wirelog sessions start --agent-type cursor    # Start new session
wirelog sessions active                       # Show current active session
wirelog sessions list                         # List recent sessions
wirelog sessions show <id>                    # Show session details
wirelog sessions end <id>                     # End session with report

Security Scanning

wirelog scan secrets ./src         # Scan for secrets (19+ patterns)
wirelog scan check .env            # Check if file would be ignored
wirelog scan patterns              # List all secret detection patterns

Encryption (v6.0)

wirelog crypto set-password         # Set encryption password (interactive)
wirelog crypto verify               # Verify encryption password
wirelog crypto status               # Check encryption status
wirelog crypto rotate-keys          # Rotate encryption keys (advanced)

Utilities

wirelog keygen              # Generate encryption key
wirelog --version           # Show version
wirelog --help              # Show all commands

JSON Output

All commands support --json flag for programmatic use:

wirelog skills list --json
wirelog status --json
wirelog reports list --json

Features

✅ Core Features

  • Local-First: All data stored locally first (~/.wirelog/)
  • Cloud Sync: Automatic sync to cloud with conflict resolution
  • Session Management: Create, update, complete, delete sessions
  • Agent Rules: Manage AI agent instructions and context
  • Code Backups: Secure code snapshots with secret scanning
  • Markdown Export: Generate session reports in markdown format

🔒 Security Features (Phase 3)

  • File Filtering: .wirelogignore prevents sensitive files from being uploaded
  • Secret Scanner: Detects 15+ secret types (AWS keys, JWT tokens, DB URLs, etc.)
  • API Key Authentication: Secure automated backups without OAuth
  • Multi-Tenant Isolation: Row-Level Security (RLS) at database level

🚀 Phase 2 Features

  • Lifecycle Hooks: onInit, onSessionStart, onSessionEnd
  • Context Loading: Auto-load agent rules and session history
  • File Watcher: Monitor file changes with chokidar
  • Activity Tracking: Auto-detect inactivity and complete sessions

Backup Security

File Filtering with .wirelogignore

Create a .wirelogignore file in your project root to exclude sensitive files:

# Environment files
.env
.env.*

# Secrets
*.key
*.pem
credentials.json
**/secrets/**

# Dependencies
node_modules/
vendor/

# Build outputs
dist/
build/

Usage:

import { IgnoreFilter, createDefaultFilter } from '@wirelog/wirelog-client';

// Option 1: Use default patterns (if no .wirelogignore exists)
const filter = createDefaultFilter();

// Option 2: Load from project
const filter = loadFromProject('/path/to/project');

// Check if file should be ignored
console.log(filter.shouldIgnore('.env')); // true
console.log(filter.shouldIgnore('src/index.ts')); // false

Secret Scanner

Detect secrets in code before backup:

import { SecretScanner, hasSecrets, formatMatches } from '@wirelog/wirelog-client';

const scanner = new SecretScanner();

// Quick check
const content = `const API_KEY = 'AKIAIOSFODNN7EXAMPLE';`;
if (hasSecrets(content, 'config.ts')) {
  console.error('⚠️  Secrets detected!');
}

// Detailed scan
const matches = scanner.scanContent(content, 'config.ts');
console.log(formatMatches(matches));

// Output:
// Secrets detected:
//   config.ts:1:20 - AWS Access Key ID: AKIA***MPLE

Supported Secret Types:

  • AWS Access Keys & Secret Keys
  • Private Keys (RSA, OpenSSH, EC, PGP)
  • API Keys (Stripe, OpenAI, GitHub, Generic)
  • JWT Tokens
  • Database URLs (Postgres, MySQL, MongoDB, Redis)
  • Passwords & Bearer Tokens
  • Slack Tokens, Google API Keys, Firebase URLs

Secure Backup Flow

import { WireLogClient, IgnoreFilter, SecretScanner } from '@wirelog/wirelog-client';

async function secureBackup(projectRoot: string) {
  const client = new WireLogClient({
    apiKey: process.env.WIRELOG_API_KEY!,
    apiUrl: 'https://api.wirelog.io',
  });

  // 1. Filter sensitive files
  const filter = loadFromProject(projectRoot);
  const allFiles = getAllFiles(projectRoot);
  const safeFiles = allFiles.filter(f => !filter.shouldIgnore(f));

  // 2. Scan for secrets
  const scanner = new SecretScanner();
  for (const file of safeFiles) {
    const content = fs.readFileSync(file, 'utf-8');
    if (hasSecrets(content, file)) {
      throw new Error(`Secrets detected in ${file} - aborting backup`);
    }
  }

  // 3. Create backup (secrets-free, filtered)
  console.log(`✅ No secrets detected. Backing up ${safeFiles.length} files`);
  // ... create tarball and upload
}

Submitting Session Reports

The SDK provides a high-level submitReport() method for quick session report submission:

import { WireLogClient } from '@wirelog/wirelog-client';

const client = new WireLogClient({
  apiKey: 'sk_your_api_key',
  apiUrl: 'https://api.wirelog.io',
});

await client.submitReport({
  agentType: 'claude-code',
  machineType: 'vps',
  projectName: 'MyProject',
  projectPath: '/path/to/project',
  sessionStart: new Date('2025-11-17T10:00:00Z'),
  sessionEnd: new Date(),
  status: 'success',
  summary: 'Implemented authentication feature',
  filesModified: ['auth.ts', 'middleware.ts'],
  linesAdded: 150,
  tags: ['auth', 'security'],
});

API Reference

WireLogClient

Constructor:

new WireLogClient(options: WireLogClientOptions)

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiKey | string | required | Your WireLog API key | | apiUrl | string | https://api.wirelog.io | API endpoint | | storagePath | string | ~/.wirelog | Local storage directory | | autoSync | boolean | true | Enable automatic cloud sync |

Methods:

| Method | Description | |--------|-------------| | submitReport(params) | Submit session report (high-level convenience method) | | createSession(data) | Create a new session | | updateSession(id, data) | Update session activity | | completeSession(id, data) | Mark session as complete | | deleteSession(id) | Delete a session | | syncToCloud() | Manually trigger cloud sync | | getSession(id) | Get session by ID | | listSessions(filter?) | List all sessions | | createRule(data) | Create agent rule | | updateRule(id, data) | Update agent rule | | deleteRule(id) | Delete agent rule |

IgnoreFilter

Constructor:

new IgnoreFilter(ignoreFilePath?: string)

Methods:

| Method | Description | |--------|-------------| | shouldIgnore(filePath) | Check if file should be ignored | | getPatterns() | Get all loaded patterns | | isUsingDefaults() | Check if using default patterns |

Helpers:

createDefaultFilter(): IgnoreFilter
loadFromProject(projectRoot: string): IgnoreFilter

SecretScanner

Constructor:

new SecretScanner(customPatterns?: SecretPattern[])

Methods:

| Method | Description | |--------|-------------| | scanContent(content, fileName) | Scan string for secrets | | scanFile(filePath) | Scan file for secrets | | scanFiles(filePaths) | Scan multiple files | | addPattern(pattern) | Add custom secret pattern | | getPatternNames() | List all pattern names |

Helpers:

hasSecrets(content: string, fileName?: string): boolean
formatMatches(matches: SecretMatch[]): string

Examples

Example 1: Session with Auto-Sync

import { WireLogClient } from '@wirelog/wirelog-client';

const client = new WireLogClient({
  apiKey: process.env.WIRELOG_API_KEY!,
  autoSync: true, // Sync every 30 seconds
  apiUrl: 'https://api.wirelog.io',
});

const session = client.createSession({
  title: 'E-Commerce API',
  project: 'my-app',
  agent: 'cursor',
});

// Work happens...
await client.updateSession(session.id, {
  filesModified: ['src/auth.ts'],
  linesAdded: 85,
});

// Auto-syncs to cloud in background

Example 2: Secure Code Backup

import { WireLogClient, IgnoreFilter, SecretScanner } from '@wirelog/wirelog-client';
import * as fs from 'fs';
import * as path from 'path';

const client = new WireLogClient({
  apiKey: process.env.WIRELOG_API_KEY!,
  apiUrl: 'https://api.wirelog.io',
});

const projectRoot = '/path/to/project';

// Load .wirelogignore
const filter = new IgnoreFilter(path.join(projectRoot, '.wirelogignore'));

// Scan for secrets
const scanner = new SecretScanner();
const allFiles = getFilesRecursively(projectRoot);

for (const file of allFiles) {
  // Skip ignored files
  if (filter.shouldIgnore(file)) continue;

  // Scan for secrets
  const content = fs.readFileSync(file, 'utf-8');
  const matches = scanner.scanContent(content, file);

  if (matches.length > 0) {
    console.error(`❌ Secrets found in ${file}:`);
    console.error(formatMatches(matches));
    process.exit(1);
  }
}

console.log('✅ No secrets detected. Safe to backup.');

Example 3: Custom Secret Pattern

import { SecretScanner } from '@wirelog/wirelog-client';

const scanner = new SecretScanner();

// Add company-specific pattern
scanner.addPattern({
  name: 'Acme Corp Token',
  regex: /ACME_TOKEN_[A-Z0-9]{32}/g,
  description: 'Acme Corp internal token',
});

const code = `const token = 'ACME_TOKEN_ABCD1234EFGH5678IJKL9012MNOP';`;
const matches = scanner.scanContent(code, 'config.ts');

console.log(matches[0].pattern); // "Acme Corp Token"

Example 4: Lifecycle Hooks

import { WireLogClient, hooks } from '@wirelog/wirelog-client';

// Register hooks
hooks.on('onSessionStart', async (context) => {
  console.log(`Session started: ${context.session.id}`);
});

hooks.on('onSessionEnd', async (context) => {
  console.log(`Session completed: ${context.session.id}`);
  console.log(`Duration: ${context.duration}ms`);
});

const client = new WireLogClient({
  apiKey: process.env.WIRELOG_API_KEY!,
  apiUrl: 'https://api.wirelog.io',
});

const session = client.createSession({
  title: 'My Project',
  project: 'my-project',
  agent: 'cursor',
}); // Triggers onSessionStart

client.completeSession(session.id, 'success'); // Triggers onSessionEnd

Testing

# Run unit tests
npm test

# Run with coverage
npm run test:coverage

# Run specific test file
npm test tests/ignore.test.ts
npm test tests/secrets.test.ts

# Watch mode
npm run test:watch

Test Results (Phase 3):

  • ✅ 20 tests - IgnoreFilter (default patterns, custom .wirelogignore, negation, directories)
  • ✅ 27 tests - SecretScanner (AWS, private keys, API keys, JWT, DB URLs, redaction)
  • ✅ All 47 tests passing

Configuration Files

.wirelogignore

Gitignore-style syntax for excluding files from backups.

Location: <project-root>/.wirelogignore

Example:

# Environment files
.env
.env.*

# Secrets
*.key
*.pem
config/production.yaml

# Dependencies
node_modules/

# Explicitly include (negation)
!important-config.json

wirelog.config.json

Optional SDK configuration file.

Location: <project-root>/wirelog.config.json

Example:

{
  "apiUrl": "https://api.wirelog.io",
  "storagePath": "~/.wirelog",
  "autoSync": true,
  "syncInterval": 30000,
  "hooks": {
    "enabled": true,
    "onSessionStart": "./hooks/session-start.ts"
  }
}

Environment Variables

# Required
export WIRELOG_API_KEY=sk_your_api_key_here

# Optional
export WIRELOG_API_URL=https://api.wirelog.io
export WIRELOG_STORAGE_PATH=~/.wirelog
export WIRELOG_AUTO_SYNC=true

Documentation


Roadmap

  • Phase 1: Project identification & lazy initialization
  • Phase 2: Lifecycle hooks & agent automation
  • Phase 3: Backup security (.wirelogignore + secret scanner)
  • Phase 4: AES-256 encryption + CLI tool
  • Phase 5: AI chat integration (embeddings + vector search)
  • Phase 6 (v3.0): Auto-injection hooks (Cursor, Claude Code, Windsurf)
  • Phase 6 (v3.0): Context rules API (machine/agent context)
  • Phase 6 (v3.0): Session tracking with auto-reporting

Contributing

Contributions welcome! Please read our contributing guidelines first.

License

MIT


Maintained by: WireLog Team Support: https://github.com/desaas/wirelog/issues Website: https://app.wirelog.io