Skip to content

Commands

Jay-Karia edited this page Sep 13, 2025 · 7 revisions

This page provides a comprehensive reference for all Fitlog commands.

General Commands

Command Description Options Example
init Initialize the CLI --help fitlog init
help Show help information fitlog help
--version Show version information fitlog --version
--dir Print the .fitlog directory path fitlog --dir

Exercise Management

Command Description Options Example
create Create a new exercise --desc, --type, --help fitlog create "Bench Press" bp --type sets
show exercise Display exercises --id, --help fitlog show exercise --id 3
remove exercise Remove an exercise --id, --force, --help fitlog remove exercise --id 3

Workout Logging

Command Description Options Example
add Log a new workout --sets, --reps, --weight, --time, --date, --notes, --help fitlog add bp --sets 3 --reps 8 --weight 135
show log Display workout logs --id, --from, --to, --last, --all, --help fitlog show log --last 5
remove log Remove a workout log --id, --from, --to, --force, --help fitlog remove log --id 12

Data Management

Command Description Options Example
export Export data to JSON --file, --help fitlog export --file backup.json
import Import data from JSON --help fitlog import data.json

Configuration

Command Description Options Example
config Manage configuration --get, --set, --list, --reset, --help fitlog config --list

Command Details

init

Initializes the fitlog CLI, creating necessary directories and configuration files. It should be run before using any other commands.

fitlog init [options]

Options:

  • --help: Show help information for the init command
  • --version: Show version information
  • --dir: Print the path to the .fitlog directory

create

Creates a new exercise definition that can be referenced when logging workouts with the 'add' command.

fitlog create <name> [shortcut] [--desc <text>] [--type <sets|time|body>] [--help]

The exercise type can be one of:

  • sets: Traditional strength exercises (default)
  • time: Cardio or duration-based exercises
  • body: Bodyweight exercises

add

Logs a workout entry for the specified exercise, including performance details.

fitlog add <exercise> [--sets <number>] [--reps <number>] [--weight <value>] [--time <value>] [--date <date>] [--notes <text>] [--help]

show

Displays workouts and exercises with various filtering options.

fitlog show [exercise|log] [--id <number>] [--from <date>] [--to <date>] [--last <number>] [--all] [--help]

remove

Removes exercises or workout log entries from your fitlog database.

fitlog remove [exercise|log] [--id <id>] [--date <date>] [--force] [--help]

config

Allows you to view and modify configuration settings.

fitlog config [--get <key>] [--set <key> <value>] [--list] [--reset] [--help]

export

Exports all your fitlog data to a JSON file for sharing or backup.

fitlog export [--file <file name>] [--help]

import

Imports fitlog data from a specified JSON file.

fitlog import <file> [--help]

Back to Home | Previous: Quick Start | Next: Configuration

Clone this wiki locally