Skip to content

Getting Started

Martin Schultheiss edited this page Nov 25, 2025 · 1 revision

Getting Started with Context Processor

A quick 5-minute guide to get Context Processor up and running.

Installation

Prerequisites

  • Node.js 16.0.0 or higher
  • npm or yarn

Install from npm

npm install context-processor

Verify installation:

npm list context-processor

Basic Usage

1. Save Context

import { ContextProcessor } from "context-processor";

// Initialize
const processor = new ContextProcessor();

// Save a context
const context = processor.save({
  title: "My Documentation",
  content: "This is some important documentation content.",
  tags: ["docs", "important"]
});

console.log("Saved context:", context.id);

2. Load Context

// Load the context
const loaded = processor.load(context.id);
console.log("Loaded:", loaded.title);

3. Search and Filter

// List all contexts
const all = processor.list();
console.log("Total contexts:", all.length);

// Filter by tag
const docContexts = processor.search({ tags: ["docs"] });
console.log("Documentation contexts:", docContexts.length);

Using Pre-Processing Strategies

Single Strategy: Clarify

// Save with clarification
const clarified = processor.save(
  {
    title: "My Text",
    content: "This is very important and somewhat vague content...",
    tags: ["text"]
  },
  "clarify" // Apply clarify strategy
);

Multiple Strategies: Comprehensive

// Apply clarify + analyze + search
const enhanced = processor.save(
  {
    title: "Blog Post",
    content: "My article content here...",
    tags: ["blog"]
  },
  "comprehensive" // All strategies combined
);

Available Models

  • clarify - Clarity improvements
  • search_optimized - Keyword extraction
  • analysis - Content metrics
  • comprehensive - All strategies
  • web_enhanced - URL detection

Next Steps

Learn By Scenario

Choose your use case:

Explore All Tools

See the API Reference for complete documentation of all 6 tools.

Common Questions

Check the FAQ for common questions and answers.


Troubleshooting

If you run into issues:

  1. Check Troubleshooting guide
  2. Review error messages carefully
  3. Open a GitHub Issue

Ready to build? Choose a scenario above and start exploring!

Clone this wiki locally