WeeklyTimelog CLI for Terminal

fabian 12-10-2017 cli automation api

WeeklyTimelog is an Automatic Time tracking for Developers, that integrates with terminal, git repositories, popular task managers (Asana, Trello, YouTrack, Jira, etc), and many other developer productivity tools.

Official NPM Package Page

The CLI

The CLI is designed to help developers (and net admins) to track their terminal activities such as SSHing into servers, deploying, running tests, documenting maintenance work, etc. You may execute the WT command directly from the command line in manual mode (start/stop mode) or add the command to shell scripts or cron jobs to record the activity (as they are triggered).

Installation

  1. Install NodeJS and npm read more..

  2. Run sudo npm install -g weeklytimelog-cli

  3. Run wt --help

USAGE

Config

This command needs to be executed just once to configure the host. It basically authenticates against the WeeklyTimelog server and stores a temporary token in a local setting file.

    Pre-Requisite: 
            Please register in weeklytimelog.com first, to obtain the <username> and <password>

    Usage:
            wt config <username> <password>

    Sample:
            wt config myuser 123123

Timer (Start/Stop)

Tracks time spent in real time.

    Usage:
            wt start <description>

    Samples:
            wt start "Checking backups, cleaning up disk space"
            wt stop

Last

Records all the SSH access history logs entries in weeklytimelog as activity reminders.

    Usage:
            wt last

Activity

An acitivy reminds the developer of work accomplished during the day. It is not an effective timelog, but instead just a reminder. The developer can later log into WeeklyTimelog to convert these activity reminders into real timelogs.

    Usage:
            wt activity <description>

    Sample:
            wt activity "coding wt cli" 

Timelog

Describes the task performed and time spent allocated to a project. Timelogs are visible by project owner for further reporting, cost analysis, share with clients in real time, etc.

    Usage:
            wt timelog <hours> <description> [-p projectId]
                    projectId is optional. 

    Samples:
            wt timelog 1h30m "server maintenance" 
            wt timelog 1.5 "server maintenance" 

USE CASES

  • Manually run last command to record all your ssh access history activites.

  • Update your bash profile to start tracking time when SSHing into server. vim ~/.bashrc and add wt activity "Connecting to server for maintenance"

  • Update you deployment and testing script to automatically create activities (reminders)

  • SSH into server or from local terminal, use start command to record your activity.

  • Manually issue activity and timelogs commands on demand.

Further customization - API

The cli will provide basic commands but further customization can be done from any language thru our API.

FAQ

Q. Is the CLI hooked $PROMPT_COMMAND ? A. NO. we are not reading the prompt, logs, tty output or any other sensitive data.

Q. Is the CLI sending the entire session to the server? A. NO. we are basically executing a API restfull call (to our server) with the activity description, time spent and host name.

Q. Is the CLI secure ? A. YES, source code can be accessed https://gitlab.com/fabian-castillo-developer/weeklytimelog-cli for review.

Support

Supported Integrations