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

teleo-core

v0.1.4

Published

Backward-Causality & Teleological Code Synthesis Engine

Readme

teleo

A goal-driven static analysis and code repair tool.

Instead of predicting code forward line-by-line, teleo analyzes programs backward from a target post-condition to find runtime bugs before they execute, then synthesizes minimal diffs to fix them.

Works with JavaScript, TypeScript, and Python.


What it does

Most code assistants try to guess what you want to type next. Linters check for syntax and style issues.

teleo looks at your code as a causal graph:

  1. Forecast (teleo forecast): Scans execution paths to detect runtime crashes (TypeError, ReferenceError/NameError, ZeroDivisionError, runaway recursion) before you run your program.
  2. Solve (teleo solve --write): Computes the exact backward mutations needed to reach a stable state and applies the diff directly to your file.

You can use it in zero-config mode (analyzes the whole file automatically) or specify explicit target invariants with comments like // @teleo:target status === 200 or # @teleo:target res.ok.


Installation

Run directly with npx:

npx teleo forecast <file>
npx teleo solve <file> --write

Or install globally:

npm install -g teleo

Examples

1. Python (script.py)

Given this file:

def get_user_label():
    return "User: " + 42

get_user_label()

Run forecast:

teleo forecast script.py

Output:

Analyzing causality in: script.py...

CRITICAL Line 2: Illegal binary operand (+) between str and int: '"User: " + 42'
  Prophecy: Executing forward in Python will throw TypeError: can only concatenate str (not "int") to str.

Fix it automatically:

teleo solve script.py --write

Result:

def get_user_label():
    return "User: " + str(42)

get_user_label()

2. JavaScript / TypeScript (handler.js)

Given this file with potential null dereferences and unhandled targets:

// @teleo:target expect(status).toBe(200)
const user = null;
console.log(user.profile.name);

let status = 404;

Run forecast:

teleo forecast handler.js

Output:

CRITICAL Line 2: Dereferencing property 'profile' on 'user' which was explicitly assigned null.
  Prophecy: Executing forward will throw TypeError: Cannot read properties of null (reading 'profile').

CRITICAL Line 4: Causal conflict: 'status' is assigned '404', but target demands '200'.
  Prophecy: Target assertion 'status === 200' is guaranteed to fail because line 4 locked the state to '404'.

Fix it automatically:

teleo solve handler.js --write

Result:

// @teleo:target expect(status).toBe(200)
let user = { profile: { name: "Default" } };
console.log(user?.profile?.name);

let status = 200;

Using with AI CLIs (Claude Code, Cursor, Aider) via MCP

teleo includes a Model Context Protocol (MCP) server so AI coding agents can run causal verification instead of guessing edits.

Add to your MCP configuration (claude_desktop_config.json, Cursor, etc.):

{
  "mcpServers": {
    "teleo": {
      "command": "npx",
      "args": ["-y", "teleo-mcp"]
    }
  }
}

Exposed tools:

  • teleo_forecast: Returns structured runtime hazards for a code snippet.
  • teleo_solve: Returns the minimal AST mutations to satisfy target invariants.

Packages

This monorepo contains:

  • teleo-core: AST program slicing and causal pathfinder engine.
  • teleo: CLI interface.
  • teleo-mcp: MCP server for AI tools.
  • teleo-vscode: VS Code extension wrapper.

Development

# Clone
git clone https://github.com/yanzyuyu/Teleo.git
cd Teleo

# Install & build
npm install
npm run build
npm test

License

Apache-2.0