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 🙏

© 2024 – Pkg Stats / Ryan Hefner

env-ai

v0.4.0

Published

AI Assistant for Your Local Environment

Downloads

203

Readme

env-ai - AI Assistant for Your Local Environment

Web About Us Donate Github Twitter Instagram Medium

License Core

env-ai is an intelligent assistant tool for your terminal, designed to help you with tasks like documentation, performance optimization, refactoring, and more, using custom commands.

[!IMPORTANT]
env-ai needs the Ollama technology to work. Make sure you have it installed before using this CLI.

📑 Index

🌟 Features

  • 💬 Real-Time Chat: Interact with the AI assistant directly from your terminal.
  • 🗃️ Robust context: Accepts URL and local file inputs so the wizard has more precise context of what to do.
  • 🎨 Extensive Customization: Configure themes, inputs and outputs to your liking.
  • 📄 Configuration File Support: Make your chat systems portable. Compatible with multiple formats, including .mjs, .js, .json, .yml, .yaml, .toml, and .tml.
  • ✈️ Portable: Create a chat system, save it in a configuration file and use it for other projects.
  • 🌐 Multiple Environments:
    • 📦 JavaScript Library: Easily integrable into your projects.
    • 💻 Command Line Interface (CLI): Works in:
      • 🟢 Node.js
      • 🦕 Deno
      • 🍞 Bun
    • 🚀 Binary: Available for all operating systems and architectures via GitHub Releases.

📦 Installation

Install the CLI or add it as a dependency to your project:

## npm
npm install env-ai
## pnpm
pnpm add env-ai
## yarn
yarn add env-ai
# bun
bun add env-ai
# deno
deno add env-ai

global Installation

## npm
npm install -g env-ai
## pnpm
pnpm add -g env-ai
## yarn
yarn global add env-ai

without Installation

## npm
npx env-ai
## pnpm
pnpx env-ai

📖 Using the CLI

The env-ai CLI allows you to easily interact with the AI assistant. Here are some useful commands and options:

Main Commands

# Start a chat with the AI assistant
env-ai chat

Options

  • -i, --input - Path patterns or URLs to be processed. (array)
  • -m, --model - Name of the Ollama model to use. (string)
  • -p, --prompt - Fist prompt to generate a response (text, path or url). (string)
  • -s, --system - Custom system text or path. (string)
  • -t, --theme - Topic of conversation (custom, explain, docs, fix, performance, refactor, tests). (string)
  • -o, --output - Output path for the generated response. (string)
  • --overwrite - Behavior control if the output file exists (always, ask, last). (boolean)
  • --single - Get only one response. (boolean)
  • -c, --config - Path to config file. Files supported: [.mjs|.js|.json|.yml|.yaml|.toml|.tml]. (string)
  • --debug - Debug mode. (boolean)
  • -h, --help - Show help. (boolean)
  • -v, --version - Show version number. (boolean)

📚 Using the Library

env-ai can also be integrated as a library into your JavaScript or TypeScript project.

Import Example

import { run } from 'env-ai';

run({
    input: ['./src/**', 'https://example.com'],
    theme: 'docs',
    output: 'README.md',
});

Defined Configuration

Use defineConfig to define a reusable configuration:

import { defineConfig } from 'env-ai';

export default defineConfig({
    input: ['./src/**', 'https://example.com'],
    theme: 'docs',
    output: 'README.md',
});

🔍 Examples

You can see more examples here.

CLI

env-ai chat -i "./src/**" -t "docs" -o "output.md"

Library

import { run } from 'env-ai';

run({
    input: ['./src/**', 'https://example.com'],
    theme: 'docs',
    output: 'README.md',
});

CLI With js config file

env-ai chat --config dovenv.config.js
import { defineConfig } from 'env-ai';

export default defineConfig({
    model: 'llama3.2:latest',
    input: ['./src/**', 'https://example.com'],
    theme: 'docs',
    output: 'README.md',
});

CLI With json config file

env-ai chat --config dovenv.config.json
{
    "theme": "custom",
    "system": "./your-system-content.txt"
}

CLI With toml config file

env-ai chat --config documentation-context.toml
theme = "docs"
input = ["./docs", "./src"]
system = """
You are a helpful assistant explaining how to use the provided code library and provide detailed documentation.
The content for the following code library:

{{content}}
"""

CLI With yaml config file

env-ai chat --config dovenv.config.yaml
theme: custom
system: ./your-system-content.md

CLI - Input with excluded files

It includes all SRC files that are at the upper level.

env-ai chat -i 'src/*' '!src/../*' -t 'docs' -o 'output.md'

👨‍💻 Development

env-ai is an open-source project and its development is open to anyone who wants to participate.

TODO Issues Pull requests Read more

☕ Donate

Help us to develop more interesting things.

Donate

📜 License

This software is licensed with GPL-3.0.

Read more

🐦 About us

PigeonPosse is a ✨ code development collective ✨ focused on creating practical and interesting tools that help developers and users enjoy a more agile and comfortable experience. Our projects cover various programming sectors and we do not have a thematic limitation in terms of projects.

More

Collaborators

| | Name | Role | GitHub | | ---------------------------------------------------------------------------------- | ----------- | ------------ | ---------------------------------------------- | | | Angelo | Idea & Development & UI Design | @angelespejo | | | PigeonPosse | Collective | @PigeonPosse |

Web About Us Donate Github Twitter Instagram Medium