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

localptp

v0.1.1

Published

LocalCode Orchestrator CLI — drives a local coding model over large codebases.

Readme

LocalPTP — LocalCode Orchestrator

A command-line orchestrator that drives a local coding model (served by LM Studio) over a large codebase. It indexes your repo, builds focused context packages, decomposes a task into ordered subtasks, and applies model-generated diffs through safety gates with approval checkpoints — then reviews and summarizes the work.

Everything runs against a model on your own machine. No code leaves your computer.

Features

  • Repo indexing — scans the codebase into .ai-orchestrator/index.json and a /ai memory map.
  • Context builder — assembles role-scoped, token-budgeted context for the model.
  • Task planning — decomposes a task into ordered subtasks via the model.
  • Step/run loop — model → diff → safety gates → approval → apply → tests, one subtask at a time or looped.
  • Safety gates — approval prompts, risky-path confirmation, changed-file limits, binary/path-traversal refusals.
  • Review — advisory review of the current Git diff (modifies nothing).
  • Summarize — closes the loop by updating /ai memory from the session.

Requirements

  • Node.js ≥ 20
  • LM Studio running locally with a model loaded and its OpenAI-compatible server started (default http://localhost:1234/v1).
    • Default model: qwen/qwen3.6-27b (configurable — see Configuration).
  • Git (the orchestrator operates on a Git working tree).

Installation

Install from npm (recommended)

npm install -g localptp
localptp <command>

Try it without installing

npx localptp <command>

Clone and build (for contributors)

# 1. Clone
git clone https://github.com/AlmogMaayan/LocalPTP.git
cd LocalPTP

# 2. Install dependencies
npm install

# 3. Build
npm run build

Run it (contributor workflow)

During development (no build step, runs the TypeScript directly):

npm run localptp -- <command>

After building, run the compiled CLI:

node dist/cli.js <command>

Or install it globally so localptp is on your PATH:

npm install -g .
localptp <command>

Deprecated alias: The localcoder binary resolves to the same CLI for one release and will be removed thereafter. Please update any scripts to use localptp.

Quick start

# 0. Start LM Studio, load qwen/qwen3.6-27b, and start its local server.

# 1. Scaffold /ai memory + .ai-orchestrator/config.yml (idempotent)
localptp init

# 2. Verify LM Studio is reachable and the model responds
localptp doctor

# 3. Index the repo
localptp index

# 4. Create a task
localptp task "add input validation to the signup form"

# 5. Plan it into subtasks (calls the model)
localptp plan

# 6. Execute — one subtask, or loop until a stop condition
localptp step
localptp run

# 7. Review the diff and summarize the session
localptp review
localptp summarize

Commands

| Command | Description | |---------|-------------| | init | Scaffold /ai memory + .ai-orchestrator/config.yml (idempotent; no source edits). | | config [key] [value] | Show the merged config, a sub-tree, or set a dotted key (e.g. config model.model). | | doctor | Verify LM Studio is reachable and the model responds. | | index | Scan the repo and write .ai-orchestrator/index.json + update /ai memory map files. | | context [--role <role>] | Preview the context package for a role (read-only; no model call). | | task <text> | Create a scoped task + session and mark them active. | | plan | Decompose the active task into ordered subtasks (calls the model). | | resume [index] | List past sessions and continue from a selected one. | | step | Run the next pending subtask: model → diff → safety gates → approval → apply → tests. | | run | Loop the step cycle over pending subtasks with approval checkpoints until a stop condition. | | review | Review the current Git diff with the model (advisory; modifies nothing). | | summarize | Summarize the session and update /ai memory files. |

Global flags: --json (structured output) · --debug (verbose logging).

Configuration

localptp init writes .ai-orchestrator/config.yml. Sensible defaults apply when a field is absent. Key model settings:

model:
  provider: lmstudio
  base_url: http://localhost:1234/v1
  model: qwen/qwen3.6-27b
  api_key: lm-studio
  temperature: 0.2
  max_context_tokens: 32768
  timeout_ms: 60000

Read or change values from the CLI:

localptp config model.model              # show current model
localptp config model.model qwen/qwen3.6-27b   # set the model
localptp config model.baseUrl            # show the LM Studio endpoint

Safety, context, and command settings (typecheck/lint/test/build) are also configurable — run localptp config to see the full merged tree.

Development

npm run build       # compile TypeScript to dist/
npm run typecheck   # type-check without emitting
npm test            # run the vitest suite

License

MIT © 2026 Maayan Almog