Skip to content

Commit cba44b9

Browse files
committed
feat: improve README installation instructions with go install option, separate run commands for bot/API, and update Discord guild variable.
1 parent 377ebfd commit cba44b9

1 file changed

Lines changed: 28 additions & 13 deletions

File tree

README.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,43 +24,58 @@ Ensure you have the following installed on your host or Docker environment:
2424

2525
## Installation & Setup
2626

27+
There are two primary ways to install and run AutoAR:
28+
29+
### Option 1: Quick Install using `go install`
30+
Because the main executable is located in the `cmd/autoar` directory, you cannot simply run `go install github.com/h0tak88r/AutoAR@latest`. Instead, you must point directly to the binary package:
31+
32+
```bash
33+
go install github.com/h0tak88r/AutoAR/cmd/autoar@latest
34+
```
35+
*Note: This will install the `autoar` binary to your `$GOPATH/bin` directory (typically `~/go/bin`). Make sure this directory is in your system `$PATH`.*
36+
37+
### Option 2: Clone and Build manually (Recommended)
2738
1. **Clone the Repository:**
2839
```bash
2940
git clone https://github.com/h0tak88r/AutoAR.git
3041
cd AutoAR
3142
```
3243

33-
2. **Database Initialization:**
44+
2. **Download Dependencies and Build:**
45+
```bash
46+
go mod tidy
47+
go build -o autoar ./cmd/autoar
48+
```
49+
50+
3. **Database Initialization:**
3451
AutoAR uses PostgreSQL or SQLite (depending on your `.env`).
3552
```bash
3653
# Create new-results directory to store findings
3754
mkdir -p new-results
3855
```
3956

40-
3. **Configure the Environment (`.env` file):**
57+
4. **Configure the Environment (`.env` file):**
4158
Copy the provided `.env.example` or tailor your `.env` in the root directory. AutoAR relies strictly on these environment variables:
4259

4360
- **DISCORD_BOT_TOKEN**: Your Discord Bot Token (Bot must have `applications.commands` and standard message intents).
44-
- **DISCORD_ALLOWED_GUILD_ID**: Restricts the bot exclusively to your own Guild (Server) ID.
61+
- **DISCORD_ALLOWED_GUILD**: Restricts the bot exclusively to your own Guild (Server) Name.
4562
- **DB_TYPE**: `postgresql` or `sqlite3`
4663
- **DB_HOST**: Your connection URI or sqlite path.
4764
- **OPENROUTER_API_KEY** / **GEMINI_API_KEY**: API key for your AI Analysis features.
4865
- **AUTOAR_RESULTS_DIR**: Set to `./new-results` or `/app/new-results` if running via Docker.
4966
- **Additional Integrations**: Shodan, Censys, VirusTotal, R2 Storage IDs as needed in `.env`.
5067

51-
4. **Build the Bot:**
52-
```bash
53-
# Download go modules
54-
go mod tidy
55-
56-
# Build the main AutoAR executable
57-
go build -o autoar ./cmd/autoar
58-
```
59-
60-
5. **Run the Bot:**
68+
5. **Run the Bot or API:**
6169
Run the bot natively, ensuring `.env` is loaded automatically:
6270
```bash
71+
# Start the Discord Bot
6372
./autoar bot
73+
74+
# Or start the REST API
75+
./autoar api
76+
77+
# Or start both simultaneously
78+
./autoar both
6479
```
6580

6681
## Troubleshooting

0 commit comments

Comments
 (0)