Skip to content

icepuma/fbtoggl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fbtoggl

https://crates.io/crates/fbtoggl https://github.com/icepuma/fbtoggl/actions/workflows/ci.yaml

Interact with track.toggl.com via terminal.

InstallationUsage

Installation

  • cargo
    cargo install fbtoggl
  • Precompiled binary

Shell completions

Generate shell completions for your shell:

# Bash
fbtoggl completions bash > ~/.local/share/bash-completion/completions/fbtoggl

# Zsh
fbtoggl completions zsh > ~/.zfunc/_fbtoggl
# Add to ~/.zshrc: fpath=(~/.zfunc $fpath)

# Fish
fbtoggl completions fish > ~/.config/fish/completions/fbtoggl.fish

Usage

Init

  1. Get API token from profile page.
  2. Call fbtoggl config init which prompts an input for the API token

Timer Management

Start a timer

# Start a billable timer (default)
fbtoggl start --project "<project>" --description "<description>"

# Start a non-billable timer with tags
fbtoggl start --project "<project>" --description "<description>" --non-billable --tags "tag1,tag2"

Stop a timer

# Stop the currently running timer
fbtoggl stop

# Stop a specific timer by ID
fbtoggl stop --id "<time entry id>"

Show current timer

fbtoggl current

Continue a timer

# Continue the last timer
fbtoggl continue

# Continue a specific timer by ID
fbtoggl continue --id "<time entry id>"

Time Entry Management

List time entries

# List today's entries (default)
fbtoggl log

# List entries for a specific range
fbtoggl log --range "yesterday"
fbtoggl log --range "this-week"
fbtoggl log --range "2021-11-01|2021-11-07"

# Show missing entries (workdays only)
fbtoggl log --missing

Add completed time entry

# Add entry with duration
fbtoggl add --project "<project>" --description "<description>" --start "today at 9am" --duration "8 hours"

# Add entry with start and end time
fbtoggl add --project "<project>" --description "<description>" --start "today at 9am" --end "today at 5pm"

# Add entry with lunch break (splits into two 4-hour entries)
fbtoggl add --project "<project>" --description "<description>" --start "today at 9am" --end "today at 6pm" --lunch-break

# Add non-billable entry
fbtoggl add --project "<project>" --description "<description>" --start "today at 9am" --duration "1 hour" --non-billable

Show entry details

fbtoggl show <time-entry-id>

Edit time entry

# Edit multiple fields
fbtoggl edit <time-entry-id> --description "New description" --project "Different project"

# Toggle billable status
fbtoggl edit <time-entry-id> --toggle-billable

# Change time
fbtoggl edit <time-entry-id> --start "today at 8am" --end "today at 5pm"

Delete time entry

fbtoggl delete <time-entry-id>

Reports

Detailed report with violations

# Today's report
fbtoggl report

# Custom range
fbtoggl report --range "this-week"
fbtoggl report --range "last-month"

Summary statistics

# This week's summary (default)
fbtoggl summary

# Custom range
fbtoggl summary --range "today"
fbtoggl summary --range "this-month"

Resource Management

Workspaces

fbtoggl workspace list

Projects

# List active projects
fbtoggl project list

# List all projects (including archived)
fbtoggl project list --all

# Create new project
fbtoggl project create --name "Project Name" --billable

# Create project with client
fbtoggl project create --name "Project Name" --client "Client Name" --billable

# Create non-billable project with custom color
fbtoggl project create --name "Internal Project" --color "#ff5722"

Clients

# List active clients
fbtoggl client list

# List all clients (including archived)
fbtoggl client list --all

# Create new client
fbtoggl client create --name "<name>"

Configuration

# Initialize configuration
fbtoggl config init

# Show current configuration
fbtoggl config show

# Set configuration value
fbtoggl config set api_token <new-token>

Output Formats

All commands support different output formats:

# Default raw format
fbtoggl log

# JSON format
fbtoggl log --format json

# Table format
fbtoggl log --format table

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •