Skip to content

Commit a4c05cf

Browse files
committed
Add README, update default port number
1 parent 4c7197f commit a4c05cf

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)