-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from yusufcanb/release/1.2
Release/1.2
- Loading branch information
Showing
47 changed files
with
1,323 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,5 @@ go.work | |
.repomix/ | ||
dist/ | ||
.venv/ | ||
.vscode/ | ||
__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,15 @@ | |
[](https://sonarcloud.io/project/overview?id=yusufcanb_tlm) | ||
[](https://github.com/yusufcanb/tlm/releases) | ||
|
||
|
||
tlm is your CLI companion which requires nothing except your workstation. It uses most efficient and powerful open-source models like [Llama 3.3](https://ollama.com/library/llama3.3), [Phi4](https://ollama.com/library/phi4), [DeepSeek-R1](https://ollama.com/library/deepseek-r1), [Qwen](https://ollama.com/library/qwen2.5-coder) of your choice in your local environment to provide you the best possible command line assistance. | ||
|
||
 | ||
|
||
 | ||
|
||
 | ||
| Get a suggestion | Explain a command | | ||
| -------------------------------- | -------------------------------- | | ||
|  |  | | ||
|
||
| Ask with context (One-liner RAG) | Configure your favorite model | | ||
| -------------------------------- | ------------------------------ | | ||
|  |  | | ||
|
||
## Features | ||
|
||
|
@@ -26,6 +26,8 @@ tlm is your CLI companion which requires nothing except your workstation. It use | |
|
||
- 🚀 One liner generation and command explanation. | ||
|
||
- 🖺 No-brainer RAG (Retrieval Augmented Generation) | ||
|
||
- 🧠 Experiment any model. ([Llama3](https://ollama.com/library/llama3.3), [Phi4](https://ollama.com/library/phi4), [DeepSeek-R1](https://ollama.com/library/deepseek-r1), [Qwen](https://ollama.com/library/qwen2.5-coder)) with parameters of your choice. | ||
|
||
## Installation | ||
|
@@ -35,7 +37,7 @@ Installation can be done in two ways; | |
- [Installation script](#installation-script) (recommended) | ||
- [Go Install](#go-install) | ||
|
||
### Installation Script | ||
### Installation Script | ||
|
||
Installation script is the recommended way to install tlm. | ||
It will recognize the which platform and architecture to download and will execute install command for you. | ||
|
@@ -45,23 +47,23 @@ It will recognize the which platform and architecture to download and will execu | |
Download and execute the installation script by using the following command; | ||
|
||
```bash | ||
curl -fsSL https://raw.githubusercontent.com/yusufcanb/tlm/1.2-pre/install.sh | sudo -E bash | ||
curl -fsSL https://raw.githubusercontent.com/yusufcanb/tlm/1.2/install.sh | sudo -E bash | ||
``` | ||
|
||
#### Windows (Powershell 5.5 or higher) | ||
|
||
Download and execute the installation script by using the following command; | ||
|
||
```powershell | ||
Invoke-RestMethod -Uri https://raw.githubusercontent.com/yusufcanb/tlm/1.2-pre/install.ps1 | Invoke-Expression | ||
Invoke-RestMethod -Uri https://raw.githubusercontent.com/yusufcanb/tlm/1.2/install.ps1 | Invoke-Expression | ||
``` | ||
|
||
### Go Install | ||
|
||
If you have Go 1.22 or higher installed on your system, you can easily use the following command to install tlm; | ||
|
||
```bash | ||
go install github.com/yusufcanb/[email protected]-pre | ||
go install github.com/yusufcanb/[email protected] | ||
``` | ||
|
||
You're ready! Check installation by using the following command; | ||
|
@@ -70,6 +72,109 @@ You're ready! Check installation by using the following command; | |
tlm | ||
``` | ||
|
||
## Usage | ||
|
||
``` | ||
$ tlm | ||
NAME: | ||
tlm - terminal copilot, powered by open-source models. | ||
USAGE: | ||
tlm suggest "<prompt>" | ||
tlm s --model=qwen2.5-coder:1.5b --style=stable "<prompt>" | ||
tlm explain "<command>" # explain a command | ||
tlm e --model=llama3.2:1b --style=balanced "<command>" # explain a command with a overrided model | ||
tlm ask "<prompt>" # ask a question | ||
tlm ask --context . --include *.md "<prompt>" # ask a question with a context | ||
VERSION: | ||
1.2 | ||
COMMANDS: | ||
ask, a Asks a question (beta) | ||
suggest, s Suggests a command. | ||
explain, e Explains a command. | ||
config, c Configures language model, style and shell | ||
version, v Prints tlm version. | ||
help, h Shows a list of commands or help for one command | ||
GLOBAL OPTIONS: | ||
--help, -h show help | ||
--version, -v print the version | ||
``` | ||
|
||
### Ask - Ask something with or without context | ||
|
||
Ask a question with context. Here is an example question with a context of this repositories Go files under ask package. | ||
|
||
``` | ||
$ tlm ask --help | ||
NAME: | ||
tlm ask - Asks a question (beta) | ||
USAGE: | ||
tlm ask "<prompt>" # ask a question | ||
tlm ask --context . --include *.md "<prompt>" # ask a question with a context | ||
OPTIONS: | ||
--context value, -c value context directory path | ||
--include value, -i value [ --include value, -i value ] include patterns. e.g. --include=*.txt or --include=*.txt,*.md | ||
--exclude value, -e value [ --exclude value, -e value ] exclude patterns. e.g. --exclude=**/*_test.go or --exclude=*.pyc,*.pyd | ||
--interactive, --it enable interactive chat mode (default: false) | ||
--model value, -m value override the model for command suggestion. (default: qwen2 5-coder:3b) | ||
--help, -h show help | ||
``` | ||
|
||
### Suggest - Get Command by Prompt | ||
|
||
``` | ||
$ tlm suggest --help | ||
NAME: | ||
tlm suggest - Suggests a command. | ||
USAGE: | ||
tlm suggest <prompt> | ||
tlm suggest --model=llama3.2:1b <prompt> | ||
tlm suggest --model=llama3.2:1b --style=<stable|balanced|creative> <prompt> | ||
DESCRIPTION: | ||
suggests a command for given prompt. | ||
COMMANDS: | ||
help, h Shows a list of commands or help for one command | ||
OPTIONS: | ||
--model value, -m value override the model for command suggestion. (default: qwen2.5-coder:3b) | ||
--style value, -s value override the style for command suggestion. (default: balanced) | ||
--help, -h show help | ||
``` | ||
|
||
### Explain - Explain a Command | ||
|
||
``` | ||
$ tlm explain --help | ||
NAME: | ||
tlm explain - Explains a command. | ||
USAGE: | ||
tlm explain <command> | ||
tlm explain --model=llama3.2:1b <command> | ||
tlm explain --model=llama3.2:1b --style=<stable|balanced|creative> <command> | ||
DESCRIPTION: | ||
explains given shell command. | ||
COMMANDS: | ||
help, h Shows a list of commands or help for one command | ||
OPTIONS: | ||
--model value, -m value override the model for command suggestion. (default: qwen2.5-coder:3b) | ||
--style value, -s value override the style for command suggestion. (default: balanced) | ||
--help, -h show help | ||
``` | ||
|
||
## Uninstall | ||
|
||
On Linux and macOS; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.2-pre | ||
1.2 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Output ask.gif | ||
|
||
Set Shell zsh | ||
Set Theme "Cyberdyne" | ||
|
||
Set Width 1200 | ||
Set Height 600 | ||
Set FontSize 22 | ||
|
||
Hide | ||
Type "source ~/.zshrc && clear" | ||
Enter | ||
Hide | ||
|
||
Show | ||
Type "tlm ask --context . --include=pkg/ask/**/*.go 'briefly explain tlm ask command'" | ||
Sleep 500ms | ||
Enter | ||
Sleep 15s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,49 @@ | ||
Output config.gif | ||
|
||
Set Shell zsh | ||
Set Theme "Cyberdyne" | ||
|
||
Set Width 1200 | ||
Set Height 850 | ||
Set FontSize 32 | ||
Set Height 600 | ||
Set FontSize 22 | ||
|
||
Hide | ||
Type "source ~/.zshrc && clear" | ||
Enter | ||
Hide | ||
|
||
Show | ||
Type "tlm config" | ||
Sleep 250ms | ||
Enter | ||
Sleep 2s | ||
|
||
Down | ||
Sleep 500ms | ||
|
||
Down | ||
Sleep 500ms | ||
|
||
Down | ||
Sleep 500ms | ||
Sleep 750ms | ||
|
||
Down | ||
Sleep 750ms | ||
|
||
Down | ||
Sleep 750ms | ||
|
||
Down | ||
Sleep 300ms | ||
|
||
Down | ||
Sleep 300ms | ||
|
||
Down | ||
Sleep 300ms | ||
|
||
Down | ||
Sleep 300ms | ||
|
||
|
||
Sleep 2s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
Output explain.gif | ||
|
||
Set Shell zsh | ||
Set Theme "Cyberdyne" | ||
|
||
Set Width 1200 | ||
Set Height 600 | ||
Set FontSize 32 | ||
Set Height 650 | ||
Set FontSize 22 | ||
|
||
Type 'tlm explain "git rev-list --all | xargs -L1 git grep -l TODO"' | ||
Hide | ||
Type "source ~/.zshrc && clear" | ||
Enter | ||
|
||
Show | ||
Type 'tlm explain "sed -r s/(foo)(bar)/\2\1/; s/\b([a-z]+)\b/\U\1/g; /baz/d\ in > out"' | ||
Sleep 500ms | ||
Enter | ||
Sleep 3s | ||
Sleep 5s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.