open-index/open-npm huggingface dataset:
npm package: @ishaanranjan/code-complete
Description: CLI for code completion
Author: Ishaan Ranjan
Latest version: 1.0.0


# 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

```bash
# 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

```bash
# 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

```bash
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).
npm package: @ishaanranjan/code-completion
Description: Code completion CLI.
Author: Ishaan Ranjan
Latest version: 1.0.0

# code-completion (CLI)

A tiny Node.js CLI that sends your file content and an instruction prompt to a completion API and prints the result.

## Install (global)
```bash
npm i -g @ishaanranjan/code-completion
```

## Usage
```bash
# Print completion
code-completion -f path/to/file.py -p "Continue the code. Only code, no fences."

# Append completion to the file
code-completion -f path/to/file.py --append -p "Add input validation."

# Write to a new file
code-completion -f path/to/file.py -o path/to/file.completed.py -p "Refactor into functions."
```

### Options
- `-f, --file <path>`: **required** source file
- `-p, --prompt <text>`: instruction prompt
- `--max-tokens <n>`: max tokens (default 512)
- `--temperature <n>`: sampling temperature (default 0.2)
- `-o, --out <path>`: write result to this path
- `--append`: append result to the input file
- `--keep-fences`: keep triple-backtick code fences if present

## Notes
- Works with Node.js 18+.
npm package: @ishafayet/promisekeeper
Description: An industrial grade native promise scheduling library. Automatically limit number of promises running in parallel.
Author: Sayem Shafayet
Latest version: 0.0.3

# promisekeeper
An industrial grade native promise scheduling library. Automatically limit number of promises running in parallel. 

> Because unmanaged promises at scale are a disaster you don't even consider until you face it.

## A case in point

```js
Promise.all(userList.map(user => {
  return sendPolicyUpgradeMail(user);
})).then(() => {
  res.send("All Done");
});
```
There is nothing wrong with the above code. Nothing until your `userList` is at the scale of `10,000,000`. Imagine all the calls to `sendPolicyUpgradeMail` occuring simultaneously. Your RAM is going to be overflowed pretty soon, especially if you're doing any kind of template rendering inside that method. Same is true for database calls and most i/o.

Of course, ideally you would have these implemented in another microservice but even then, your promises will take up memory at the very least linearly to your `list`. That's where **PromiseKeeper** comes into play. It manages your promises automatically. Instead of the above code, you write - 

```js
PromiseKeeper.mapList(10000, userList, (user) => {
  return sendPolicyUpgradeMail(user);
}).then(() => {
  res.send("All Done");
});
```

Above call to `PromiseKeeper.mapList` will ensure that there's at most `10000` (or any number you specify). As soon as a promise is resolved, a new one will take it's place. Once all the promises are resolved, `PromiseKeeper.mapList` behaves exactly the same way as `Promise.all` (as in, it returns a promise).

## How about async functions?

Async functions work just fine as well.

```js
const myfunc = async () => {
  await PromiseKeeper.mapList(10000, userList, async (user) => {
    await sendPolicyUpgradeMail(user);
  });
}
```

## How to use?

Install with `npm i @ishafayet/promisekeeper`.

Require with `const PromiseKeeper = require('@ishafayet/promisekeeper');`

## What if I'm not using `Array.map`?

There is a lower level class `PromiseKeeper.PromiseKeeper`. It can be used to manage other kind of bulk promises. Documentation on that is coming soon.

## LICENSE

[MIT](LICENSE)
npm package: @ishandpande/ui-lib
Description: A professional React + TypeScript UI component library with Tailwind CSS. Includes Header, Footer, Forms, Navigation, and 30+ production-ready components.
Author: Ishan Pande
Latest version: 1.4.0
Deprecated: 📦 PACKAGE MOVED: This package is now @ishandpande/ui-lib-react. Please run: npm uninstall @ishandpande/ui-lib && npm install @ishandpande/ui-lib-react. Same APIs, enhanced monorepo structure!