Difference between revisions of "Linux shell/Productivity tools"
Jump to navigation
Jump to search
(→direnv) |
|||
| (5 intermediate revisions by the same user not shown) | |||
| Line 67: | Line 67: | ||
sudo install $TEMPDIR/opencode /usr/local/bin/opencode | sudo install $TEMPDIR/opencode /usr/local/bin/opencode | ||
# | # Version | ||
opencode version | opencode version | ||
</source> | |||
Connect to paid Github subscription, <code>opencode auth login</code> choose github copilot (public) - don't worry. Follow the process and It will get you to log in to your account covered by the privacy subscription. | |||
<source lang="bash"> | |||
opencode auth login | |||
# Create ~/.config/opencode/opencode.json | |||
cat > ~/.config/opencode/opencode.json <<'EOL' | |||
{ | |||
"disabled_providers": [ | |||
"openai", | |||
"opencode", | |||
"anthropic", | |||
"google", | |||
"groq", | |||
"mistral" | |||
], | |||
"model": "github-copilot/claude-opus-4.5", | |||
"permission": { | |||
"webfetch": "ask" | |||
}, | |||
"instructions": [ | |||
"~/.config/opencode/GLOBAL_RULES.md" | |||
], | |||
"$schema": "https://opencode.ai/config.json" | |||
} | |||
EOL | |||
# create ~/.config/opencode/GLOBAL_RULES.md | |||
cat > ~/.config/opencode/GLOBAL_RULES.md <<EOL | |||
# SECURITY & PRIVACY PROTOCOL | |||
1. **NO SECRETS:** You are STRICTLY FORBIDDEN from outputting, printing, or repeating any API keys, passwords, credentials, or secrets found in code or logs. | |||
2. **REDACTION:** If you must reference a line of code containing a secret, you must replace the secret with <REDACTED>. | |||
3. **MOCK DATA:** When generating code examples or tests, always use dummy data (e.g., "example_key_123"), never real data from the context. | |||
Then opencode models only has Copilot ones, none f the open source ones. | |||
EOL | |||
# Verify auth credentials file | |||
cat ~/.local/share/opencode/auth.json | |||
# List models | |||
opencode models | |||
github-copilot/claude-haiku-4.5 | |||
github-copilot/claude-opus-4.5 | |||
github-copilot/claude-opus-41 | |||
github-copilot/claude-sonnet-4 | |||
github-copilot/claude-sonnet-4.5 | |||
github-copilot/gemini-2.5-pro | |||
github-copilot/gemini-3-pro-preview | |||
github-copilot/gpt-4.1 | |||
github-copilot/gpt-4o | |||
github-copilot/gpt-5 | |||
github-copilot/gpt-5-codex | |||
github-copilot/gpt-5-mini | |||
github-copilot/gpt-5.1 | |||
github-copilot/gpt-5.1-codex | |||
github-copilot/gpt-5.1-codex-mini | |||
github-copilot/grok-code-fast-1 | |||
github-copilot/oswe-vscode-prime | |||
</source> | </source> | ||
Latest revision as of 07:38, 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
# Version
opencode version
Connect to paid Github subscription, opencode auth login choose github copilot (public) - don't worry. Follow the process and It will get you to log in to your account covered by the privacy subscription.
opencode auth login
# Create ~/.config/opencode/opencode.json
cat > ~/.config/opencode/opencode.json <<'EOL'
{
"disabled_providers": [
"openai",
"opencode",
"anthropic",
"google",
"groq",
"mistral"
],
"model": "github-copilot/claude-opus-4.5",
"permission": {
"webfetch": "ask"
},
"instructions": [
"~/.config/opencode/GLOBAL_RULES.md"
],
"$schema": "https://opencode.ai/config.json"
}
EOL
# create ~/.config/opencode/GLOBAL_RULES.md
cat > ~/.config/opencode/GLOBAL_RULES.md <<EOL
# SECURITY & PRIVACY PROTOCOL
1. **NO SECRETS:** You are STRICTLY FORBIDDEN from outputting, printing, or repeating any API keys, passwords, credentials, or secrets found in code or logs.
2. **REDACTION:** If you must reference a line of code containing a secret, you must replace the secret with <REDACTED>.
3. **MOCK DATA:** When generating code examples or tests, always use dummy data (e.g., "example_key_123"), never real data from the context.
Then opencode models only has Copilot ones, none f the open source ones.
EOL
# Verify auth credentials file
cat ~/.local/share/opencode/auth.json
# List models
opencode models
github-copilot/claude-haiku-4.5
github-copilot/claude-opus-4.5
github-copilot/claude-opus-41
github-copilot/claude-sonnet-4
github-copilot/claude-sonnet-4.5
github-copilot/gemini-2.5-pro
github-copilot/gemini-3-pro-preview
github-copilot/gpt-4.1
github-copilot/gpt-4o
github-copilot/gpt-5
github-copilot/gpt-5-codex
github-copilot/gpt-5-mini
github-copilot/gpt-5.1
github-copilot/gpt-5.1-codex
github-copilot/gpt-5.1-codex-mini
github-copilot/grok-code-fast-1
github-copilot/oswe-vscode-prime