CLI Reference

Complete documentation for all shelltime CLI commands

Quick Navigation

Getting StartedCommand TrackingData & SearchShell IntegrationDaemon ManagementAI FeaturesDiagnostics & ConfigDotfiles & AliasesAI Coding Integrations

Getting Started

shelltime init

Complete initialization: authenticate, install hooks, start daemon, and configure AI code integrations.

$ shelltime init [--token <token>]
FlagDefaultDescription
--token, -t-Authentication token (will open browser if not provided)
shelltime auth

Authenticate with shelltime.xyz.

$ shelltime auth [--token <token>]
FlagDefaultDescription
--token, -t-Authentication token (will open browser if not provided)

Command Tracking

shelltime track

Track user commands. This is called automatically by shell hooks.

$ shelltime track [flags]
FlagDefaultDescription
--shell, -s-Shell name (bash, zsh, fish)
--sessionId, --id-Unix timestamp of session
--command, --cmd-Command that was executed
--phase, -p-Tracking phase: "pre" or "post"
--result, -r-Exit code of last command
--ppid-Parent process ID
shelltime sync

Manually sync local commands to the server.

$ shelltime sync [--dry-run]
FlagDefaultDescription
--dry-run, -drfalseSimulate sync without side effects

Data & Search

shelltime ls

List locally saved commands with metadata.

$ shelltime ls [--format <table|json>]
FlagDefaultDescription
--format, -ftableOutput format
shelltime gc

Clean and compact internal storage (garbage collection).

$ shelltime gc [flags]
FlagDefaultDescription
--withLog, -wl-Also clean log files
--skipLogCreation, -slcfalseSkip log file creation
shelltime rgalias: grep

Search server-synced commands with advanced filtering.

$ shelltime rg <search-text> [flags]
FlagDefaultDescription
--format, -ftableOutput format
--limit, -l50Max results
--last-id-Pagination: start after this ID
--shell, -s-Filter by shell
--hostname, -H-Filter by hostname
--username, -u-Filter by username
--result, -r-1Filter by exit code (-1 for any)
--main-command, -m-Filter by main command (e.g. git, npm)
--since-Filter since date (e.g. 2024, 2024-01, 2024-01-15)
--until-Filter until date

Shell Integration

shelltime hooks install

Install shell hooks for automatic command tracking in bash, zsh, and fish.

$ shelltime hooks install
shelltime hooks uninstall

Remove shell hooks from bash, zsh, and fish.

$ shelltime hooks uninstall

Daemon Management

shelltime daemon install

Install and start the background daemon service for fast syncing (<8ms latency).

$ shelltime daemon install
shelltime daemon uninstall

Uninstall the daemon service.

$ shelltime daemon uninstall
shelltime daemon reinstall

Reinstall the daemon (uninstall then install).

$ shelltime daemon reinstall
shelltime daemon status

Check daemon status, connectivity, version, uptime, and configuration.

$ shelltime daemon status

AI Features

shelltime queryalias: q

Query AI for command suggestions based on natural language.

$ shelltime query "describe what you want to do"
shelltime web

Open the ShellTime web dashboard in your default browser.

$ shelltime web

Diagnostics & Config

shelltime doctor

Check ShellTime setup and environment: system info, config validity, daemon status, hooks installation, and more.

$ shelltime doctor
shelltime config view

View current configuration (sensitive fields are masked).

$ shelltime config view [--format <table|json>]
FlagDefaultDescription
--format, -ftableOutput format
shelltime schema

Generate JSON schema for the config file (for IDE autocompletion).

$ shelltime schema [--output <path>]
FlagDefaultDescription
--output, -o-Output file path (defaults to stdout)

Dotfiles & Aliases

shelltime alias import

Import aliases from shell configuration files.

$ shelltime alias import [flags]
FlagDefaultDescription
--fully-refresh, --fullfalseFully refresh instead of incremental import
--fish-config, -fc~/.config/fish/config.fishFish config file path
--zsh-config, -zc~/.zshrcZsh config file path
shelltime dotfiles push

Push dotfiles to the server. Supported apps: nvim, fish, git, zsh, bash, ghostty, claude, starship, npm, ssh, kitty, kubernetes.

$ shelltime dotfiles push [--apps <app>...]
FlagDefaultDescription
--apps, -a-Apps to push
shelltime dotfiles pull

Pull dotfiles from the server and apply locally.

$ shelltime dotfiles pull [flags]
FlagDefaultDescription
--apps, -a-Apps to pull
--dry-run, -nfalseShow what would change without applying

AI Coding Integrations

shelltime cc install

Install Claude Code OTEL environment configuration to shell config files.

$ shelltime cc install
shelltime cc uninstall

Remove Claude Code OTEL configuration from shell config files.

$ shelltime cc uninstall
shelltime cc statusline

Output formatted statusline for Claude Code status bar (reads JSON from stdin).

$ shelltime cc statusline
shelltime codex install

Install Codex OTEL configuration to ~/.codex/config.toml.

$ shelltime codex install
shelltime codex uninstall

Remove ShellTime OTEL configuration from ~/.codex/config.toml.

$ shelltime codex uninstall
shelltime.xyzRankingPlans
Sign In
© 2026 shelltime.xyz. All rights reserved.
Version: 9316112
TermsPrivacyContactAboutCLI