File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed
Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 1+ # Bash Script Tools
2+
3+ A web-based bash script formatter and linter with AI-powered autofix.
4+
5+ ## Features
6+
7+ - ** Format** : Format bash scripts using ` shfmt `
8+ - ** Lint** : Check scripts with ` shellcheck `
9+ - ** Autofix** : Apply shellcheck's automatic fixes
10+ - ** Autofix (AI)** : Fix shellcheck issues using AI (Groq)
11+
12+ ## Requirements
13+
14+ - Go 1.16+
15+ - ` shfmt ` - [ github.com/mvdan/sh] ( https://github.com/mvdan/sh )
16+ - ` shellcheck ` - [ github.com/koalaman/shellcheck] ( https://github.com/koalaman/shellcheck )
17+
18+ ## Usage
19+
20+ ``` bash
21+ # Basic usage
22+ ./bash-script-tools
23+
24+ # With AI autofix (optional)
25+ export GROQ_API_KEY=" your-api-key"
26+ ./bash-script-tools
27+
28+ # Custom configuration
29+ export PORT=8085
30+ export GROQ_MODEL_ID=" openai/gpt-oss-120b"
31+ export SHFMT_PATH=" /custom/path/to/shfmt"
32+ export SHELLCHECK_PATH=" /custom/path/to/shellcheck"
33+ ./bash-script-tools
34+ ```
35+
36+ Open http://localhost:8085 in your browser.
37+
38+ ## License
39+
40+ MIT
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ func main() {
6060 http .HandleFunc ("/autofix" , handleAutofix )
6161 http .HandleFunc ("/autofix-ai" , handleAutofixAI )
6262
63- port := getEnvOrDefault ("PORT" , "8080 " )
63+ port := getEnvOrDefault ("PORT" , "8085 " )
6464 log .Printf ("Server starting on http://localhost:%s" , port )
6565 log .Printf ("Using shfmt: %s" , shfmtPath )
6666 log .Printf ("Using shellcheck: %s" , shellcheckPath )
You can’t perform that action at this time.
0 commit comments