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

@ishaanranjan/code-complete

v1.0.0

Published

CLI for code completion

Readme

Inception Code Complete (CLI)

A tiny Node.js CLI that sends your code context and a prompt to InceptionLabs' Mercury model for code completion.

⚠️ Security: Never commit your API key to a public repo. Prefer .env and environment variables.


Quick start

# 1) Go to the folder
cd mercury-code-completion

# 2) Install deps
npm install
# If you previously ran into 'ora is not a function', pull latest and reinstall.

# 3) (Option A) Put your key in .env
cp .env.example .env
# edit .env to set INCEPTION_API_KEY

# 3) (Option B) Or export it in your shell
export INCEPTION_API_KEY=sk_...

# 4) Link the CLI locally
npm link

# 5) Use it
mercury-complete -f path/to/file.js -p "Write the next function to handle pagination"

Basic usage

# Print completion to stdout
mercury-complete -f src/app.ts

# Provide a guiding prompt
mercury-complete -f src/app.ts -p "Continue the code. Add input validation and JSDoc comments."

# Append completion to the file
mercury-complete -f src/app.ts --append

# Write completion to a new file
mercury-complete -f src/app.ts --out src/app.completed.ts

Flags

  • -f, --file <path>: (required) Source file to provide as context.
  • -p, --prompt <text>: Guidance for the model (default: "Continue the code from the end. Provide only code.").
  • --append: Append the generated code to the original file.
  • -o, --out <path>: Write completion to this file.
  • --max-tokens <n>: Upper bound on tokens to generate (default 512).
  • --temperature <n>: Sampling temperature (default 0.2).

How it works

We call POST https://api.inceptionlabs.ai/v1/chat/completions with the Mercury model. The file content is sent as context with your prompt. We ask the model to return code only (no backticks, no prose).


Example

mercury-complete -f example/input.ts -p "Add a robust retry helper with exponential backoff."

Troubleshooting

  • 401 / 403 – Make sure INCEPTION_API_KEY is set.
  • 429 – You may be rate-limited; retry after a pause.
  • 500 – Transient server error; try again.
  • Weird output – Tighten your prompt (e.g., "Return only code for TypeScript; no comments or backticks.").



### New flag
- `--keep-fences`: keep triple-backtick code fences if the model returns them (default is to strip them).