Install Claude Code CLI

Written by

in

curl -fsSL https://claude.ai/install.sh | bash
Bash
claude update
Bash
claude agents --json && claude daemon status
Bash
claude respawn --all
Bash
# claude daemon stop --any
claude --version
Bash
code ~/.claude/settings.json
Bash
nano ~/.claude/settings.json
Bash
{
  "env": {
    "CLAUDE_CODE_TETHER_LIVE": "1",
    // "TMPDIR": "/home/{ubuntu-or-your-username}/claude-work"
  },
  "attribution": {
    "commit": "",
    "pr": ""
  },
  "model": "opus",
  "statusLine": {
    "type": "command",
    "command": "jq -r --arg u \"$(whoami)@$(hostname -s)\" 'def c(n): \"\\u001b[\\(n)m\"; def r: \"\\u001b[00m\"; def sep: \" \\(c(\"2\"))│\\(r) \"; def pc: if . == null then \"--\" else floor as $p | (if $p >= 80 then \"01;31\" elif $p >= 50 then \"01;33\" else \"01;32\" end) as $k | \"\\(c($k))\\($p)%\\(r)\" end; def k: if . >= 1000000 then \"\\((. / 100000 | round) / 10)M\" elif . >= 1000 then \"\\(. / 1000 | round)k\" else tostring end; def hm: floor as $s | if $s >= 86400 then \"\\($s / 86400 | floor)d\\($s % 86400 / 3600 | floor)h\" elif $s >= 3600 then \"\\($s / 3600 | floor)h\\($s % 3600 / 60 | floor)m\" elif $s >= 60 then \"\\($s / 60 | floor)m\" else \"\\($s)s\" end; def usd: (. * 100 | round) as $n | \"$\\($n / 100 | floor).\\($n % 100 | tostring | if length < 2 then \"0\" + . else . end)\"; def lim(l): \"\\(l) \\(.used_percentage | pc)\" + (if .resets_at then \" \\(c(\"2\"))(\\(.resets_at - now | if . > 0 then hm else \"now\" end))\\(r)\" else \"\" end); ([ \"\\(c(\"01;32\"))\\($u)\\(r):\\(c(\"01;34\"))\\(.workspace.current_dir // .cwd)\\(r)\", ([ \"\\(c(\"01;36\"))\\(.model.display_name)\\(r)\", (.effort.level // empty | \"\\(c(\"35\"))\\(.)\\(r)\"), (if .thinking.enabled then \"\\(c(\"2\"))thinking\\(r)\" else empty end), (if .fast_mode then \"\\(c(\"01;33\"))fast\\(r)\" else empty end) ] | join(\" · \")), (.context_window | \"ctx \\(.used_percentage | pc)\" + (if .used_percentage != null then \" \\(c(\"2\"))\\(.total_input_tokens | k)/\\(.context_window_size | k)\\(r)\" else \"\" end)), (.worktree // empty | \"wt \\(.name)\" + (if .branch then \" (\\(.branch))\" else \"\" end)) ] | join(sep)), ([ ([ (.rate_limits.five_hour // empty | lim(\"5h\")), (.rate_limits.seven_day // empty | lim(\"wk\")) ] | select(length > 0) | join(\" · \")), (.cost.total_cost_usd // empty | usd), (.cost | \"\\(c(\"32\"))+\\(.total_lines_added // 0)\\(r) \\(c(\"31\"))-\\(.total_lines_removed // 0)\\(r)\"), (.cost.total_duration_ms // empty | . / 1000 | hm), (.prompt_cache // empty | (if .warm then c(\"32\") else c(\"2\") end) + \"cache\" + (if .hit_ratio != null then \" \\(.hit_ratio * 100 | floor)%\" else \"\" end) + (if .warm then \"\" else \" cold\" end) + r) ] | select(length > 0) | join(sep))'",
    "refreshInterval": 60
  },
  "enabledPlugins": {
    "gopls-lsp@claude-plugins-official": true
  },
  "sandbox": {
    "enabled": true,
    "failIfUnavailable": true,
    "autoAllowBashIfSandboxed": true,
    "allowUnsandboxedCommands": true
  },
  "feedbackDrafts": "notify",
  "promptCacheTtl": "1h",
  "subagentPromptCacheTtl": "1h",
  "modelSettings": {
    "claude-opus-5-5": {
      "effortLevel": "xhigh"
    },
    "claude-fable-5-1": {
      "effortLevel": "xhigh"
    },
    "claude-fable-5-2": {
      "effortLevel": "xhigh"
    }
  },
  "tui": "fullscreen",
  "theme": "dark",
  "switchModelsOnFlag": false
}
JSON
sudo apt install ripgrep socat bubblewrap socat -y
Bash

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *