Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPTCli

This is the project to get hands-on experience with AI-agents and all AI-hype around.

The first intent is to get a handy tool to get familiarity with new projects and to navigate quickly within source, describe code, ask to refactor and/or add some things.

The whole thing should allow easy integration with my neovim setup (which is quite few steps from vanilla).

Plans to support: C, C++, Rust, Python, Javascript/Typescript, Lua, POSIX sh.

This is my learning, side project, please do not expect any production-ready features.

Building

Quite straight-forward:

$ cargo build --release
$ cp target/release/gptcli $HOME/.local/bin

Copy compiled binary to whatever other place where you store your bins.

Prerequisites

gptcli depends on Universal Tags invokable via ctags binary.

This is what available on Debian sid:

$ ctags --version
Universal Ctags 5.9.0, Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Aug 14 2025, 14:32:33
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc, +optscript

Usage

You need to obtain OpenAI API key. Export as OPENAI_API_KEY environment variable, or write to .evn file:

OPENAI_API_KEY=sk-proj-zQPR_....

Navigate to your project and call

$ gptcli init

It will try to determine project root and save settings in .gptcli folder.

Next call

$ gptcli scan
$ gptcli index

These commands scan files in directory and build tags index.

Next, run summarize to produce facts:

$ gptcli summarize > summarize.txt

To generate human-readable summary of a project call:

$ gpt summarize --llm

Check tunable parameters:

$ gpt summarize --help
Сгенерировать секционный обзор проекта для LLM

Usage: gptcli summarize [OPTIONS]

Options:
      --llm
      --model <MODEL>              [default: gpt-4.1-mini]
      --max-output <MAX_OUTPUT>    [default: 1200]
      --system-file <SYSTEM_FILE>
      --facts <FACTS>              [default: summarize.txt]
  -h, --help                       Print help

OpenAI attribution

Substantial part of this project is generated by OpenAI.

About

CLI tool to integrate GPT into my workflow

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages