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

codison

v1.1.2

Published

codison

Readme

Codison

Codison is an open-source library for building AI-powered apps locally.
It gives you a full agent runtime with dozens of built-in tools, JSON schema validation, and local knowledge bases — all in a single package.

Use it directly in your TypeScript/JavaScript code to parse files, run automations, and build AI features with validated outputs.
No external vector DBs. No cloud dependencies. No boilerplate.

GitHub · Quickstart


Why Codison?

  • 🧩 Agent as a library — import it directly, compose tools, enforce schemas.
  • 📄 Structured JSON output — no free-form LLM text, always validated.
  • 📚 Huge local knowledge bases — feed 200MB Markdown and query it, no external DB.
  • Local-first — minimal dependencies, no vendor lock-in.
  • 🔧 Extensible — add your own tools (APIs, DB lookups, file operations).

Installation

npm i codison
# or
yarn add codison
# or
pnpm add codison

API Key

Codison requires an API key for your LLM provider:

export OPENAI_API_KEY=sk-xxxx
# or
export GEMINI_API_KEY=your-gemini-key

Quickstart (in code)

The simplest way to see Codison in action — strict JSON output in 10 lines:

import { Codison } from 'codison';

const agent = new Codison({
instructions: 'You are a math tutor.'
});

const result = await agent.runNonInteractive({
prompt: 'What is 17*19?',
schema: { type: 'number' },
});

console.log(result); // 323

Example 1: Parse Excel → JSON

Turn messy XLSX/CSV into validated JSON objects.
Codison calls your custom searchCity tool to resolve IDs and enforces a strict schema.

import { Codison } from 'codison';
import { SearchCityTool } from './tools/search-city';
import { tourOpenAPISchema } from './schemas/tour';

const codison = new Codison({
workingDir: '/tmp/excel-import',
instructions: 'Parse XLSX files and extract tours in strict JSON schema',
tools: [new SearchCityTool()],
});

const result = await codison.runNonInteractive({
prompt: 'Analyze uploaded Excel files and return all tours',
schema: tourOpenAPISchema,
});

console.log(result);

✅ Resolves cities with your API/tool
✅ Normalizes & validates fields
✅ Returns schema-conformant JSON every time


Example 2: Documentation FAQ Bot

Codison includes a built-in Knowledge Base (RAG).
Feed it massive text files (200–300MB Markdown), and query them locally — no external DB required.

import { Codison, KnowledgeBase } from 'codison';
import * as fs from 'fs';

const docs = fs.readFileSync('./docs/faq.md', 'utf-8');

// Create a knowledge base
const kb = new KnowledgeBase(docs, { chunkSize: 2000 });

const faqAgent = new Codison({
instructions: 'You are a documentation assistant.',
tools: [kb],
});

const answer = await faqAgent.runNonInteractive({
prompt: 'How do I import tours from Excel?',
});

console.log(answer);

✅ Local embeddings + in-memory vector index
✅ Top-k retrieval blended into prompts
✅ Perfect for FAQ bots or support assistants


Extending Codison

Codison is designed for extension — write your own tools and plug them into the agent:

import { Tool } from 'codison';

class SearchCityTool implements Tool {
name = 'searchCity';
description = 'Resolve cityId from city name.';
schema = { type: 'object', properties: { name: { type: 'string' } }, required: ['name'] };

async execute(args: { name: string }) {
return JSON.stringify(await searchCitiesByName(args), null, 2);
}
}

CLI (optional)

Codison also ships a CLI for one-off tasks and quick debugging.

npx codison "Fix bug in auth middleware and add tests"

Use Cases

  • Data ingestion → parse chaotic Excel/CSV into structured JSON
  • Support bots → query docs, FAQs, or even your codebase
  • Automation → validate inputs, migrate data, run local AI workflows
  • Custom AI utilities → compose agents with your own APIs/tools

Philosophy

Codison is a developer-first agent runtime:

  • Everything is code
  • Outputs are structured and validated
  • Tools & memory are composable
  • Runs locally, without ceremony or lock-in

Build AI features directly in your apps — fast, simple, reliable.