https://github.com/brurucy/senior

Are all senior engineers busy? Ask senior instead!

https://github.com/brurucy/senior

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Are all senior engineers busy? Ask senior instead!

Basic Info
  • Host: GitHub
  • Owner: brurucy
  • License: mit
  • Language: Rust
  • Default Branch: master
  • Homepage:
  • Size: 1.4 MB
Statistics
  • Stars: 9
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created almost 3 years ago · Last pushed almost 3 years ago
Metadata Files
Readme License

README.md

Senior

crates.io docs

Are all senior engineers busy? Ask senior instead!

demo

How to install

Requires: - openssl - a openAI api token - rust

cargo install senior

or

brew install brurucy/homebrew-senior/senior

Intro

Senior uses LLMs(at the moment only openAI ones however) and an advance source code parsing library, tree-sitter, to, from the comfort of your terminal, suggest improvements to your code.

As an argument to the cli, you can give:

  1. A path to a file
  2. A path to a file alongside a function name
  3. A path to a file with a class/struct/parent element and a function name

In return, you will be prompted with an improved version. If you accept it, by pressing y, then the original file will be overwritten with the suggestion.

The only requirement is that you must have an environment variable named OPENAI_API_KEY with your very own token.

Language support

| Language | Whole File | Function | Method | Limitations | |------------|------------|----------|--------|-----------------------------------------------------------------------------------------------------------------------------------------| | Rust | X | X | X | | | Go | X | X | X | Untested with Generics. Most likely works. | | Javascript | X | X | X | Does not work with functions inside object literals
nor anonymous functions declared inside classes (you shouldn't do that anyways) | | Typescript | X | X | X | Does not work with functions inside object literals
nor anonymous functions declared inside classes (you shouldn't do that anyways) |

Contributing

In case you would like to either improve support for a language, or add one altogether, do not worry, as I've written senior in such a way that it should be pretty easy to do so. First, fork it, then, add a new language under supported_languages and follow what has been done for the other languages.

Roadmap

  1. Leverage tree-sitter's capabilities to create a code context. For instance, if method A of class X is to be optimised, and there are other function or method calls inside A, then provide class X, and all constituent functions inside A as a context.
  2. Java and Python support

Owner

  • Name: Bruno Rucy Carneiro Alves de Lima
  • Login: brurucy
  • Kind: user
  • Location: Tartu

🧙

GitHub Events

Total
Last Year

Packages

  • Total packages: 2
  • Total downloads:
    • cargo 2,978 total
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 5
  • Total maintainers: 1
proxy.golang.org: github.com/brurucy/senior
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.0%
Average: 9.5%
Dependent repos count: 10.1%
Last synced: 11 months ago
crates.io: senior

A cli that summons an llm suggest improvements to given code

  • Documentation: https://docs.rs/senior/
  • License: Apache-2.0 OR MIT
  • Latest release: 0.2.5
    published about 4 years ago
  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 2,978 Total
Rankings
Dependent repos count: 7.3%
Dependent packages count: 35.9%
Average: 47.6%
Downloads: 99.5%
Maintainers (1)
Last synced: 11 months ago

Dependencies

Cargo.toml cargo