[NAACL 2025] LLM-Supported Natural Language to Bash Translation
See the codeThis repository contains code for the 2025 NAACL paper:
LLM-Supported Natural Language to Bash Translation
TLDR: Large language models (LLMs) are unreliable at translating natural language to Bash commands (NL2SH). We present methods to measure and improve the NL2SH performance of LLMs.
curl -fsSL https://ollama.com/install.sh | sh
ollama pull westenfelder/NL2SH
nlsh() {
local prompt="$1"
curl -s localhost:11434/api/generate -d "{\"model\": \"westenfelder/NL2SH\", \"prompt\": \"$prompt\", \"stream\": false}" | jq -r '.response'
}
nlsh "ping localhost with 1 packet"
Note: Our code has only been tested on Ubuntu 20.04 with Python 3.10 and PyTorch 2.6.0+cu124.
curl -fsSL https://ollama.com/install.sh | sh
ollama pull mxbai-embed-large
python3 -m venv nl2sh_venv
source nl2sh_venv/bin/activate
pip install -r requirements.txt
python3 -m ipykernel install --user --name=nl2sh_venv --display-name="nl2sh_venv"
Our datasets, benchmark code, and fine-tuned models are available at these links:
If you find our work helpful, please cite:
@inproceedings{westenfelder-etal-2025-llm,
title = "{LLM}-Supported Natural Language to Bash Translation",
author = "Westenfelder, Finnian and
Hemberg, Erik and
Moskal, Stephen and
O{'}Reilly, Una-May and
Chiricescu, Silviu",
editor = "Chiruzzo, Luis and
Ritter, Alan and
Wang, Lu",
booktitle = "Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers)",
month = apr,
year = "2025",
address = "Albuquerque, New Mexico",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2025.naacl-long.555/",
pages = "11135--11147",
ISBN = "979-8-89176-189-6"
}
116 followers · starred Sep 2026
[NAACL 2025] LLM-Supported Natural Language to Bash Translation
See the codeThis repository contains code for the 2025 NAACL paper:
LLM-Supported Natural Language to Bash Translation
TLDR: Large language models (LLMs) are unreliable at translating natural language to Bash commands (NL2SH). We present methods to measure and improve the NL2SH performance of LLMs.
curl -fsSL https://ollama.com/install.sh | sh
ollama pull westenfelder/NL2SH
nlsh() {
local prompt="$1"
curl -s localhost:11434/api/generate -d "{\"model\": \"westenfelder/NL2SH\", \"prompt\": \"$prompt\", \"stream\": false}" | jq -r '.response'
}
nlsh "ping localhost with 1 packet"
Note: Our code has only been tested on Ubuntu 20.04 with Python 3.10 and PyTorch 2.6.0+cu124.
curl -fsSL https://ollama.com/install.sh | sh
ollama pull mxbai-embed-large
python3 -m venv nl2sh_venv
source nl2sh_venv/bin/activate
pip install -r requirements.txt
python3 -m ipykernel install --user --name=nl2sh_venv --display-name="nl2sh_venv"
Our datasets, benchmark code, and fine-tuned models are available at these links:
If you find our work helpful, please cite:
@inproceedings{westenfelder-etal-2025-llm,
title = "{LLM}-Supported Natural Language to Bash Translation",
author = "Westenfelder, Finnian and
Hemberg, Erik and
Moskal, Stephen and
O{'}Reilly, Una-May and
Chiricescu, Silviu",
editor = "Chiruzzo, Luis and
Ritter, Alan and
Wang, Lu",
booktitle = "Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers)",
month = apr,
year = "2025",
address = "Albuquerque, New Mexico",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2025.naacl-long.555/",
pages = "11135--11147",
ISBN = "979-8-89176-189-6"
}
116 followers · starred Sep 2026