Skip to main content

Common interface to the WakaTime api.

Project description

Tests Coverage Version Dependencies Slack

Command line interface to WakaTime used by all WakaTime text editor plugins.

Go to http://wakatime.com/editors to install the plugin for your text editor or IDE.

Installation

Note: You shouldn’t need to directly use this package unless you are building your own plugin or your text editor’s plugin asks you to install the WakaTime CLI manually.

Each plugin installs the WakaTime CLI for you, except for the Emacs WakaTime plugin.

Install the plugin for your IDE/editor:

https://wakatime.com/editors

Each plugin either comes pre-bundled with WakaTime CLI, or downloads the latest version from GitHub for you.

Usage

If you are building a plugin using the WakaTime API then follow the Creating a Plugin guide.

For command line options, run wakatime --help.

Some more usage information is available in the FAQ.

Configuring

Options can be passed via command line, or set in the $WAKATIME_HOME/.wakatime.cfg config file. Command line arguments take precedence over config file settings. The $WAKATIME_HOME/.wakatime.cfg file is in INI format. An example config file with all available options:

[settings]
debug = false
api_key = your-api-key
hidefilenames = false
exclude =
    ^COMMIT_EDITMSG$
    ^TAG_EDITMSG$
    ^/var/
    ^/etc/
include =
    .*
offline = true
proxy = https://user:pass@localhost:8080
timeout = 30
hostname = machinename
[projectmap]
    projects/foo = new project name
    ^/home/user/projects/bar(\d+)/ = project{0}

For commonly used configuration options, see examples in the FAQ.

Troubleshooting

Read the FAQ for solutions to common problems.

WakaTime CLI writes errors to a common log file in your User $WAKATIME_HOME directory:

~/.wakatime.log

Set debug=true in ~/.wakatime.cfg for more verbose logging, but don’t forget to set it back to debug=false afterwards or your editor might be laggy while waiting for WakaTime CLI to finish executing.

Each plugin also has it’s own log file for things outside the scope of WakaTime CLI:

  • Atom writes errors to the developer console (View -> Developer -> Toggle Developer Tools)

  • Brackets errors go to the developer console (Debug -> Show Developer Tools)

  • Cloud9 logs to the browser console (View -> Developer -> JavaScript Console)

  • Coda logs to /var/log/system.log so use sudo tail -f /var/log/system.log in Terminal to watch Coda 2 logs

  • Eclipse logs can be found in the Eclipse Error Log (Window -> Show View -> Error Log)

  • Emacs messages go to the messages buffer window

  • Jetbrains IDEs (IntelliJ IDEA, PyCharm, RubyMine, PhpStorm, AppCode, AndroidStudio, WebStorm) log to idea.log (locating IDE log files)

  • Komodo logs are written to pystderr.log (Help -> Troubleshooting -> View Log File)

  • Netbeans logs to it’s own log file (View -> IDE Log)

  • Notepad++ errors go to AppData\Roaming\Notepad++\plugins\config\WakaTime.log (this file is only created when an error occurs)

  • Sublime Text logs to the Sublime Console (View -> Show Console)

  • TextMate logs to stderr so run TextMate from Terminal to see any errors (enable logging)

  • Vim errors get displayed in the status line or inline (use :redraw! to clear inline errors)

  • Visual Studio logs to the Output window, but uncaught exceptions go to ActivityLog.xml (more info…)

  • Vscode logs to the developer console (Help -> Toggle Developer Tools)

  • Xcode type sudo tail -f /var/log/system.log in a Terminal to view Xcode errors

Check that heartbeats are received by the WakaTime api with the last_heartbeat and last_plugin attributes from the current user api resource. You can also see a list of all your plugins and when they were last seen by the api with the user_agents api endpoint.

Note: Saving a file forces a heartbeat to be sent.

Official API Docs

Contributing

Before contributing a pull request, make sure tests pass:

virtualenv venv
. venv/bin/activate
pip install tox
tox

The above will run tests on all Python versions available on your machine. To just run tests on a single Python version:

virtualenv venv
. venv/bin/activate
pip install -r dev-requirements.txt
nosetests

Many thanks to all contributors!

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wakatime-7.0.1.tar.gz (1.4 MB view details)

Uploaded Source

File details

Details for the file wakatime-7.0.1.tar.gz.

File metadata

  • Download URL: wakatime-7.0.1.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wakatime-7.0.1.tar.gz
Algorithm Hash digest
SHA256 4bbf8e0b1460b6ac5c6102d319341db812e0cf8a6aafb6ceabdeda9df3858b18
MD5 7b7af49fd2352d35aa081fe04f6b2201
BLAKE2b-256 47040e07d0be28145f3ee4097fc1eb13cac39321b69d3f9ce4cc98f4db2a7d4a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page