Difference between revisions of "Linux shell/Productivity tools"
Jump to navigation
Jump to search
(→direnv) |
(→direnv) |
||
| Line 40: | Line 40: | ||
# (e.g., export DB_HOST=localhost), and then run the following command to authorize it: | # (e.g., export DB_HOST=localhost), and then run the following command to authorize it: | ||
direnv allow . | direnv allow . | ||
</source> | |||
= [https://github.com/sst/opencode Opencode] = | = [https://github.com/sst/opencode Opencode] = | ||
<source lang="bash" | <source lang="bash"> | ||
# Install Official via bash pipe | # Install Official via bash pipe | ||
curl -fsSL https://opencode.ai/install | bash | curl -fsSL https://opencode.ai/install | bash | ||
Revision as of 07:19, 3 December 2025
Autojump
https://github.com/wting/autojump#manual sudo apt-get install autojump cat /usr/share/doc/autojump/README.Debian Autojump for Debian ------------------- To use autojump, you need to configure you shell to source /usr/share/autojump/autojump.sh on startup. If you use Bash, add the following line to your ~/.bashrc (for non-login interactive shells) and your ~/.bash_profile (for login shells): . /usr/share/autojump/autojump.sh If you use Zsh, add the following line to your ~/.zshrc (for all interactive shells): . /usr/share/autojump/autojump.sh # Usage j -s # display statistics j foo # Jump To A Directory That Contains foo. It takes multiple arguments to do fuzzy search jc bar # jump to a child directory (sub-directory of current directory) rather than typing out the full name jo music # Open File Manager To Directories (instead of jumping) jco images # Opening a file manager to a child directory is also supported
direnv
# Install direnv Package sudo apt install direnv # Hook direnv into Your Shell to load direnv every time it starts echo 'eval "$(direnv hook bash)"' >> ~/.bashrc source ~/.bashrc # To start using it in a project, navigate to a directory, create a file named .envrc with your environment variables # (e.g., export DB_HOST=localhost), and then run the following command to authorize it: direnv allow .
Opencode
# Install Official via bash pipe
curl -fsSL https://opencode.ai/install | bash
# Installs in ~/.opencode and adds <code>export PATH=/home/vagrant/.opencode/bin:$PATH</code> to the bottom of ~/.bashrc
tree ~/.opencode/
/home/vagrant/.opencode/
└── bin
└── opencode
# Upgrade
opencode upgrade
# Uninstall
delete .opencode and .opencode.json
# Install opencode via Githib Releases
VERSION=$(curl --silent "https://api.github.com/repos/sst/opencode/releases/latest" | jq -r .tag_name); echo $VERSION
TEMPDIR=$(mktemp -d)
curl -L https://github.com/sst/opencode/releases/download/${VERSION}/opencode-linux-x64.tar.gz -o $TEMPDIR/opencode-linux-x64.tar.gz
tar xzf $TEMPDIR/opencode-linux-x64.tar.gz -C $TEMPDIR
sudo install $TEMPDIR/opencode /usr/local/bin/opencode
# Usage
opencode version