Are all senior engineers busy? Ask senior instead!

Overview

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
You might also like...
ask.sh: AI terminal assistant that can read and write your terminal directly!
ask.sh: AI terminal assistant that can read and write your terminal directly!

ask.sh: AI terminal assistant that read from & write to your terminal ask.sh is an AI terminal assistant based on OpenAI APIs such as GPT-3.5/4! What'

Ask questions, get insights from repos
Ask questions, get insights from repos

πŸ• RepoQuery πŸ• A REST service to answer user-queries about public GitHub repositories πŸ”Ž The Project RepoQuery is an early-beta project, that uses re

A CLI tool you can pipe code and then ask for changes, add documentation, etc, using the OpenAI API.
A CLI tool you can pipe code and then ask for changes, add documentation, etc, using the OpenAI API.

AiBro This is your own little coding bro, immersed in the world of AI, crypto, and all other types of over hyped tech trends. You can pipe it code and

Webpack loader for Rust files. DEPRECATED, use WasmPack instead

The project is in low maintance now Use WasmPack instead Webpack Rust loader Webpack loader for Rust Example add.rs #[no_mangle] pub fn add(a: i32, b:

Exploration of using Storage instead of Allocator to parameterize collections in Rust

storage-poc aims at exploring the usage of custom Storages, rather than custom Allocators. Goals This is a Proof-of-Concept aiming at: Demonstrating t

a simple compiled language i made in rust. it uses intermediate representation (IR) instead of an abstract syntax tree (AST).

a simple compiled language i made in rust. it uses intermediate representation (IR) instead of an abstract syntax tree (AST).

A variation of the solana helloworld program example with a client written in Rust instead of Typescript

Simple Solana Smart Contract Example This repository demonstrates how to create and invoke a program on the Solana blockchain. In Solana the word prog

Stack buffer provides alternatives to Buf{Reader,Writer} allocated on the stack instead of the heap.

StackBuf{Reader,Writer} Stack buffer provides alternatives to BufReader and BufWriter allocated on the stack instead of the heap. Its implementation i

TODO pass transform struct instead of trying to modify particles everywhere.

Sparticles RS TODO pass transform struct instead of trying to modify particles everywhere. Roadmap add animations. move particle away if on top of eac

Like a cell, but make lifetimes dynamic instead of ownership

LendingCell is a mutable container that allows you to get an owned reference to the same object. When the owned reference is dropped, ownership return

An alternative to `qcell` and `ghost-cell` that instead uses const generics

Purpose This crate is another attempt at the ghost-cell / qcell saga of cell crates. This provides an alternative to std::cell::RefCell that can allow

A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.
A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.

FileQL - File Query Language FileQL is a tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK. Sampl

ddi  is a wrapper for dd. It takes all the same arguments, and all it really does is call dd in the background
ddi is a wrapper for dd. It takes all the same arguments, and all it really does is call dd in the background

ddi A safer dd Introduction If you ever used dd, the GNU coreutil that lets you copy data from one file to another, then you may have encountered a ty

Proxies all incoming connections to a minecraft server of your choosing, while also logging all ping and login requests to a json file and discord webhook.

minecraft-honeypot Proxies all incoming connections to a minecraft server of your choosing, while also logging all ping and login requests to a json f

Download .crate files of all versions of all crates from crates.io

get-all-crates Download .crate files of all versions of all crates from crates.io. Useful for things like noisy-clippy which need to analyze the sourc

Scan the symbols of all ELF binaries in all Arch Linux packages for usage of malloc_usable_size

Scan the symbols of all ELF binaries in all Arch Linux packages for usage of malloc_usable_size (-D_FORTIFY_SOURCE=3 compatibility)

Find all your TODO notes with one command!

Todo_r Find all your notes with one command! Todo_r is a simple rust command line utility that keeps track of your todo items in code. It is pronounce

gstats β€” command line tool to print a developer handy summary of all git repositories below current directory

gstats Simple Rust tool to get quick summary info on git repos showing latest tag, branch, state. I implemented this to help me work with a the not to

An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.

regex A Rust library for parsing, compiling, and executing regular expressions. Its syntax is similar to Perl-style regular expressions, but lacks a f

Owner
Bruno Rucy Carneiro Alves de Lima
πŸ§™
Bruno Rucy Carneiro Alves de Lima
A Python CLI tool that finds all third-party packages imported into your Python project

python-third-party-imports This is a Python CLI tool built with Rust that finds all third-party packages imported into your Python project. Install Yo

Maksudul Haque 24 Feb 1, 2023
Rye is Armin's personal one-stop-shop for all his Python needs.

Rye Rye is Armin's personal one-stop-shop for all his Python needs. It installs and manages Python installations, manages pyproject.toml files, instal

Armin Ronacher 2.8k Apr 26, 2023
Bongo Copy Cat wants to be involved in everything you do but instead just imitates you hitting your keyboard all day. After all it's just a cat.

Bongo Copy Cat Introduction Bongo Copy Cat wants to be involved in everything you do but instead just imitates you hitting your keyboard all day. Afte

Abhijeet Singh 4 Jan 23, 2023
Engula empowers engineers to build reliable and cost-effective databases.

Engula is a storage engine that empowers engineers to build reliable and cost-effective databases with less effort and more confidence. Engula is in t

Engula 706 Jan 1, 2023
Meet Rustacean GPT, an experimental project transforming OpenAi's GPT into a helpful, autonomous software engineer to support senior developers and simplify coding life! πŸš€πŸ€–πŸ§ 

Rustacean GPT Welcome, fellow coding enthusiasts! ?? ?? I am excited to introduce you to Rustacean GPT, my humble yet ambitious project that aims to t

Gary McDougall 3 May 10, 2023
Achieve it! How you ask? Well, it's pretty simple; just use greatness!

Greatness! Achieve it! How you ask? Well, it's pretty simple; just use greatness! Disclaimer I do not believe that greatness is the best. It fits a me

Isacc Barker (Milo Banks) 107 Sep 28, 2022
The fastest way to identify any mysterious text or analyze strings from a file, just ask `lemmeknow` !

The fastest way to identify anything lemmeknow ⚑ Identify any mysterious text or analyze strings from a file, just ask lemmeknow. lemmeknow can be use

Swanand Mulay 594 Dec 30, 2022
Not the fastest terminal colors library. Don't even ask about size.

TROLOLORS Not the fastest terminal colors library. Don't even ask about size. Why? Don't even try to use it. But maybe you need to say to your boss th

Dmitriy Kovalenko 15 Oct 27, 2021
Ask the Terminal Anything (ATA): ChatGPT in the terminal

ata: Ask the Terminal Anything ChatGPT in the terminal TIP: Run a terminal with this tool in your background and show/hide it with a keypress. This ca

Rik Huijzer 147 Mar 8, 2023
Ask ChatGPT for a shell script, code, or anything, directly from your terminal πŸ€–πŸ§ πŸ‘¨β€πŸ’»

ShellGPT Ask ChatGPT for a shell script, code, or anything, directly from your terminal ?? ?? ??‍?? Demo Install The binary is named gpt when installe

null 4 May 15, 2023