A professional command-line interface for ShellTime - the comprehensive platform for tracking and analyzing DevOps workflows.
Documentation: https://deepwiki.com/shelltime/cli
Install ShellTime CLI using our automated installation script:
curl -sSL https://shelltime.xyz/i | bash
-
Initialize authentication:
shelltime init
-
Install shell hooks (for automatic command tracking):
shelltime hooks install
-
Optional: Enable daemon mode (recommended for optimal performance):
shelltime daemon install
ShellTime CLI configuration is stored in $HOME/.shelltime/config.toml
. The configuration file is automatically created during initialization.
Field | Type | Default | Description |
---|---|---|---|
token |
string | "" |
Your authentication token for shelltime.xyz |
apiEndpoint |
string | "https://api.shelltime.xyz" |
The API endpoint URL for shelltime.xyz |
webEndpoint |
string | "https://shelltime.xyz" |
The web interface URL for shelltime.xyz |
flushCount |
integer | 10 |
Number of records to accumulate before syncing to server |
gcTime |
integer | 14 |
Number of days to keep tracked data before garbage collection |
dataMasking |
boolean | true |
Enable/disable masking of sensitive data in tracked commands |
enableMetrics |
boolean | false |
Enable detailed command metrics tracking (WARNING: May impact performance) |
encrypted |
boolean | false |
Enable end-to-end encryption for command data (requires daemon mode) |
exclude |
array | [] |
List of regular expressions to exclude commands from tracking |
endpoints |
array | [] |
Additional API endpoints for development or testing |
Field | Type | Default | Description |
---|---|---|---|
ai.agent.view |
boolean | false |
Allow AI to auto-execute read-only commands |
ai.agent.edit |
boolean | false |
Allow AI to auto-execute file editing commands |
ai.agent.delete |
boolean | false |
Allow AI to auto-execute deletion commands |
ai.showTips |
boolean | true |
Show AI-related tips and suggestions |
Field | Type | Default | Description |
---|---|---|---|
ccusage.enabled |
boolean | false |
Enable Claude Code usage tracking and analytics |
# Authentication token from shelltime.xyz
token = "your-token-here"
# API and web endpoints
apiEndpoint = "https://api.shelltime.xyz"
webEndpoint = "https://shelltime.xyz"
# Sync settings
flushCount = 10 # Sync after 10 commands (increase for less frequent syncs)
gcTime = 14 # Keep local data for 14 days
# Privacy and security
dataMasking = true # Mask sensitive data in commands
encrypted = false # Enable E2E encryption (requires daemon mode and special token)
# Performance monitoring
enableMetrics = false # WARNING: Impacts performance, only for debugging
# Command exclusion patterns (regular expressions)
# Commands matching these patterns won't be tracked
exclude = [
"^ls .*", # Exclude all ls commands
".*password.*", # Exclude commands containing "password"
"^git push", # Exclude git push commands
]
# AI configuration (optional)
# Controls which command types the AI assistant can automatically execute
[ai]
showTips = true # Show AI-related tips and suggestions (default: true)
[ai.agent]
view = false # Allow AI to execute read-only commands (ls, cat, less, head, tail, etc.)
edit = false # Allow AI to execute file editing commands (vim, nano, code, sed, etc.)
delete = false # Allow AI to execute deletion commands (rm, rmdir, unlink, etc.)
# Claude Code usage tracking (optional)
[ccusage]
enabled = false # Track and report Claude Code usage statistics
# Development endpoints (optional, for testing)
# [[endpoints]]
# apiEndpoint = "http://localhost:8080"
# token = "dev-token"
- Metrics Collection: The
enableMetrics
option impacts performance. Enable only for debugging purposes. - Flush Count: Adjust
flushCount
based on your workflow. Higher values reduce sync frequency but increase local storage. - Daemon Mode: Essential for users experiencing latency issues, especially in regions distant from servers.
- End-to-End Encryption: Requires daemon mode and a special token from shelltime.xyz.
- Data Masking: Automatically masks sensitive information in tracked commands.
- Exclusion Patterns: Use regex patterns to prevent tracking of sensitive commands.
The AI agent configuration provides granular control over command execution:
- View Operations: Read-only commands (ls, cat, grep)
- Edit Operations: File modification commands (vim, sed)
- Delete Operations: Removal commands (rm, rmdir)
All permissions default to false
for maximum security.
Initialize ShellTime CLI with your authentication token.
shelltime init [--token <your-token>]
Options:
--token, -t
: Personal access token (optional; uses web auth if omitted)
Usage:
# Initialize with token
shelltime init --token abc123xyz
# Initialize via web authentication
shelltime init
Track shell commands and activities (typically invoked automatically via shell hooks).
shelltime track [options]
Options:
--shell, -s
: Specify the shell type (bash, zsh, fish, etc.)--command, -c
: The command to track--exit-code, -ec
: Exit code of the command--start-time, -st
: Command start time (Unix timestamp)--duration, -d
: Command duration in seconds--shell-pid
: Shell process ID--path, -p
: Current working directory
Note: Automatically invoked by shell hooks after installation.
Synchronize local command history with ShellTime servers.
shelltime sync [--dry-run]
Options:
--dry-run, -dr
: Preview what would be synced without actually syncing
Examples:
# Force sync all pending commands
shelltime sync
# Preview sync without uploading
shelltime sync --dry-run
Perform garbage collection on old tracking data based on configured retention period.
shelltime gc [options]
Options:
--withLog, -wl
: Also clean log files--skipLogCreation, -sl
: Don't create a new log file after cleaning--dry-run, -dr
: Preview what would be cleaned without actually deleting
Examples:
# Clean old data (older than gcTime days)
shelltime gc
# Clean old data and logs
shelltime gc --withLog
# Preview cleanup
shelltime gc --dry-run
Display pending commands awaiting synchronization.
shelltime ls [--format <format>]
Options:
--format, -f
: Output format (table/json) - default: table
Examples:
# List commands in table format
shelltime ls
# Export as JSON
shelltime ls --format json
Query the AI assistant for command suggestions and solutions.
shelltime query "<your prompt>"
shelltime q "<your prompt>" # Short alias
Examples:
shelltime query "get the top 5 memory-using processes"
shelltime q "find all files modified in the last 24 hours"
shelltime q "show disk usage for current directory"
shelltime q "compress all png files in current folder"
Manage the background daemon service for enhanced performance.
shelltime daemon <subcommand>
Subcommands:
install
: Install the daemon serviceuninstall
: Remove the daemon servicereinstall
: Reinstall the daemon service
Examples:
# Install daemon for better performance
shelltime daemon install
# Remove daemon service
shelltime daemon uninstall
# Reinstall (useful for updates)
shelltime daemon reinstall
Manage shell integration hooks for automatic command tracking.
shelltime hooks <subcommand>
Subcommands:
install
: Install shell hooks for your current shelluninstall
: Remove shell hooks
Examples:
# Install hooks for automatic tracking
shelltime hooks install
# Remove hooks
shelltime hooks uninstall
Launch ShellTime web dashboard in your default browser.
shelltime web
Diagnose and validate ShellTime installation and configuration.
shelltime doctor
Verification scope:
- Configuration file validity
- Token authentication
- Database connectivity
- Shell hook installation
- Daemon service status
- Network connectivity to shelltime.xyz
Manage and synchronize shell aliases.
shelltime alias <subcommand>
Subcommands:
import
: Import aliases from shell configuration files--fully-refresh, -f
: Replace all existing aliases
Examples:
# Import aliases from your shell config
shelltime alias import
# Full refresh (replace all)
shelltime alias import --fully-refresh
Manage dotfiles backup and synchronization.
shelltime dotfiles <subcommand>
Subcommands:
push
: Push dotfiles to server--apps
: Specify which app configs to push
Examples:
# Push all dotfiles
shelltime dotfiles push
# Push specific app configs
shelltime dotfiles push --apps vim --apps tmux
shelltime --version # Display version information
shelltime -v # Short form
shelltime --help # General help
shelltime <command> --help # Command-specific help
- Linux: Utilizes
systemd
for service management - macOS: Utilizes
launchctl
for service management
Default synchronization behavior and expected latencies:
Operation | Latency | Description |
---|---|---|
Local Save | <8ms | File I/O operations only |
Network Sync (Singapore) | ~100ms | Southeast Asia region |
Network Sync (Other) | Variable | Depends on geographic location |
For optimal performance and minimal shell latency, enable daemon mode:
~/.shelltime/bin/shelltime daemon install
Key Benefits:
- Asynchronous Processing: Shell blocking reduced to <8ms
- Background Synchronization: Network operations handled independently
- Zero Shell Impact: Complete isolation from interactive sessions
- Resilient Delivery: Automatic retry and buffering during network issues
Technical Implementation:
- Operates as a user-level service
- Manages all network synchronization operations
- Implements intelligent command buffering
- Provides automatic retry mechanisms for failed synchronizations
Optimization Tips:
# Adjust buffer size for reduced sync frequency
FlushCount = 100
Note: Commands are always persisted locally first, ensuring zero data loss regardless of network conditions.
Requirements: Version 0.1.12+ with daemon mode enabled
ShellTime provides enterprise-grade end-to-end encryption for command data, ensuring complete privacy in sensitive environments.
- Obtain encryption-enabled token from shelltime.xyz
- Configure encryption in settings:
# ~/.shelltime/config.toml
encrypted = true
- Verify daemon mode is active
ShellTime implements a hybrid RSA/AES-GCM encryption scheme:
Client-Side Operations:
- Retrieve public key associated with authentication token
- Generate unique AES-GCM key per request
- Encrypt AES key using RSA public key encryption
- Encrypt payload using AES-GCM symmetric encryption
- Transmit encrypted key and payload to server
Server-Side Operations:
- Decrypt AES-GCM key using private key
- Decrypt payload using recovered AES-GCM key
- Process decrypted command data
Security Advantages:
- Asymmetric Security: RSA provides robust key exchange
- Symmetric Efficiency: AES-GCM ensures fast payload encryption
- Perfect Forward Secrecy: Unique keys per request prevent retrospective decryption
{
"encrypted": "<aes-gcm encrypted payload>",
"aes_key": "<rsa encrypted aes-gcm key>",
"nonce": "<aes-gcm nonce>"
}
Performance Impact:
- Additional latency: ~5-10ms per request
- Automatic encryption/decryption when enabled
- Local storage remains unencrypted for performance
Remove the daemon service when no longer needed:
~/.shelltime/bin/shelltime daemon uninstall
Uninstallation Process:
- Terminate running daemon process
- Remove service configuration from system
- Clean up temporary files and sockets
Post-Uninstallation:
- CLI reverts to direct synchronization mode
- Reinstallation available at any time via
daemon install
- High Latency: Enable daemon mode for improved performance
- Authentication Failures: Re-run
shelltime init
with a fresh token - Missing Commands: Verify shell hooks are installed with
shelltime hooks install
- Sync Issues: Check network connectivity and run
shelltime doctor
shelltime doctor
: Comprehensive system checkshelltime sync --dry-run
: Preview sync operationsshelltime gc --dry-run
: Preview cleanup operations
- Official Documentation: https://deepwiki.com/shelltime/cli
- Web Dashboard: https://shelltime.xyz
- Email: [email protected]
- Issue Tracker: GitHub Issues
- Community: ShellTime Community Forum
Copyright © 2024 ShellTime Team. All rights reserved.
Licensed under the proprietary ShellTime license. See LICENSE file for details.