open-index/open-npm huggingface dataset:
npm package: @maiife-ai-pub/ai-journal
Description: Personal AI Usage Diary — track how you use AI and get reflective insights
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/ai-journal

Personal AI Usage Diary — track how you use AI tools, record outcomes, and get weekly reflective insights.

Part of the [Maiife](https://maiife.ai) OSS toolkit for AI governance.

## Install

```bash
npm install @maiife-ai-pub/ai-journal
```

Or use directly without installing:

```bash
npx @maiife-ai-pub/ai-journal log "Used Claude to draft a product spec. Saved ~2h."
```

## CLI Usage

### Log an AI interaction

```bash
npx @maiife-ai-pub/ai-journal log "Used GPT-4o to refactor the auth module. Result was good."
```

### View your journal

```bash
npx @maiife-ai-pub/ai-journal view
```

Example output:

```
Maiife AI Journal v0.1.0

Your AI Usage — Last 7 Days

  Mon Apr 01   3 interactions   ~4.5h saved
    - Used Claude to write onboarding copy
    - Used GPT-4o to review PR diff
    - Used Gemini for competitive research

  Tue Apr 02   1 interaction    ~1h saved
    - Used Claude to debug Prisma migration

  Wed Apr 03   5 interactions   ~6h saved
    - Drafted pitch deck talking points
    - Summarized 3 customer interviews
    - ...

  Weekly Summary
    Total interactions:  9
    Estimated time saved: 11.5h
    Most used tool: Claude (6/9)
    Top use case: Writing & drafting
```

### Weekly reflection

```bash
npx @maiife-ai-pub/ai-journal reflect
```

### Search past entries

```bash
npx @maiife-ai-pub/ai-journal search "refactor"
```

### Output formats

```bash
npx @maiife-ai-pub/ai-journal view --format json
npx @maiife-ai-pub/ai-journal view --format html > journal.html
```

## Programmatic API

```typescript
import { addEntry, getEntries, weeklyReflection } from "@maiife-ai-pub/ai-journal";

// Add a journal entry
await addEntry({
  tool: "claude",
  task: "Drafted product spec",
  outcome: "saved ~2h, high quality",
  timeSavedHours: 2,
});

// Retrieve entries
const entries = await getEntries({ since: "2026-04-01" });
console.log(entries.length);

// Weekly reflection
const reflection = await weeklyReflection();
console.log(reflection.totalInteractions);
console.log(reflection.estimatedTimeSaved);
console.log(reflection.topTool);
```

### Types

```typescript
import type { JournalEntry, WeeklyReflection } from "@maiife-ai-pub/ai-journal";
```

## Requirements

- Node.js >= 18

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Copyright 2026 Maiife — [maiife.ai](https://maiife.ai)
npm package: @maiife-ai-pub/ai-stack
Description: What's Your AI Stack? — Generate a shareable profile card of your AI toolkit
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/ai-stack

What's Your AI Stack? — Generate a shareable profile card of your AI toolkit.

Detects your installed AI tools, models, MCP servers, and IDE integrations, then renders a shareable card showing your complete AI setup. Powered by `@maiife-ai-pub/probe`.

Part of the [Maiife OSS Toolkit](https://maiife.ai) for enterprise AI governance.

## Install

```bash
npm install @maiife-ai-pub/ai-stack
```

## CLI Usage

### Generate your AI stack profile

```bash
npx @maiife-ai-pub/ai-stack generate
```

Example output:

```
Your AI Stack

  IDE             VS Code + Cursor (Copilot enabled)
  MCP Servers     filesystem, github, database-proxy
  Local Models    llama3.2, mistral-7b (via Ollama)
  Cloud APIs      OpenAI, Anthropic
  Agents          Claude Code, Copilot Chat

Stack score: 92 / 100  (Enterprise-grade setup)
Shareable link: https://maiife.ai/stack/abc123
```

### Export as JSON

```bash
npx @maiife-ai-pub/ai-stack generate --format json
```

## MCP Server Usage

Add `@maiife-ai-pub/ai-stack` as an MCP server in your Claude Desktop or Cursor config:

```json
{
  "mcpServers": {
    "ai-stack": {
      "command": "npx",
      "args": ["@maiife-ai-pub/ai-stack", "mcp"],
      "env": {}
    }
  }
}
```

Once configured, Claude/Cursor can call tools like `get_stack`, `generate_card`, and `compare_stacks` directly from the chat interface.

### Docker

```bash
docker run -i ghcr.io/sakthivelchan89/maiife-ai-stack
```

## Programmatic API

```typescript
import { generateStack, renderCard, StackProfile } from "@maiife-ai-pub/ai-stack";

// Detect everything installed on this machine
const profile: StackProfile = await generateStack();

console.log(`IDE: ${profile.ide}`);
console.log(`MCP Servers: ${profile.mcpServers.join(", ")}`);
console.log(`Local Models: ${profile.localModels.join(", ")}`);

// Render as a shareable HTML card
const card = renderCard(profile, { theme: "dark" });
```

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Built by [Maiife](https://maiife.ai) — Enterprise AI Control Plane.
npm package: @maiife-ai-pub/ai-toolkit
Description: Unified AI governance MCP server — 29 tools for scanning, auditing, scoring, tracing, and optimizing AI usage
Author: Maiife
Latest version: 0.1.0

# @maiife-ai-pub/ai-toolkit

Unified AI governance MCP server — 29 tools in a single install.

## Install

```json
{
  "mcpServers": {
    "maiife-ai-toolkit": {
      "command": "npx",
      "args": ["-y", "@maiife-ai-pub/ai-toolkit"]
    }
  }
}
```

## Tools (29)

| Category | Tools |
|----------|-------|
| **Environment** | `probe_scan` |
| **MCP Security** | `mcp_audit_scan`, `mcp_audit_score` |
| **MCP Health** | `mcp_doctor_checkup`, `mcp_doctor_fix`, `mcp_doctor_status` |
| **AI Stack** | `ai_stack_generate` |
| **Context Sync** | `context_sync_read`, `context_sync_update`, `context_sync_push`, `context_sync_status` |
| **Prompt Scoring** | `prompt_score_analyze`, `prompt_score_improve`, `prompt_score_track` |
| **Evaluation** | `eval_score`, `eval_batch`, `eval_compare` |
| **Tracing** | `trace_list`, `trace_view`, `trace_analyze` |
| **Cost** | `cost_report`, `cost_optimize` |
| **Prompt Craft** | `prompt_craft_score`, `prompt_craft_improve`, `prompt_craft_profile`, `prompt_craft_challenge` |
| **Subscriptions** | `sub_audit_run` |
| **Model Selection** | `model_match_compare`, `model_match_recommend` |

## Docker

```json
{
  "mcpServers": {
    "maiife-ai-toolkit": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "ghcr.io/sakthivelchan89/maiife-ai-toolkit:latest"]
    }
  }
}
```

## License

[Apache 2.0](./LICENSE)

Part of the [Maiife Toolkit](https://github.com/sakthivelchan89/maiife-toolkit) — open-source AI governance tools.
npm package: @maiife-ai-pub/cost
Description: AI spend calculator + optimizer — unified cost report across vendors
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/cost

AI spend calculator + optimizer — unified cost report across all your AI vendors (OpenAI, Anthropic, Google, Cohere, and more).

Part of the [Maiife](https://maiife.ai) OSS toolkit for AI governance.

## Install

```bash
npm install @maiife-ai-pub/cost
```

Or use directly without installing:

```bash
npx @maiife-ai-pub/cost report
```

## CLI Usage

### Generate a cost report

```bash
npx @maiife-ai-pub/cost report
```

Example output:

```
Maiife Cost v0.1.0

AI Spend Report — April 2026

  Vendor          Requests   Tokens (in/out)   Cost
  OpenAI          4,821      2.1M / 890K       $47.23
  Anthropic       1,203      412K / 201K       $18.94
  Google          892        341K / 98K        $6.12
  -------------------------------------------------------
  Total           6,916      2.85M / 1.19M     $72.29

  Month-to-date budget: $72.29 / $150.00 (48%)
  Projected month-end:  $89.14

  Top models by cost:
    gpt-4o              $31.12 (43%)
    claude-3-5-sonnet   $18.94 (26%)
    gpt-4o-mini         $16.11 (22%)
```

### Show cost for a single request

```bash
npx @maiife-ai-pub/cost calc --model gpt-4o --input 1500 --output 600
```

### Compare model costs

```bash
npx @maiife-ai-pub/cost compare --models gpt-4o,claude-3-5-sonnet,gemini-1.5-pro
```

### Output formats

```bash
npx @maiife-ai-pub/cost report --format json
npx @maiife-ai-pub/cost report --format table
npx @maiife-ai-pub/cost report --format html > report.html
```

## MCP Server Usage

Add `@maiife-ai-pub/cost` as an MCP server so AI assistants can query and analyze AI spend.

### Claude Desktop (`~/Library/Application Support/Claude/claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "maiife-cost": {
      "command": "npx",
      "args": ["@maiife-ai-pub/cost", "mcp"]
    }
  }
}
```

### Cursor (`.cursor/mcp.json` in your project or `~/.cursor/mcp.json` globally)

```json
{
  "mcpServers": {
    "maiife-cost": {
      "command": "npx",
      "args": ["@maiife-ai-pub/cost", "mcp"]
    }
  }
}
```

Once configured, your AI assistant can call tools like `cost_report`, `cost_calc`, and `cost_compare`.

### Docker

```bash
docker run -i ghcr.io/sakthivelchan89/maiife-cost
```

## Programmatic API

```typescript
import { calcCost, getModelPricing, buildReport } from "@maiife-ai-pub/cost";

// Calculate cost for a single request
const cost = calcCost({ model: "gpt-4o", inputTokens: 1500, outputTokens: 600 });
console.log(cost.usd);  // e.g. 0.0165

// Get pricing table for a model
const pricing = getModelPricing("claude-3-5-sonnet");
console.log(pricing.inputPer1M);   // per-million input token price
console.log(pricing.outputPer1M);  // per-million output token price
```

### Types

```typescript
import type { CostResult, ModelPricing, SpendReport } from "@maiife-ai-pub/cost";
```

## Requirements

- Node.js >= 18

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Copyright 2026 Maiife — [maiife.ai](https://maiife.ai)
npm package: @maiife-ai-pub/eval
Description: LLM-as-judge evaluation engine — score agent outputs with structured rubrics
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/eval

LLM-as-judge evaluation engine — score agent outputs with structured rubrics and track quality over time.

Part of the [Maiife](https://maiife.ai) OSS toolkit for AI governance.

## Install

```bash
npm install @maiife-ai-pub/eval
```

Or use directly without installing:

```bash
npx @maiife-ai-pub/eval run --input output.json --rubric rubric.json
```

## CLI Usage

### Run an evaluation

```bash
npx @maiife-ai-pub/eval run --input output.json --rubric rubric.json
```

Example output:

```
Maiife Eval v0.1.0

Evaluation Results
  Rubric: customer-support-v1

  Criteria
    Accuracy          9/10    response facts are correct
    Helpfulness       8/10    addresses all user questions
    Tone              10/10   professional and empathetic
    Conciseness       7/10    slightly verbose

  Overall Score: 85/100   PASS (threshold: 70)
```

### List available rubrics

```bash
npx @maiife-ai-pub/eval rubrics list
```

### Create a custom rubric

```bash
npx @maiife-ai-pub/eval rubrics create my-rubric.json
```

### Output formats

```bash
npx @maiife-ai-pub/eval run --input output.json --rubric rubric.json --format json
npx @maiife-ai-pub/eval run --input output.json --rubric rubric.json --format html > report.html
```

## MCP Server Usage

Add `@maiife-ai-pub/eval` as an MCP server so AI assistants can evaluate outputs on demand.

### Claude Desktop (`~/Library/Application Support/Claude/claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "maiife-eval": {
      "command": "npx",
      "args": ["@maiife-ai-pub/eval", "mcp"]
    }
  }
}
```

### Cursor (`.cursor/mcp.json` in your project or `~/.cursor/mcp.json` globally)

```json
{
  "mcpServers": {
    "maiife-eval": {
      "command": "npx",
      "args": ["@maiife-ai-pub/eval", "mcp"]
    }
  }
}
```

Once configured, your AI assistant can call tools like `eval_run`, `eval_list_rubrics`, and `eval_compare`.

### Docker

```bash
docker run -i ghcr.io/sakthivelchan89/maiife-eval
```

## Programmatic API

```typescript
import { evaluate } from "@maiife-ai-pub/eval";

const result = await evaluate({
  input: "What is the refund policy?",
  output: "You can return items within 30 days...",
  rubricId: "customer-support-v1",
});

console.log(result.score);     // 0-100
console.log(result.passed);    // boolean
console.log(result.criteria);  // per-criterion scores
```

### Types

```typescript
import type { EvalResult, EvalCriterion, Rubric } from "@maiife-ai-pub/eval";
```

## Requirements

- Node.js >= 18

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Copyright 2026 Maiife — [maiife.ai](https://maiife.ai)
npm package: @maiife-ai-pub/mcp-audit
Description: MCP server security scanner — score configurations on permissions, data sensitivity, blast radius
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/mcp-audit

MCP server security scanner — score configs on permissions, data sensitivity, blast radius.

Part of the [Maiife OSS Toolkit](https://maiife.ai) for enterprise AI governance.

## Install

```bash
npm install @maiife-ai-pub/mcp-audit
```

## CLI Usage

### Scan all configured MCP servers

```bash
npx @maiife-ai-pub/mcp-audit scan
```

Example output:

```
Scanning MCP servers...

  filesystem      Grade: B  Score: 72  [permissions: medium, data: low, blast: medium]
  github          Grade: C  Score: 58  [permissions: high, data: medium, blast: high]
  database-proxy  Grade: D  Score: 41  [permissions: high, data: high, blast: critical]

3 servers scanned. 1 critical risk found.
```

### Score a specific server

```bash
npx @maiife-ai-pub/mcp-audit score --server github
```

Example output:

```
Security Score: github
  Permissions score:  45 / 100  (read + write + delete tools detected)
  Data sensitivity:   60 / 100  (accesses repository content)
  Blast radius:       55 / 100  (cross-repo tool calls possible)

  Overall grade: C  (Score: 53)
  Recommendation: Restrict tool list to read-only operations for untrusted agents.
```

## MCP Server Usage

Add `@maiife-ai-pub/mcp-audit` as an MCP server in your Claude Desktop or Cursor config:

```json
{
  "mcpServers": {
    "mcp-audit": {
      "command": "npx",
      "args": ["@maiife-ai-pub/mcp-audit", "mcp"],
      "env": {}
    }
  }
}
```

Once configured, Claude/Cursor can call tools like `scan_servers`, `score_server`, and `list_risks` directly from the chat interface.

### Docker

```bash
docker run -i ghcr.io/sakthivelchan89/maiife-mcp-audit
```

## Programmatic API

```typescript
import { scanServers, scoreServer, SecurityGrade } from "@maiife-ai-pub/mcp-audit";

// Scan all servers from a config file
const results = await scanServers({ configPath: "./mcp.json" });

for (const result of results) {
  console.log(`${result.name}: ${result.grade} (${result.score})`);
}

// Score a single server definition
const score = await scoreServer({
  name: "my-server",
  command: "node",
  args: ["./server.js"],
  tools: ["read_file", "write_file", "execute_command"],
});

if (score.grade === SecurityGrade.D || score.grade === SecurityGrade.F) {
  console.warn("High-risk server detected:", score.recommendations);
}
```

## CI Integration

Fail the build if any server scores below a threshold:

```bash
npx @maiife-ai-pub/mcp-audit scan --ci --min-grade B
```

Exit code is `0` if all servers meet the threshold, `1` otherwise. Use in GitHub Actions:

```yaml
- name: Audit MCP servers
  run: npx @maiife-ai-pub/mcp-audit scan --ci --min-grade B
```

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Built by [Maiife](https://maiife.ai) — Enterprise AI Control Plane.
npm package: @maiife-ai-pub/mcp-doctor
Description: MCP Server Health Check & Auto-Fixer — brew doctor for your MCP setup
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/mcp-doctor

MCP Server Health Check & Auto-Fixer — brew doctor for your MCP setup.

Diagnoses misconfigured, broken, or risky MCP servers and suggests fixes. Built on top of `@maiife-ai-pub/mcp-audit` for security scoring.

Part of the [Maiife OSS Toolkit](https://maiife.ai) for enterprise AI governance.

## Install

```bash
npm install @maiife-ai-pub/mcp-doctor
```

## CLI Usage

### Run a full health check

```bash
npx @maiife-ai-pub/mcp-doctor check
```

Example output:

```
Checking MCP servers...

  filesystem      OK       All checks passed
  github          WARN     Tool list not restricted — consider limiting to read-only
  database-proxy  ERROR    Server unreachable at tcp://localhost:5432

2 warnings, 1 error. Run with --fix to auto-repair where possible.
```

### Auto-fix known issues

```bash
npx @maiife-ai-pub/mcp-doctor check --fix
```

## MCP Server Usage

Add `@maiife-ai-pub/mcp-doctor` as an MCP server in your Claude Desktop or Cursor config:

```json
{
  "mcpServers": {
    "mcp-doctor": {
      "command": "npx",
      "args": ["@maiife-ai-pub/mcp-doctor", "mcp"],
      "env": {}
    }
  }
}
```

Once configured, Claude/Cursor can call tools like `check_servers`, `diagnose_server`, and `apply_fix` directly from the chat interface.

### Docker

```bash
docker run -i ghcr.io/sakthivelchan89/maiife-mcp-doctor
```

## Programmatic API

```typescript
import { checkServers, diagnoseServer, DiagnosticSeverity } from "@maiife-ai-pub/mcp-doctor";

// Check all servers
const results = await checkServers({ configPath: "./mcp.json" });

for (const result of results) {
  if (result.severity === DiagnosticSeverity.ERROR) {
    console.error(`${result.name}: ${result.message}`);
  }
}

// Diagnose a single server and get fix suggestions
const diagnosis = await diagnoseServer({
  name: "github",
  command: "npx",
  args: ["-y", "@modelcontextprotocol/server-github"],
});

console.log(diagnosis.suggestions);
```

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Built by [Maiife](https://maiife.ai) — Enterprise AI Control Plane.
npm package: @maiife-ai-pub/model-match
Description: Personal Model Recommender — find the best model for YOUR tasks
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/model-match

Personal Model Recommender — find the best model for YOUR tasks.

Profiles your actual task distribution and recommends the optimal model(s) using evaluation data from `@maiife-ai-pub/eval`. Considers cost, latency, quality, and context window requirements.

Part of the [Maiife OSS Toolkit](https://maiife.ai) for enterprise AI governance.

## Install

```bash
npm install @maiife-ai-pub/model-match
```

## CLI Usage

### Get model recommendations

```bash
npx @maiife-ai-pub/model-match recommend
```

Example output:

```
Model Match for Your Task Profile

  Task breakdown:
    Code generation   45%
    Summarization     30%
    Q&A               15%
    Creative writing  10%

  Top recommendations:
    1. claude-3-5-sonnet   Score: 94   Best for: code + summarization, balanced cost
    2. gpt-4o-mini         Score: 81   Best for: high-volume Q&A, lowest cost
    3. gemini-1.5-pro      Score: 78   Best for: long-context summarization

  Current model: gpt-4o   Estimated waste: $23/mo
```

### Recommend for a specific task type

```bash
npx @maiife-ai-pub/model-match recommend --task "code-review"
```

## MCP Server Usage

Add `@maiife-ai-pub/model-match` as an MCP server in your Claude Desktop or Cursor config:

```json
{
  "mcpServers": {
    "model-match": {
      "command": "npx",
      "args": ["@maiife-ai-pub/model-match", "mcp"],
      "env": {}
    }
  }
}
```

Once configured, Claude/Cursor can call tools like `recommend_model`, `compare_models`, and `estimate_cost` directly from the chat interface.

### Docker

```bash
docker run -i ghcr.io/sakthivelchan89/maiife-model-match
```

## Programmatic API

```typescript
import { recommendModel, compareModels, TaskProfile } from "@maiife-ai-pub/model-match";

// Build a task profile
const profile: TaskProfile = {
  codeGeneration: 0.45,
  summarization: 0.30,
  qa: 0.15,
  creativeWriting: 0.10,
};

// Get top recommendations
const recommendations = await recommendModel(profile, {
  maxMonthlyCost: 50,
  minContextWindow: 32000,
});

console.log(`Top pick: ${recommendations[0].model} (score: ${recommendations[0].score})`);

// Compare two specific models side-by-side
const comparison = await compareModels("claude-3-5-sonnet", "gpt-4o", profile);
console.log(comparison.summary);
```

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Built by [Maiife](https://maiife.ai) — Enterprise AI Control Plane.
npm package: @maiife-ai-pub/prompt-craft
Description: Gamified Personal Prompt Coach — Duolingo for AI prompting with levels, streaks, and badges
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/prompt-craft

Gamified Personal Prompt Coach — Duolingo for AI prompting with levels, streaks, and badges.

Analyzes your prompts, scores them with `@maiife-ai-pub/prompt-score`, and guides you through leveled exercises to improve clarity, specificity, and output quality.

Part of the [Maiife OSS Toolkit](https://maiife.ai) for enterprise AI governance.

## Install

```bash
npm install @maiife-ai-pub/prompt-craft
```

## CLI Usage

### Score a prompt and get coaching feedback

```bash
npx @maiife-ai-pub/prompt-craft score "Summarize this document"
```

Example output:

```
Prompt Score: 42 / 100  (Level: Beginner)

  Clarity       3 / 10   Too vague — which document? what length?
  Specificity   4 / 10   No format or audience specified
  Context       2 / 10   Missing role, task, and constraints

Suggestions:
  - Add a role: "You are a technical writer..."
  - Specify output format: "in 3 bullet points"
  - Define the audience: "for a non-technical executive"

Improved prompt: "You are a technical writer. Summarize the following document in 3 bullet points for a non-technical executive."
New score: 87 / 100
```

### Start a coaching session

```bash
npx @maiife-ai-pub/prompt-craft coach
```

## MCP Server Usage

Add `@maiife-ai-pub/prompt-craft` as an MCP server in your Claude Desktop or Cursor config:

```json
{
  "mcpServers": {
    "prompt-craft": {
      "command": "npx",
      "args": ["@maiife-ai-pub/prompt-craft", "mcp"],
      "env": {}
    }
  }
}
```

Once configured, Claude/Cursor can call tools like `score_prompt`, `improve_prompt`, and `get_exercises` directly from the chat interface.

### Docker

```bash
docker run -i ghcr.io/sakthivelchan89/maiife-prompt-craft
```

## Programmatic API

```typescript
import { scorePrompt, improvePrompt, PromptLevel } from "@maiife-ai-pub/prompt-craft";

// Score a prompt
const result = await scorePrompt("Summarize this document");

console.log(`Score: ${result.score}`);
console.log(`Level: ${result.level}`);
console.log(`Suggestions: ${result.suggestions.join("\n")}`);

// Get an improved version
const improved = await improvePrompt("Summarize this document", {
  targetLevel: PromptLevel.Advanced,
  audience: "non-technical",
});

console.log(`Improved: ${improved.prompt}`);
console.log(`New score: ${improved.score}`);
```

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Built by [Maiife](https://maiife.ai) — Enterprise AI Control Plane.
npm package: @maiife-ai-pub/prompt-score
Description: Prompt quality analyzer — score, improve, and lint your AI prompts
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/prompt-score

Prompt quality analyzer — score, improve, and lint your AI prompts before they reach your LLM.

Part of the [Maiife](https://maiife.ai) OSS toolkit for AI governance.

## Install

```bash
npm install @maiife-ai-pub/prompt-score
```

Or use directly without installing:

```bash
npx @maiife-ai-pub/prompt-score score "Your prompt here"
```

## CLI Usage

### Score a prompt

```bash
npx @maiife-ai-pub/prompt-score score "Summarize the following document: ..."
```

Example output:

```
Maiife Prompt Score v0.1.0

Prompt Analysis
  Length            312 chars     OK
  Clarity           high          clear instruction verb detected
  Specificity       medium        consider adding output format
  Role / Persona    none          tip: add a system role for better results
  Injection Risk    low           no obvious injection patterns

Score: 74/100

Suggestions:
  1. Add an output format instruction (e.g. "Return as a bullet list")
  2. Specify a persona: "You are a senior analyst..."
```

### Lint a prompt file

```bash
npx @maiife-ai-pub/prompt-score lint prompts/summarize.txt
```

### Watch a directory for prompt changes

```bash
npx @maiife-ai-pub/prompt-score lint prompts/ --watch
```

### Output formats

```bash
npx @maiife-ai-pub/prompt-score score "..." --format json
npx @maiife-ai-pub/prompt-score score "..." --format table
npx @maiife-ai-pub/prompt-score score "..." --format html > report.html
```

## MCP Server Usage

Add `@maiife-ai-pub/prompt-score` as an MCP server so AI assistants can score and improve prompts on demand.

### Claude Desktop (`~/Library/Application Support/Claude/claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "maiife-prompt-score": {
      "command": "npx",
      "args": ["@maiife-ai-pub/prompt-score", "mcp"]
    }
  }
}
```

### Cursor (`.cursor/mcp.json` in your project or `~/.cursor/mcp.json` globally)

```json
{
  "mcpServers": {
    "maiife-prompt-score": {
      "command": "npx",
      "args": ["@maiife-ai-pub/prompt-score", "mcp"]
    }
  }
}
```

Once configured, your AI assistant can call tools like `prompt_score`, `prompt_improve`, and `prompt_lint`.

### Docker

```bash
docker run -i ghcr.io/sakthivelchan89/maiife-prompt-score
```

## Programmatic API

```typescript
import { scorePrompt, lintPrompt, improvePrompt } from "@maiife-ai-pub/prompt-score";

const result = await scorePrompt("Summarize the document below...");

console.log(result.score);        // 0-100
console.log(result.issues);       // array of linting issues
console.log(result.suggestions);  // improvement suggestions
```

### Types

```typescript
import type { PromptScoreResult, PromptIssue, ScoreDimension } from "@maiife-ai-pub/prompt-score";
```

## Requirements

- Node.js >= 18

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Copyright 2026 Maiife — [maiife.ai](https://maiife.ai)
npm package: @maiife-ai-pub/shared
Description: Shared types and formatters for the Maiife AI governance toolkit.
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/shared

Shared types and formatters for the Maiife AI governance toolkit.

## Install

```bash
npm install @maiife-ai-pub/shared
```

## API

### Types

```ts
import type { RiskLevel, Finding, ToolSummary, MaiifeTelemetry } from "@maiife-ai-pub/shared";
```

| Type | Description |
|------|-------------|
| `RiskLevel` | Severity level for a finding (`"critical"`, `"high"`, `"medium"`, `"low"`, `"info"`) |
| `Finding` | A single scanner finding with `id`, `riskLevel`, `title`, `description`, and optional `remediation` |
| `ToolSummary` | Aggregated summary for a scanned tool: `toolId`, `toolName`, `findings[]`, `score` |
| `MaiifeTelemetry` | Top-level telemetry envelope: `scanId`, `timestamp`, `tools[]`, `overallScore` |

### Formatters

```ts
import { formatJSON, formatTable, formatHTML } from "@maiife-ai-pub/shared";
```

| Function | Signature | Description |
|----------|-----------|-------------|
| `formatJSON` | `(data: MaiifeTelemetry) => string` | Pretty-prints telemetry as JSON |
| `formatTable` | `(data: MaiifeTelemetry) => string` | Renders findings as a plain-text table |
| `formatHTML` | `(data: MaiifeTelemetry) => string` | Renders findings as an HTML report |

## License

Apache 2.0 — see [LICENSE](./LICENSE).
npm package: @maiife-ai-pub/sub-audit
Description: Personal AI Subscription Auditor — find waste in your AI spending
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/sub-audit

Personal AI Subscription Auditor — find waste in your AI spending.

Analyzes your AI subscriptions, API usage, and token costs via `@maiife-ai-pub/cost` to surface duplicate tools, unused seats, and overpaying for capacity you don't use.

Part of the [Maiife OSS Toolkit](https://maiife.ai) for enterprise AI governance.

## Install

```bash
npm install @maiife-ai-pub/sub-audit
```

## CLI Usage

### Audit all AI subscriptions

```bash
npx @maiife-ai-pub/sub-audit audit
```

Example output:

```
AI Subscription Audit

  ChatGPT Plus     $20/mo    Usage: 12%   WASTE — consider free tier
  Claude Pro       $20/mo    Usage: 78%   OK
  GitHub Copilot   $10/mo    Usage: 91%   OK
  Cursor Pro       $20/mo    Usage: 34%   WARN — low usage
  OpenAI API       $47/mo    Usage: 100%  OPTIMIZE — consider batch API

Monthly total: $117/mo
Estimated savings: $34/mo (29%)
```

### Check a single provider

```bash
npx @maiife-ai-pub/sub-audit check --provider openai
```

## MCP Server Usage

Add `@maiife-ai-pub/sub-audit` as an MCP server in your Claude Desktop or Cursor config:

```json
{
  "mcpServers": {
    "sub-audit": {
      "command": "npx",
      "args": ["@maiife-ai-pub/sub-audit", "mcp"],
      "env": {}
    }
  }
}
```

Once configured, Claude/Cursor can call tools like `audit_subscriptions`, `check_provider`, and `estimate_savings` directly from the chat interface.

### Docker

```bash
docker run -i ghcr.io/sakthivelchan89/maiife-sub-audit
```

## Programmatic API

```typescript
import { auditSubscriptions, estimateSavings, SubscriptionStatus } from "@maiife-ai-pub/sub-audit";

// Load subscriptions from config or env
const results = await auditSubscriptions({
  configPath: "./ai-subscriptions.json",
});

for (const sub of results) {
  if (sub.status === SubscriptionStatus.WASTE) {
    console.warn(`${sub.name}: $${sub.monthlyCost}/mo — ${sub.recommendation}`);
  }
}

// Calculate potential savings
const savings = await estimateSavings(results);
console.log(`Potential monthly savings: $${savings.total}`);
```

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Built by [Maiife](https://maiife.ai) — Enterprise AI Control Plane.
npm package: @maiife-ai-pub/trace
Description: Agent workflow tracer — trace, view, and analyze agent execution spans
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/trace

Agent workflow tracer — trace, view, and analyze agent execution spans across tool calls and LLM steps.

Part of the [Maiife](https://maiife.ai) OSS toolkit for AI governance.

## Install

```bash
npm install @maiife-ai-pub/trace
```

Or use directly without installing:

```bash
npx @maiife-ai-pub/trace view trace.json
```

## CLI Usage

### View a trace file

```bash
npx @maiife-ai-pub/trace view trace.json
```

Example output:

```
Maiife Trace v0.1.0

Trace: customer-query-20260404-1432
  Duration: 4.2s   Spans: 7   Tokens: 1,847   Cost: $0.0041

  Span Timeline
    0ms    llm.call        gpt-4o          312ms   200 tokens
    312ms  tool.call       search_docs     891ms
    1203ms llm.call        gpt-4o          1102ms  618 tokens
    2305ms tool.call       send_reply      204ms
    2509ms llm.call        gpt-4o          891ms   917 tokens
    3400ms tool.call       log_interaction 81ms
    3481ms agent.complete  -               -

  Issues: none
```

### Watch a trace directory

```bash
npx @maiife-ai-pub/trace watch ./traces/
```

### Output formats

```bash
npx @maiife-ai-pub/trace view trace.json --format json
npx @maiife-ai-pub/trace view trace.json --format table
npx @maiife-ai-pub/trace view trace.json --format html > report.html
```

## MCP Server Usage

Add `@maiife-ai-pub/trace` as an MCP server so AI assistants can introspect execution traces.

### Claude Desktop (`~/Library/Application Support/Claude/claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "maiife-trace": {
      "command": "npx",
      "args": ["@maiife-ai-pub/trace", "mcp"]
    }
  }
}
```

### Cursor (`.cursor/mcp.json` in your project or `~/.cursor/mcp.json` globally)

```json
{
  "mcpServers": {
    "maiife-trace": {
      "command": "npx",
      "args": ["@maiife-ai-pub/trace", "mcp"]
    }
  }
}
```

Once configured, your AI assistant can call tools like `trace_view`, `trace_summarize`, and `trace_compare`.

### Docker

```bash
docker run -i ghcr.io/sakthivelchan89/maiife-trace
```

## Programmatic API

```typescript
import { loadTrace, summarize } from "@maiife-ai-pub/trace";

const trace = await loadTrace("./traces/customer-query-20260404.json");
const summary = summarize(trace);

console.log(summary.totalDuration);  // ms
console.log(summary.totalTokens);    // number
console.log(summary.totalCost);      // USD
console.log(summary.spans);          // array of spans
```

### Types

```typescript
import type { Trace, Span, TraceSummary } from "@maiife-ai-pub/trace";
```

## Requirements

- Node.js >= 18

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Copyright 2026 Maiife — [maiife.ai](https://maiife.ai)
npm package: @maiife-ai-pub/weekly-ai-report
Description: Your AI Week in Review — Spotify Wrapped for your AI usage, weekly
Author: Maiife
Latest version: 0.1.4

# @maiife-ai-pub/weekly-ai-report

Your AI Week in Review — Spotify Wrapped for your AI usage, weekly.

Generates a rich weekly digest of your AI activity using data from `@maiife-ai-pub/ai-journal`: top models used, token spend, productivity wins, and AI-generated highlights for the week.

Part of the [Maiife OSS Toolkit](https://maiife.ai) for enterprise AI governance.

## Install

```bash
npm install @maiife-ai-pub/weekly-ai-report
```

## CLI Usage

### Generate this week's report

```bash
npx @maiife-ai-pub/weekly-ai-report generate
```

Example output:

```
Your AI Week in Review  (Mar 31 – Apr 6, 2026)

  Total sessions      47
  Total tokens        284,000
  Estimated cost      $3.12
  Top model           claude-3-5-sonnet (62% of sessions)
  Most active day     Tuesday

  Highlights:
    - Shipped 3 features with AI assistance
    - Saved ~4.2 hours on code review
    - Top task: code generation (48%)

  Trend vs last week:  +12% sessions,  -8% cost (more efficient!)
```

### Generate for a specific week

```bash
npx @maiife-ai-pub/weekly-ai-report generate --week 2026-03-24
```

### Export as HTML

```bash
npx @maiife-ai-pub/weekly-ai-report generate --format html --output report.html
```

## Programmatic API

```typescript
import { generateReport, WeeklyReport, ReportFormat } from "@maiife-ai-pub/weekly-ai-report";

// Generate for the current week
const report: WeeklyReport = await generateReport({
  weekStart: new Date("2026-03-31"),
  journalPath: "~/.maiife/journal",
});

console.log(`Sessions: ${report.totalSessions}`);
console.log(`Cost: $${report.estimatedCost.toFixed(2)}`);
console.log(`Top model: ${report.topModel}`);

// Export to HTML
const html = await generateReport({
  weekStart: new Date("2026-03-31"),
  format: ReportFormat.HTML,
});
```

## License

Apache 2.0 — see [LICENSE](./LICENSE)

Built by [Maiife](https://maiife.ai) — Enterprise AI Control Plane.