This guide will help you set up and run the Foxhole CLI on your local machine.
- Python 3.7 or higher
- pip (Python package installer)
-
Clone the repository:
git clone https://github.com/your-repo/foxhole.git cd foxhole
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
-
-
Install the required packages:
pip install -r cli/requirements.txt
- Open
cli/config.py
and update theAPI_URL
andWEBSOCKET_HOST
if your Foxhole Backend API is running on a different host or port.
-
Ensure your Foxhole Backend API is running.
-
From the root directory of the project, run:
python -m main.py
-
You should see the Foxhole CLI welcome message. the
help
command to see available commands.
- Register a new account: Choose the "Sign up" option and enter a screen name.
- Login: Use the "Login" option and enter your user secret.
- Send a broadcast message: Use the "Send broadcast message" option.
- Send a direct message: Use the "Send personal message" option and provide the recipient's user ID.
- View your profile: Select the "View profile" option.
- Update your profile: Choose the "Edit profile" option to update your screen name.
- Upload a file: Use the "Upload" option and provide the file path.
- List files: Select the "List" option to see files on the server.
- Download a file: Use the "Download" option and specify the file name.
- Logout: Choose the "Exit" option to log out and close the CLI.
The CLI supports saving and resuming sessions. When you log in or register, you'll be asked if you want to save the session. On subsequent runs, you can choose to resume your last session.
- If you encounter connection issues, ensure that the Foxhole Backend API is running and that the
API_URL
andWEBSOCKET_HOST
inconfig.py
are correct. - For any other issues, check the error messages displayed in the CLI for guidance.
Enjoy using Foxhole CLI!