Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

bitranox
Copy link

@bitranox bitranox commented Apr 14, 2025

  • Introduce a comprehensive shell script to install, update, and uninstall sgpt on Ubuntu/Debian systems.
  • Configure key binding (Ctrl+L) for quick access to Shell-GPT functionality.
  • Automatically fetch the latest release from GitHub and handle version comparisons.
  • Patch system-wide shell configuration files (/etc/profile and /etc/bash.bashrc) to integrate sgpt settings.
  • Include command-line options for force installation, uninstallation, and displaying help.

This commit adds robust automation and system integration for Shell-GPT, ensuring a smooth user experience on supported systems.

After installation, sgpt can be used with different presets defined in a user-specific configuration file. Each preset can include:

  • Custom API endpoint (e.g., OpenAI, OpenRouter),
  • Model name (e.g., gpt-4.1-mini, claude-3.7-sonnet),
  • User-specific API key,
  • Additional flags (e.g., for streaming, long context).

This allows every user on the system to define and use their own AI setup — with complete flexibility over providers, models, context lengths, and access keys.

▶️ Installation

# install or update to the latest sgpt
sudo python3 install-sgpt-pkg.py [OPTION]

Options:

Option Description
--help Show usage instructions
--force-install Force installation of the latest version
--uninstall Uninstall sgpt and remove all configuration and integration files

🛡️ Security Notes

  • File permissions are set strictly (chmod 0600 for config, 0755 for scripts)
  • No default API keys included
  • User is prompted to edit the config manually
  • config survives updates and new installations
  • environment is not bloated with keys
  • every user on the system can have a different configuration

After install You might login into a new terminal and use :

# Input:
show all files > 8kB <cntrl-L>
# Output :
find . -type f -size +8k
# which You can exec just by pressing enter

# using a preset configuration (otherwise preset "default" is used.
sgpt -p mini "what is the mass of the sun"
sgpt -p claude "what is the mass of the sun"

- Introduce a comprehensive shell script to install, update, and uninstall sgpt on Ubuntu/Debian systems.
- Configure key binding (Ctrl+L) for quick access to Shell-GPT functionality.
- Automatically fetch the latest release from GitHub and handle version comparisons.
- Set up API key management by reading from a specified source and saving to a secure location.
- Patch system-wide shell configuration files (/etc/profile and /etc/bash.bashrc) to integrate sgpt settings.
- Include command-line options for force installation, uninstallation, and displaying help.

This commit adds robust automation and system integration for Shell-GPT, ensuring a smooth user experience on supported systems.
@bitranox bitranox requested a review from tbckr as a code owner April 14, 2025 20:22
@bitranox bitranox changed the title feat: add sgpt-ubuntu-debian-setup.sh script feat: add install-sgpt-pkg.sh script - with keybindings, auto-update, uninstaller Apr 15, 2025
bitranox and others added 25 commits April 15, 2025 11:12
new version for profile managment
new version for profile managment
merge latest commits
update from head repo
The .gitignore file has been completely refactored to improve clarity and coverage. Entries are now categorized by IDEs, Python bytecode, build artifacts, virtual environments, project-specific files, and OS-specific files. This update ensures better exclusion of development-related files and improves consistency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant