Netero 🫶 is a CLI for LLMs, oriented toward advanced GNU/Linux users. It runs from the command line, integrates into pipelines, and offers a minimal chat with command expansion.
The more skilled you are with shells, the more you will get out of this tool.
Also in Spanish: View README in Spanish
Netero can be installed in several ways depending on your preference:
cargo install neteroIf you use Nix, you can install it with:
nix profile add github:hashbangcore/neteroIt is configured via environment variables.
CODE_API_KEYAPI key for the default provider.
-
NETERO_URLChat completions endpoint URL. -
NETERO_MODELName of the selected model. -
NETERO_API_KEYOptional API key for the custom provider.
Usage: netero [OPTIONS] [PROMPT] [COMMAND]
If there is input from stdin, it is added as additional context.
-
chatOpens a minimal chat session. -
commitGenerates a commit message from staged changes. -
completionGenerates shell autocompletion scripts. -
promptSends a prompt to the model and displays the response.
[PROMPT]Prompt sent to the model.
-
-v, --verboseEnables verbose output. -
-t, --traceShows the prompts sent and the responses received (debug mode). -
-h, --helpDisplays help. -
-V, --versionDisplays the version.
You can use the --trace option to inspect the prompts being sent:
netero --trace
-
/helpDisplays help. -
/cleanClears chat history. -
/addAttaches files to the context. -
/transTranslates text. -
/evalEvaluates an arithmetic expression. -
/saveSaves the user request to a file. -
/streamEnables or disables streaming mode in the model response.
You can execute any valid shell command using:
#!(...)
The command output will be attached to the next prompt sent to the model.
Example:
➜ #!(sudo nmap scanme.nmap.org) analyzeThe generated prompt would be similar to:
:: END CHAT HISTORY (SYSTEM) ::
:: COMMAND OUTPUT (SYSTEM) ::
[section]
[command]
sudo nmap scanme.nmap.org
[stdout]
...
[end section]
:: END COMMAND OUTPUT (SYSTEM) ::
:: USER MESSAGE ::
analyze
:: END USER MESSAGE ::
:: RESPONSE ::
The command `sudo nmap scanme.nmap.org` completed a successful scan of the host `scanme.nmap.org` (IPv4: 45.33.32.156, IPv6: 2600:3c01::f03c:91ff:fe18:bb2f). Four open ports and one filtered port were detected:
- **Open ports**:
- 22/tcp (SSH)
- 80/tcp (HTTP)
- 9929/tcp (nping-echo)
- 31337/tcp (Elite)
- **Filtered port**:
- 646/tcp (LDP)
The scan took 4.89 seconds. No critical errors were found.
âš Commands are executed in the user's shell without sandboxing.
Netero automatically detects absolute and relative paths in the prompt.
Any word that:
- Starts with
/(absolute path) - Starts with
./or../(relative path) - And corresponds to an existing file
will be interpreted as a valid path and its contents will be automatically attached to the context sent to the model.
No special commands are required.
Within an interactive session:
netero chatYou can write:
Review this file and suggest improvements: ./src/main.rs
If ./src/main.rs exists and is a file, its contents will be automatically attached to the prompt.
It also works from the command line:
netero "Translate this file ./README.en.md"If ./README.en.md exists, its contents will be automatically included in the context before sending the request to the model.
- Only existing files are attached.
- Directories are not attached.
- Multiple paths can be included in the same prompt.
- Paths are resolved from the current directory.
netero "Explain how io_uring works in Linux"netero Explain the ownership model in Rustcat Cargo.toml | netero "Describe the main dependencies"dmesg | tail -n 50 | netero "Are there any relevant errors in these logs?"netero commit | git commit -F -netero commit -c .repo/convencion.txtnetero -v "Explain what a mutex is in Rust"Netero runs a debug socket that listens to all prompts sent by running instances.
netero --traceexport NETERO_URL="https://api.example.com/v1/chat/completions"
export NETERO_MODEL="my-model"
export NETERO_API_KEY="your-api-key"
netero "Describe the CFS scheduling algorithm"netero completion bashnetero chatWithin the session:
Analyze this output:
#!(free -h)
BSD 2-Clause