Skip to content

Commit c9cac39

Browse files
authored
Update README.md
Added necessary changes for debugging
1 parent 2154cbd commit c9cac39

1 file changed

Lines changed: 40 additions & 28 deletions

File tree

README.md

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,31 @@ SnapShell is a powerful command-line utility designed to enhance your Linux term
44

55
## Features
66

7-
- **Smart Auto-completion**: Get AI-powered command suggestions based on what you're typing.
7+
- **Informed Sugestion**: Get AI-powered command suggestions based on the query and your system's installed packages.
88
- **Command History**: Review previously suggested commands at any time.
99
- **History Management**: Clear the command history with a single command.
1010
- **Database Update**: Easily update the database with the installed packages on your system.
1111

1212
## Installation
1313

1414
### Prerequisites
15+
1516
- Python 3.7 or higher
1617
- `pip` package manager
1718

18-
### Installing via pip
19+
### Installing via pip
20+
1921
Install SnapShell with the following command:
2022

2123
```sh
2224
pip install snapshell
2325
```
26+
2427
### Custom Installation
28+
2529
SnapShell requires your Groq Api key during installation. Follow the on-screen instructions after installation
2630

27-
The installation will automatically detect your shell (bash, zsh, fish) and set the key in the respective configuration file.
31+
The installation will automatically store the key in `~/.snapshell_config.json` file.
2832

2933
OR
3034

@@ -36,6 +40,7 @@ source env/bin/activate
3640
pip install -r requirements.txt
3741
python setup.py install
3842
```
43+
3944
## Dependencies
4045

4146
SnapShell requires the following libraries:
@@ -45,23 +50,11 @@ SnapShell requires the following libraries:
4550
- `os`: To interact with your operating system.
4651

4752
## Configuration Instructions
48-
To use SnapShell, you need to set up the `HELPER_GROQ_API_KEY` environment variable. This is required for connecting to the underlying Language Model API.
49-
### Setting the `HELPER_GROQ_API_KEY`
50-
1. Obtain your API key from the GROQ service.
51-
1. Set it as an environment variable:
52-
```sh
53-
export HELPER_GROQ_API_KEY="your_api_key_here"
54-
```
55-
Alternatively, you can add this to your shell's configuration file (`.bashrc`, `.zshrc`, etc.):
56-
```sh
57-
echo 'export HELPER_GROQ_API_KEY="your_api_key_here"' >> ~/.bashrc
58-
```
59-
Reload the shell configuration:
60-
```sh
61-
source ~/.bashrc
62-
```
6353

64-
## Usage
54+
To use SnapShell, you need to provide `GROQ_API_KEY` when prompted for the first time.
55+
For any changes in the key you can edit `~/.snapshell_config.json` file and add the appropriate key.
56+
57+
## Usage
6558

6659
Run SnapShell in your terminal using:
6760

@@ -84,12 +77,13 @@ snapshell --update-db
8477
snapshell --view-history
8578
snapshell --clear-history
8679
```
80+
8781
## Advanced Usage
88-
You can chain arguments or integrate SnapShell with other terminal utilities for more advanced operations. Here's an example:
89-
```sh
90-
snapshell --update-db | grep "package-name"
91-
```
82+
83+
SnapShell is intuitive and primitive to use. It suggests commands based on your input and maintains a history of suggestions. You can view or clear the command history at any time.
84+
9285
## How It Works
86+
9387
SnapShell leverages a Language Learning Model to suggest relevant Linux commands based on user input. It keeps a local history of suggestions that can be reviewed or cleared at your discretion. Upon installation, SnapShell can update its internal database with packages installed on your system, ensuring up-to-date suggestions.
9488

9589
## Functions
@@ -99,42 +93,57 @@ SnapShell leverages a Language Learning Model to suggest relevant Linux commands
9993
- `main()`: The primary function that handles user input, command-line arguments, and interaction.
10094

10195
## API Documentation
96+
10297
SnapShell does not directly expose API endpoints, but it interacts with the GROQ API under the hood. Here’s a brief overview:
98+
10399
- **GROQ API Key**: Used to authenticate the SnapShell tool.
104100
- **Command Suggestions**: SnapShell queries the GROQ API with the user's input to retrieve command suggestions in real-time.
105-
If the project exposes new APIs in the future, detailed endpoint documentation should be added here.
101+
If the project exposes new APIs in the future, detailed endpoint documentation should be added here.
106102

107103
## Contributing
108104

109-
We welcome contributions! If you'd like to contribute, please follow these steps:
105+
We welcome contributions! If you'd like to contribute, please follow these steps:
106+
110107
1. **Fork the repository**:Click the "Fork" button at the top of the GitHub repository page.
111108
1. **Create a branch**: Create a new feature or bugfix branch.
109+
112110
```sh
113111
git checkout -b feature/new-feature
114112
```
113+
115114
3. **Code Style**: Follow PEP 8 guidelines for Python code.
116115
4. **Testing**: Ensure your code passes all existing tests and add new tests if necessary.
117116
5. **Submit a Pull Request**: Once your changes are ready, submit a pull request for review.
118117

119118
We currently need help to integrate SnapShell with more shells and support more platforms like windows.
120119

121120
## Troubleshooting
121+
122122
### Common Issues
123+
123124
1. **Installation Errors**: Ensure that you have the correct version of Python and pip installed. If dependencies fail to install, try updating pip:
125+
124126
```sh
125127
pip install --upgrade pip
126128
```
127-
2. **Missing GROQ_API_KEY**: If SnapShell is not functioning properly, make sure the `HELPER_GROQ_API_KEY` is correctly set as an environment variable. You can check this by running:
129+
130+
1. **Missing GROQ_API_KEY**: If SnapShell is not functioning properly, make sure the api-key is correctly set in config. You can check this by running:
131+
128132
```sh
129-
echo $HELPER_GROQ_API_KEY
133+
cat ~/.snapshell_config.json
130134
```
135+
131136
3. **Permission Denied**: If you encounter a "permission denied" error, try running the command with `sudo` or ensure you have the necessary file permissions.
132137
4. **Clearing History Not Working**: If the history isn’t clearing, you might need to manually reset the SQLite database file used by SnapShell:
138+
133139
```sh
134-
rm ~/.snapshell/history.db
140+
rm ~/.snapshell/system_info.db
135141
```
142+
136143
If you encounter other issues, feel free to open an issue in the GitHub repository or contact us.
144+
137145
## License
146+
138147
SnapShell is licensed under the MIT License. For more details, see the LICENSE file.
139148

140149
## Contact
@@ -143,3 +152,6 @@ For any questions, issues, or feature requests, please reach out to:
143152

144153
**Krishnatejaswi S**
145154
[shentharkrishnatejaswi@gmail.com](mailto:shentharkrishnatejaswi@gmail.com)
155+
156+
## Contributors
157+
- [Nihaal SP](https://github.com/nerdylelouch)

0 commit comments

Comments
 (0)