siliconlad / aish Goto Github PK
View Code? Open in Web Editor NEWA terminal shell built with AI at the core
A terminal shell built with AI at the core
Blocked by #29
From the Bash Reference Manual:
Commands separated by a ‘;’ are executed sequentially; the shell waits for each command to terminate in turn. The return status is the exit status of the last command executed.
From the Bash Reference Manual:
If a word begins with an unquoted tilde character (‘~’), all of the characters up to the first unquoted slash (or all characters, if there is no unquoted slash) are considered a tilde-prefix.
See all examples in the Tilde Expansion section.
An example would be easiest to understand:
$ echo a{d,c,b}e
ade ace abe
From the Bash Reference Manual:
An AND list has the form
command1 && command2
command2
is executed if, and only if,command1
returns an exit status of zero (success).
From the Bash Reference Manual:
A parameter is set if it has been assigned a value. The null string is a valid value. Once a variable is set, it may be unset only by using the unset builtin command.
A variable may be assigned to by a statement of the formname=[value]
Create a shell which takes input but doesn't do anything with it.
We want to add an LLM to the shell.
For now, I think it makes most sense to just use one of the hosted models from OpenAI/Anthropic. We can move to a local LLM later on once we've figured out the interface to the LLM. I have some credits in my OpenAI account that I'm happy to use for this, so just ask me for an API key.
I think the interaction that makes the most sense is the prompt surrounded in quotes
"This is a prompt that goes to the LLM"
Then this can be used like
git diff | "Generate commit message"
or
ls | "Output names of all .deb files"
or (when #7 is done)
"Summarise file" < file.txt
Resources:
From the Bash Reference Manual:
An OR list has the form
command1 || command2
command2
is executed if, and only if,command1
returns a non-zero exit status.
The cd command must be built into the shell.
Useful for quotes.
Would be good to get our LLM to write suggestive commands to run in the input prompt without actually running it so that the user has final say on whether to run it or not.
> git diff | "Write a commit message"
...LLM runs and returns the following command:
> git commit -m "<LLM generated response>"
We need to do this to support various more fancy stuff like history search.
Rust already has several crates for this like: rustyline
Configuration:
#52 added history, but perhaps we want to persist it across sessions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.