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

ai-code-writer

v2.0.9

Published

An AI code writer application using OpenAI APIs for audio transcription and chat completion.

Downloads

38

Readme

AI Code Writer

Description

An AI code writer application using OpenAI APIs for audio transcription and chat completion.

Important Notice

When running this application, the files and directories in the current working directory will be sent to OpenAI for processing. See more in the filters section to know which files are involved.

Filters

The application uses the following filters for file collection and monitoring, which can be configured via environment variables:

  • Include Patterns: INCLUDE_PATTERNS (default: *.ts,*.json,*.yml,*.yaml,*.md,*.js,.env.dist)
  • Exclude Directories: EXCLUDE_DIRS (default: node_modules,build,dist,.git)
  • Exclude Files: EXCLUDE_FILES (default: package-lock.json,.*)

Optional Environment Variables

In addition to the mandatory OPENAI_API_KEY, the application supports several optional environment variables:

  • OPENAI_API_ORG: Your OpenAI organization ID (if applicable).
  • OPENAI_AUDIO_TEMPERATURE: The temperature setting for audio transformations (default: 0.1).
  • OPENAI_CHAT_TEMPERATURE: The temperature setting for chat completions (default: 0.75).
  • INCLUDE_PATTERNS: Patterns for files to include in processing ( default: *.ts,*.json,*.yml,*.yaml,*.md,*.js,.env.dist).
  • EXCLUDE_DIRS: Directories to exclude from processing (default: node_modules,build,dist,.git).
  • EXCLUDE_FILES: Files to exclude from processing (default: package-lock.json,.?*).
  • DEBUG_TO_FILE: If set to true, logs the conversation to a file (default: false).
  • OPENAI_CHAT_MODEL: The model to be used for chat completions (default: gpt-4o).

Prerequisites

  • SOX (Sound eXchange): This application requires SOX for audio recording. Install SOX via your package manager:
    • macOS: brew install sox
    • Windows: Download the installer from the official website
    • Linux: Use your distribution's package manager, e.g., apt-get install sox

Usage

npx ai-code-writer

User Guide

  1. Starting the Application:

    • Ensure that the environment variable OPENAI_API_KEY is set.
    • Optionally, set the filter environment variables as described in the "Optional Environment Variables" section.
    • Start the application with the command npx ai-code-writer.
  2. Interaction:

    • After starting the application, a welcome message will be played: "The AI Code Writer is ready."
    • Speak your input into the microphone. The application will record your speech and convert it to text.
  3. Conversation:

    • The transcribed input will be sent to the OpenAI API to get a response.
    • The AI's response will be read out loud and displayed on the console.
    • If the response contains file tasks (e.g., create, move, delete files), these will be executed automatically.
  4. File Monitoring:

    • Changes to the monitored files will be detected and recorded in the conversation history.
    • These changes can influence the AI's responses.
  5. Ending the Application:

    • The application runs in an infinite loop waiting for user input.
    • To end the application, use the usual methods to stop a Node.js process (e.g., Ctrl+C in the console).

License

MIT - LICENSE

Author

Endre Bock

Languages