Giter VIP home page Giter VIP logo

pet's Introduction

AI-based Command Line Tool

Feature

  1. Chat

  2. Translate

  3. Time Convert

  4. Improve Writing

  5. github trending

Env

  • OPENAI_API_KEY: OpenAi or LLM model key with same format API.

  • OPENAI_BASE_URL: The BaseUrl of Api Endpoint.

  • OPENAI_MODEL: LLM model name.

  • SYSTEM_PROMPT_PATH: Chat system prompt file path.

deepseek example
export OPENAI_API_KEY=$DEEP_SEEK
export OPENAI_BASE_URL=https://api.deepseek.com
export OPENAI_MODEL=deepseek-chat
export CODER_MODEL=deepseek-coder

Alias

.bashrc
alias pet="java -jar ~/.tools/pet.jar"

Command

pet
Usage: pet [-hV] [COMMAND]
pet
  -h, --help      Show this help message and exit.
  -V, --version   Print version information and exit.
Commands:
  chat, ct, ask        A chat cli tool.
  chat-config, cf      About Chat Command config.
  translate, ts        AI Translation Tool
  github-trending, gt  Github Trending.
  time-convert, tc     Convert dates and timestamps between each other.
  improve-writing, iw  Improve Writing.
pet chat
Usage: pet chat [-hVw] [-ct=<chat>] [-f=<file> | -c] <text>
A chat cli tool.
      <text>
  -c, --coder              The model that uses chat coding.
      -ct, --chat=<chat>   Select Or Create a Chat.
  -f, --file=<file>        The file content that chat based on.
  -h, --help               Show this help message and exit.
  -V, --version            Print version information and exit.
  -w, --with-context       Use context.
pet chat-config
Usage: pet chat-config [-hV] (-sp | -cs | -sc=<selectChat> | -dc=<delChat> |
                       -ct)
About Chat Command config.
      -cs, --chats           The chats used.
      -ct, --context         The context chat messages.
      -dc, --del-chat=<delChat>
                             Delete  by chat No.
  -h, --help                 Show this help message and exit.
      -sc, --select-chat=<selectChat>
                             Select by chat No.
      -sp, --system-prompt   The system prompt currently in use.
  -V, --version              Print version information and exit.
pet translate
Usage: pet translate [-hsV] [-l=<lang>] [-o=<outputPath>] (-f=<file> | <text>)
AI Translation Tool
      <text>
  -f, --file=<file>       The file needs to be translated
  -h, --help              Show this help message and exit.
  -l, --language=<lang>   The translate target language.
  -o, --output=<outputPath>
                          Output file path.
  -s, --without-source    Printed without source text.
  -V, --version           Print version information and exit.
pet time-convert
Usage: pet time-convert [-hV] [-z=<timezone>] (-s=<timestamp> | -t=<datetime>)
Convert dates and timestamps to and from each other.
  -h, --help      Show this help message and exit.
  -s, --timestamp=<timestamp>
                  timestamp
  -t, --date-time=<datetime>
                  date time string, yyyy-MM-dd HH:mm:ss
  -V, --version   Print version information and exit.
  -z, --timezone=<timezone>
                  timezone, eg. Asia/Shanghai
pet improve-writing
Usage: pet improve-writing [-hV] <text>
Improve Writing.
      <text>
  -h, --help      Show this help message and exit.
  -V, --version   Print version information and exit.
pet github-trending
Usage: pet github-trending [-hV] [-l=<language>] [-s=<since>]
Github Trending.
  -h, --help            Show this help message and exit.
  -l, --language=<language>
                        eg. kotlin, javascript, java...
  -s, --since=<since>   eg. DAILY WEEKLY MONTHLY
  -V, --version         Print version information and exit.

Build

pet's People

Contributors

vhxnif avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.