Skip to content

wakatime-cli failed: Flag needs an argument #121

@davidhcefx

Description

@davidhcefx
  • WakaTime plugin: v11.1.1

Received wakatime-core exit error in the Sublime console:

[WakaTime] [ERROR] wakatime-core exited with status: 1
[WakaTime] [ERROR] wakatime-core output: b'Error: flag needs an argument: --hidefilenames\nUsage:\n  wakatime-cli [flags]\n\nFlags:\n      --ai-line-changes int                Optional number of lines added or removed by AI since  last heartbeat in the current file.\n      --alternate-branch string            Optional alternate branch name. Auto-detected branch takes priority.\n      --alternate-language string          Optional alternate language name. Auto-detected language takes priority.\n      --alternate-project string           Optional alternate project name. Auto-detected project takes priority.\n      --api-url string                     API base url used when sending heartbeats and fetching code stats. Defaults to https://api.wakatime.com/api/v1/.\n      --category string                    Category of this heartbeat activity. Can be "coding", "ai coding", "building", "indexing", "debugging", "learning", "notes", "meeting", "planning", "researching", "communicating", "supporting", "advising", "running tests", "writing tests", "manual testing", "writing docs", "code reviewing", "browsing", "translating", or "designing". Defaults to "coding".\n      --config string                      Optional config file. Defaults to \'~/.wakatime.cfg\'.\n      --config-read string                 Prints value for the given config key, then exits.\n      --config-section string              Optional config section when reading or writing a config key. Defaults to [settings]. (default "settings")\n      --config-write stringToString        Writes value to a config key, then exits. Expects two arguments, key and value. (default [])\n      --cursorpos int                      Optional cursor position in the current file.\n      --disable-offline                    Disables offline time logging instead of queuing logged time.\n      --entity string                      Absolute path to file for the heartbeat. Can also be a url, domain or app when --entity-type is not file.\n      --entity-type string                 Entity type for this heartbeat. Can be "file", "domain", "url", or "app". Defaults to "file".\n      --exclude strings                    Filename patterns to exclude from logging. POSIX regex syntax. Can be used more than once.\n      --exclude-unknown-project            When set, any activity where the project cannot be detected will be ignored.\n      --extra-heartbeats                   Reads extra heartbeats from STDIN as a JSON array until EOF.\n      --file-experts                       Prints the top developer within a team for the given entity, then exits.\n      --guess-language                     Enable detecting language from file contents.\n      --heartbeat-rate-limit-seconds int   Only sync heartbeats to the API once per these seconds, instead saving to the offline db. Defaults to 120. Use zero to disable. (default 120)\n  -h, --help                               help for wakatime-cli\n      --hide-branch-names string           Obfuscate branch names. Will not send revision control branch names to api.\n      --hide-file-names string             Obfuscate filenames. Will not send file names to api.\n      --hide-project-folder                When set, send the file\'s path relative to the project folder. For ex: /User/me/projects/bar/src/file.ts is sent as src/file.ts so the server never sees the full path. When the project folder cannot be detected, only the file name is sent. For ex: file.ts.\n      --hide-project-names string          Obfuscate project names. When a project folder is detected instead of using the folder name as the project, a .wakatime-project file is created with a random project name.\n      --hostname string                    Optional name of local machine. Defaults to local machine name read from system.\n      --human-line-changes int             Optional number of lines added or removed by humans since last heartbeat in the current file.\n      --include strings                    Filename patterns to log. When used in combination with --exclude, files matching include will still be logged. POSIX regex syntax. Can be used more than once.\n      --include-only-with-project-file     Disables tracking folders unless they contain a .wakatime-project file. Defaults to false.\n      --internal-config string             Optional internal config file. Defaults to \'~/.wakatime/wakatime-internal.cfg\'.\n      --is-unsaved-entity                  Normally files that don\'t exist on disk are skipped and not tracked. When this option is present, the main heartbeat file will be tracked even if it doesn\'t exist. To set this flag on extra heartbeats, use the \'is_unsaved_entity\' json key.\n      --key string                         Your wakatime api key; uses api_key from ~/.wakatime.cfg by default.\n      --language string                    Optional language name. If valid, takes priority over auto-detected language.\n      --lineno int                         Optional line number. This is the current line being edited.\n      --lines-in-file int                  Optional lines in the file. Normally, this is detected automatically but can be provided manually for performance, accuracy, or when using --local-file.\n      --local-file string                  Absolute path to local file for the heartbeat. When --entity is a remote file, this local file will be used for stats and just the value of --entity is sent with the heartbeat.\n      --log-file string                    Optional log file. Defaults to \'~/.wakatime/wakatime.log\'.\n      --log-to-stdout                      If enabled, logs will go to stdout. Will overwrite logfile configs.\n      --metrics                            When set, collects metrics usage in \'~/.wakatime/metrics\' folder. Defaults to false.\n      --no-ssl-verify                      Disables SSL certificate verification for HTTPS requests. By default, SSL certificates are verified.\n      --offline-count                      Prints the number of heartbeats in the offline db, then exits.\n      --output string                      Format output. Can be "text", "json" or "raw-json". Defaults to "text".\n      --plugin string                      Optional text editor plugin name and version for User-Agent header.\n      --print-offline-heartbeats int       Prints offline heartbeats to stdout. (default 10)\n      --project string                     Override auto-detected project. Use --alternate-project to supply a fallback project if one can\'t be auto-detected.\n      --project-folder string              Optional workspace path. Usually used when hiding the project folder, or when a project root folder can\'t be auto detected.\n      --proxy string                       Optional proxy configuration. Supports HTTPS SOCKS and NTLM proxies. For example: \'https://user:pass@host:port\' or \'socks5://user:pass@host:port\' or \'domain\\user:pass\'\n      --send-diagnostics-on-errors         When --verbose or debug enabled, also sends diagnostics on any error not just crashes.\n      --ssl-certs-file string              Override the bundled CA certs file. By default, uses system ca certs.\n      --sync-offline-activity int          Amount of offline activity to sync from your local ~/.wakatime/offline_heartbeats.bdb bolt file to your WakaTime Dashboard before exiting. Can be zero or a positive integer. Defaults to 1000, meaning after sending a heartbeat while online, all queued offline heartbeats are sent to WakaTime API, up to a limit of 1000. Zero syncs all offline heartbeats. Can be used without --entity to only sync offline activity without generating new heartbeats. (default 1000)\n      --time float                         Optional floating-point unix epoch timestamp. Uses current time by default.\n      --timeout int                        Number of seconds to wait when sending heartbeats to api. Defaults to 120 seconds. (default 120)\n      --today                              Prints dashboard time for today, then exits.\n      --today-goal string                  Prints time for the given goal id today, then exits Visit wakatime.com/api/v1/users/current/goals to find your goal id.\n      --today-hide-categories string       When optionally included with --today, causes output to show total code time today without categories. Defaults to false.\n      --verbose                            Turns on debug messages in log file, and sends diagnostics if a crash occurs.\n      --version                            Prints the wakatime-cli version number, then exits.\n      --write                              When set, tells api this heartbeat was triggered from writing to a file.\n\n2026/02/09 10:48:50 failed to run wakatime-cli: flag needs an argument: --hidefilenames\n'

It seems that the --hide-file-names now require a string argument:

--hide-file-names string             Obfuscate filenames. Will not send file names to api.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions