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

codesistant

v1.0.1

Published

Codesistant is a CLI tool designed to assist with code generation and completion using OpenAI's GPT-4 model. It watches specified files and directories for changes and updates an OpenAI assistant with the current state of the codebase, helping users compl

Downloads

6

Readme

Codesistant

Codesistant is a CLI tool designed to assist with code generation and completion using OpenAI's GPT-4 model. It watches specified files and directories for changes and updates an OpenAI assistant with the current state of the codebase, helping users complete their projects with consistent style and structure.

Table of Contents

Installation

To install Codesistant, you need to have Node.js and npm installed. Then, follow these steps:

  1. Install the Codesistant package globally:
    npm install -g codesistant

Usage

Codesistant can be used via the command line. The following commands are available:

Commands

  • init: Create a default config.yml in the current directory.

    codesistant init
  • watch: Start the watch process based on the configuration provided.

    codesistant watch

Options

  • --config, -c: Path to the config file (default: ./config.yml)
  • --proxy: Proxy URL
  • --openai: OpenAI API Key
  • --assistant: OpenAI assistant ID
  • --model: OpenAI model to use (default: gpt-4o)
  • --prompt: System prompt (default: a predefined prompt)
  • --files: List of files and directories to watch
  • --throttle: Throttle value in milliseconds (default: 2000)
  • --dburl: Database connection URL for MySQL or PostgreSQL

Example:

codesistant watch --config ./config.yml --openai <your-openai-key> --assistant <your-assistant-id>

Configuration

The configuration file (config.yml) specifies the settings for Codesistant. You can generate a default configuration file using the init command. Here is an example configuration:

proxy: '<optional proxy url>'
openai: '<required openai api key>'
assistant: '<required assistant id in openai>'
model: 'gpt-4o'
prompt: 'Below are snippets of code from the same project. Help the user complete the parts of the project they request based on the existing code. Adhere to the same style, structure, and approaches.'
files:
  - './example/path/to/dir/watch'
  - './support/**/glob/templates'
  - './example/**/somedir/*.js'
throttle: 2000
dburl: '<optional database connection url>'

Project Purpose

Codesistant is designed to quickly update an OpenAI assistant without the need to manually refresh the prompt each time. The system monitors specified files and directories, as well as changes in the database schema, and updates the assistant's prompt on the fly. This ensures that the assistant always has the most up-to-date information from your project.


Happy coding with Codesistant! If you encounter any issues or have any questions, feel free to open an issue on the project's GitHub page.