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

@claaslange/pi-directory-models

v0.1.0

Published

pi extension that selects a model from the nearest ancestor .pi/settings.json

Readme

pi-directory-models

pi-directory-models is a pi extension that selects a model from the nearest ancestor .pi/settings.json.

It is meant for setups where different directory trees should automatically use different models or thinking levels.

What it does

On session start, the extension walks up from the current working directory until it reaches your home directory or the filesystem root.

As soon as it finds an ancestor .pi/settings.json with one of these settings, it applies them:

  • defaultProvider
  • defaultModel
  • defaultThinkingLevel

Missing values fall back to your global ~/.pi/agent/settings.json.

Example

Project root:

{
  "defaultProvider": "github-copilot",
  "defaultModel": "gpt-5",
  "defaultThinkingLevel": "medium"
}

Put that in:

/path/to/company-project/.pi/settings.json

Then every pi session started anywhere inside that project tree will switch to that model automatically.

Requirements

  • pi / @mariozechner/pi-coding-agent >= 0.62.0
  • extension peer deps: @mariozechner/pi-coding-agent and @mariozechner/pi-agent-core >= 0.62.0

This extension does not use the APIs affected by the 0.62.0 breaking changes around renderCall/renderResult or sourceInfo provenance.

Install

npm

pi install npm:@claaslange/pi-directory-models

Local path

pi install /absolute/path/to/pi-directory-models

Git

pi install git:github.com/claaslange/pi-directory-models

Package layout

  • extensions/index.ts – extension entry point
  • package.json – pi package manifest

Development

npm install
npm run check

Useful scripts:

  • npm run typecheck
  • npm run lint
  • npm run lint:fix
  • npm run format
  • npm run check

Publishing (maintainers)

This repo is set up to publish to npm via GitHub Actions on tags that match vX.Y.Z.

To publish:

  1. Update package.json version.
  2. Push the commit.
  3. Push a matching tag, for example git tag v0.1.0 && git push origin v0.1.0.
  4. Configure npm Trusted Publishing for claaslange/pi-directory-models and the publish workflow.

The published package name is @claaslange/pi-directory-models.

Notes

  • The nearest matching .pi/settings.json wins.
  • If defaultModel is set without defaultProvider, the extension tries to resolve the model by ID from available models.
  • If that model ID is ambiguous across providers, the extension shows a warning and asks you to set defaultProvider too.