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

@alchemystai/opencode

v0.1.0

Published

opencode plugin for AlchemystAI Context Layer — persistent, retrievable memory for coding sessions

Readme

@alchemystai/opencode

opencode plugin for AlchemystAI Context Layer — gives opencode agents persistent, retrievable memory backed by Alchemyst.

Install

# via npm
npm install @alchemystai/opencode

# via GitHub
npm install https://github.com/Alchemyst-ai/opencode-alchemyst-context.git

Add to opencode.json:

{
  "plugin": ["@alchemystai/opencode"]
}

Setup

On first use, tell the agent to configure the API key:

alchemyst_configure: set my key to <your-jwt-bearer-token>

This saves your configuration to ~/.config/opencode-alchemyst/config.json. It persists across sessions — you only need to do this once.

You can also pre-configure by creating the file manually:

{
  "apiKey": "your-jwt-bearer-token",
  "groupName": ["opencode", "my-project"]
}

The config file stores all connection settings (not just the key). Environment variables take priority over saved values — useful for per-session overrides without editing the file.

| Env var | Required | Default | Priority | |---|---|---|---| | ALCHEMYST_BASE_URL | no | https://platform-backend.getalchemystai.com | overrides config.json | | ALCHEMYST_DEFAULT_SCOPE | no | internal | overrides config.json | | ALCHEMYST_GROUP_NAME | no | opencode (first element) | overrides config.json |

Tools

alchemyst_configure

Set the Alchemyst API key and optionally override connection settings. Required before using any other tool.

apiKey: "your-jwt-bearer-token"
baseUrl: "https://staging.example.com"       # optional
defaultScope: "external"                      # optional
groupName: ["my-team", "project-x"]           # optional, string[]

All values are saved to ~/.config/opencode-alchemyst/config.json. Prompts you for permission before saving. Environment variables for the same settings will override saved values.

alchemyst_context_search

Search stored context for relevant documents.

query: "what did we decide about authentication?"

Returns top results with relevance scores. Use when you need to check if decisions or reference material already exist before answering.

alchemyst_context_add

Save a decision, snippet, or convention to context.

content: "We decided to use Auth0 for all customer-facing auth."
context_type: "instruction"

Runs content through a security guard (blocking keys, tokens, passwords) before sending. Returns the new context ID on success.

alchemyst_memory_add

Persist conversation turns keyed by session ID.

contents: [{ content: "User asked about deployment pipeline..." }]

Session ID is pulled automatically from the opencode session — the model cannot spoof or collide session IDs.

alchemyst_memory_update

Update previously saved memory entries for the current session.

alchemyst_context_ask

Ask a grounded question and get a synthesized answer.

query: "What's our policy on dependency versions?"
steeringPrompt: "answer in one sentence"

Security

The plugin includes a heuristic outbound content guard that checks for:

  • Private key headers (BEGIN RSA PRIVATE KEY, etc.)
  • AWS access keys (AKIA...)
  • OpenAI-style API keys (sk-...)
  • GitHub tokens (ghp_..., gho_..., ghu_...)
  • Generic api_key assignments
  • SECRET/TOKEN/PASSWORD environment assignments

This is a blunt heuristic, not a compliance control. Matched content is blocked before any network request, and the tool returns a clear message about which category was detected. No matched text is echoed back.

Credential handling

The API key is stored in ~/.config/opencode-alchemyst/config.json with restricted permissions (0600). It is never logged, included in error messages, or echoed to the model. Use the alchemyst_configure tool to set or update the key at runtime — no environment variable needed.

If no key is configured, the plugin still loads but every tool returns a clear error message instead of crashing the session.

Development

# Install deps
npm install

# Typecheck
npm run typecheck

# Test
npm test

# Build
npm run build

License

MIT