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

ianai-cli

v1.1.7

Published

<h1 align="center" id="title">Ianai-CLI</h1>

Downloads

17

Readme

Installation

Install ianai-cli

npm install -g ianai-cli

Usage

Note: Currently, only DeepSeek Chat is supported, API keys are currently unsupported.

  1. Go to Deepseek to get your Auth Token

screenshot

  1. Initialize Settings and set your auth token
ai --init
ai <your-input-message>

Command Generation

ai echo hello world!

You will then receive the following output, allowing you to either run the suggested command, copy it to the clipboard, or exit.

> echo hello world!
│
◆  Select one option:
│  ● Run command
│  ○ Copy to clipboard
│  ○ Exit
└

If you choose "Run command," you will get the following result:

> echo hello world!
│
◇  Select one option:
│  Run command
│
◇  ✅ Command executed result:

hello world!

Be aware that some shells treat specific characters such as ?, *, or anything resembling file paths in a unique way. If you encounter unexpected behaviors, you can prevent these issues by enclosing the prompt in quotes, as shown below:

ai "what is google's ip?"

Commit Message Generation

Stage your files and use ai commit

git add .
ai commit

Occasionally, the suggested commit message may not be ideal, so you might want to generate several options to choose from. You can produce multiple commit messages simultaneously by using the -g <i> flag, where 'i' specifies the number of messages to generate:

ai commit -g <i> # or -generate <i>
ai commit -g 5 #or --generate 5

You can also set a maximum length for each message (up to 100 characters).


ai commit  -m 100 #or --maxlength 100

Of course, you can also set it up together according to the following:

ai commit -g 5 -m 100 #or --generate 5 --maxlength 100

Additionally, you can use the -t flag to specify the commit message format:

ai commit -t conventional #or --type conventional

Configuration

The Ianai-CLI tool employs a structured settings schema to handle various configuration options. Here’s how to set up and comprehend the settings for the tool.

File Location

The settings are stored in a JSON file located at ~/.ianai-cli/settings.json You can manually edit this file, or run ai --init to set up or update the settings through a guided process.

Settings Schema

The settings schema defines the configuration structure for integrating with various services. Below is the breakdown of each field:

  • endpoint (Optional): A URL string required when using a custom service.

  • model_class (Required): Specifies the model class to use. Example: 'deepseek_code'. This field is mandatory and must be provided.

  • metadata (Optional): Additional metadata information in key-value pair format. Can contain any type of value. This field is embedded directly into the prompt and is intended to allow the ai to remember user information

  • headers (Optional): A record of strings for custom headers in each request. Each entry is a string value.

  • authToken (Required): A string value of the authentication token.

  • commitment (Optional): Customizes the generation of commit messages. Default values are:

    • generate: 1
    • maxlength: 60
    • type:""Defaults to an empty string, if the type is conventional, the submission information will be formatted according to the regular submission specification

Command Syntax

ai config <action> <key> [value]
  • action: Specifies the action to perform. Valid options are get, set, or del.
  • key: The key to operate on.
  • value: The value to set for the key. This field is only required when the action is set.

Examples

  • ai config get all (Get the full Settings)
  • ai config set authToken="...."
  • ai config del authToken

Credit

  • We also credit Hassan and his work on aicommits for inspiring the commit message automation feature in this project.

License

MIT