Introduction
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
Installation
Netero can be installed in several ways depending on your preference:
Using Cargo
Using Nix Flakes
If you use Nix, you can install it with:
Environment Variables
It is configured via environment variables.
Default provider (codestral)
CODE_API_KEYAPI key for the default provider.
Custom provider (OpenAI-compatible)
-
NETERO_URLChat completions endpoint URL. -
NETERO_MODELName of the selected model. -
NETERO_API_KEYOptional API key for the custom provider.
Usage
Usage: netero [OPTIONS] [PROMPT] [COMMAND]
If there is input from stdin, it is added as additional context.
Commands
-
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.
Arguments
[PROMPT]Prompt sent to the model.
Options
-
-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
Interactive Chat
Built-in Commands
-
/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.
Inline Command Execution
You can execute any valid shell command using:
#!(...)
The command output will be attached to the next prompt sent to the model.
Example:
The 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.
Using Paths in Prompts
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.
In chat Mode
Within an interactive session:
You 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.
In Direct Prompt Mode
It also works from the command line:
If ./README.en.md exists, its contents will be automatically included in the context before sending the request to the model.
Behavior
- 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.
Examples
1. Direct prompt
2. Prompt without quotes
3. Using stdin as context
|
4. Analyzing command output
| |
5. Generate commit message from staging
|
6. Generate message with custom convention
7. Verbose mode
8. Inspect sent prompts (debug mode)
Netero runs a debug socket that listens to all prompts sent by running instances.
9. Use custom provider
10. Generate shell autocompletion
11. Start interactive session
12. Execute command inside chat
Within the session:
Analyze this output:
#!(free -h)
License
BSD 2-Clause