Skip to main content
The self command provides subcommands for managing the squirrel CLI itself: installation, updates, diagnostics, and settings.

Subcommands


install

Bootstrap the local installation by creating necessary directories and symlinking the binary.

Usage

squirrel self install

Output

Installed v0.1.0
  Binary: ~/.local/share/squirrel/releases/0.1.0/squirrel
  Symlink: ~/.local/bin/squirrel
If ~/.local/bin is not in your $PATH, the command will show:
Add to your shell profile:
  export PATH="~/.local/bin:$PATH"

What it Does

  • Creates ~/.squirrel/ for settings
  • Creates ~/.local/share/squirrel/releases/ for cached releases
  • Creates symlink at ~/.local/bin/squirrel
  • Registers installation for update checks

update

Check for and apply updates to the CLI.

Usage

squirrel self update [options]

Options

OptionDescription
--checkOnly check for updates, don’t install
--dismissDismiss update notification for current version

Examples

Check for Updates

squirrel self update --check
Output if update available:
Update available: v0.2.0
Run 'squirrel self update' to install
Output if up to date:
Already on latest version (0.1.0)

Install Update

squirrel self update
Output:
Updated to v0.2.0
See release notes: https://github.com/squirrelscan/repo/releases/tag/v0.2.0

Dismiss Update Notification

squirrel self update --dismiss
This dismisses the update notification until the next version is released.

Update Channels

squirrel has two update channels configured via settings:
  • stable - Production releases (recommended)
  • beta - Pre-release versions with latest features
Change channel:
squirrel self settings set channel beta

completion

Generate shell completion scripts for bash, zsh, or fish.

Usage

squirrel self completion <shell>

Arguments

ArgumentDescription
shellShell type: bash, zsh, or fish (required)

Examples

Bash

Add to ~/.bashrc:
eval "$(squirrel self completion bash)"

Zsh

Add to ~/.zshrc:
eval "$(squirrel self completion zsh)"

Fish

Add to ~/.config/fish/config.fish:
squirrel self completion fish | source

What it Provides

Completions include:
  • Command names
  • Subcommand names
  • Option flags
  • File paths for relevant arguments

doctor

Run health checks on your installation.

Usage

squirrel self doctor

Output

Running health checks...

[OK] Binary: Executable found at ~/.local/bin/squirrel
[OK] Version: 0.1.0
[OK] Permissions: Binary is executable
[OK] Config: Valid squirrel.toml found
[WARN] Cache: 125MB of cached data at ~/.local/share/squirrel
[OK] Settings: Valid settings at ~/.squirrel/settings.json

Passed: 5 | Warnings: 1 | Failed: 0

What it Checks

  • Binary installation and permissions
  • Config file validity
  • Settings file validity
  • Cache size and location
  • Update status

Exit Codes

CodeMeaning
0All checks passed (warnings are OK)
1One or more checks failed

version

Show version information about the CLI.

Usage

squirrel self version [options]

Options

OptionDescription
--jsonOutput as JSON

Examples

Human-Readable

squirrel self version
Output:
squirrel v0.1.0
  Channel: stable
  Platform: darwin-arm64
  Bun: 1.1.38

JSON Output

squirrel self version --json
Output:
{
  "version": "0.1.0",
  "channel": "stable",
  "platform": "darwin-arm64",
  "bun_version": "1.1.38"
}

settings

Manage CLI settings stored at ~/.squirrel/settings.json or .squirrel/settings.json (local project).

Subcommands

  • show - Display settings
  • set - Update a setting

settings show

Display current settings.

Usage

squirrel self settings show [options]

Options

OptionDescription
--userShow only user settings (~/.squirrel/settings.json)
--localShow only local project settings (.squirrel/settings.json)

Examples

Effective Settings (default)
Shows merged settings with source tracking:
squirrel self settings show
Output:
Effective Settings:

  channel                  = stable       (default)
  auto_update              = true         (user)
  notifications            = true         (local)
  log_level                = info         (default)  (read-only)

User:  ~/.squirrel/settings.json
Local: /path/to/project/.squirrel/settings.json
User Settings Only
squirrel self settings show --user
Output:
User Settings (~/.squirrel/settings.json):

  channel              = stable
  auto_update          = true
  user_feedback_email  = [email protected]
Local Settings Only
squirrel self settings show --local
Output:
Local Settings (/path/to/project/.squirrel/settings.json):

  notifications        = false

settings set

Update a setting value.

Usage

squirrel self settings set <key> <value> [options]

Arguments

ArgumentDescription
keySetting key (required)
valueNew value (required)

Options

OptionDescription
--localSet in local project settings (.squirrel/settings.json)
--userSet in user settings (~/.squirrel/settings.json) (default)

Available Settings

KeyTypeDescriptionValues
channelstringUpdate channelstable, beta
auto_updatebooleanAuto-check for updatestrue, false
notificationsbooleanShow update notificationstrue, false

Examples

Switch to Beta Channel
squirrel self settings set channel beta
Output:
Set channel = beta (user)
  Written to: ~/.squirrel/settings.json
Disable Update Notifications
squirrel self settings set notifications false
Set Local Project Setting
squirrel self settings set notifications false --local
This creates .squirrel/settings.json in the current directory and sets the value there.

uninstall

Remove squirrel from your system.

Usage

squirrel self uninstall [options]

Options

OptionDescription
--purgeAlso remove user settings
--forceSkip confirmation prompt

Examples

Interactive Uninstall

squirrel self uninstall
Output:
This will remove:
  - Symlink at ~/.local/bin/squirrel
  - Cached releases at ~/.local/share/squirrel

User settings at ~/.squirrel/settings.json will be preserved.
Use --purge to also remove settings.

Continue? [y/N]

Uninstall with Settings

squirrel self uninstall --purge
This removes:
  • Binary symlink
  • Cached releases
  • User settings

Force Uninstall (No Prompt)

squirrel self uninstall --force

What Gets Removed

ItemDefaultWith —purge
Binary symlink (~/.local/bin/squirrel)
Cached releases (~/.local/share/squirrel/)
User settings (~/.squirrel/)
Project configs (squirrel.toml)
Audit database (~/.local/share/squirrel/audits.db)
Project configs (squirrel.toml) in your repositories are never removed.