Giter Club home page Giter Club logo

ttrack's Introduction

ttrack

Time tracking CLI tool that integrates with Freshbooks.

I use this tool every single day, but I only work on it when I'm sufficiently ticked off about a bug or missing feature. If you like to stay in the terminal to log time entries and don't mind a few rough edges, then this may be the tool for you.

Install

go get -u github.com/hdoupe/ttrack

Getting started

  1. Get the client id and secret from me.

  2. Sign into freshbooks with this command: ttrack connect.

    $ ttrack connect
    Using client: default
    
    Go to link:  https://my.freshbooks.com/service/auth/oauth/authorize/?response_type=code&redirect_uri=https://hankdoupe.com/ttrack.html&client_id=9af0623cc6bb6d3717e1c5e73f2f779992ad74e5187e6a1c95e4a651bb2eef0c
    Enter authorization code: 13cafca6bf813e73c039169fe4fc989456bef0214fafe269ea29a824e386438d
    200 OK
    Writing credentials to: /home/hankdoupe/.ttrack.creds.json
    
  3. Create a file in your home directory named .ttrack.yaml with the client ID and secret values:

    # .ttrack.yaml
    clientID:
    clientSecret:
  4. Create a client and project on Freshbooks if you haven't already.

    Connect ttrack with the project using the ID's you just found:

    $ ttrack clients add --client-id 158233 --project-id 7129723 --nickname my-project
    Using client: default
    
    Added new client:
    Nickname: my-project
    Client ID: 158233
    Project ID: 7129723
    

    List your clients:

    $ ttrack clients list
    Using client: default
    
    Nickname: default
    Client ID: 0
    Project ID: 0
    
    Nickname: my-project
    Client ID: 158233
    Project ID: 7129723
    

    Swap to the new client:

    $ ttrack clients set-current my-project
    Using client: default
    
    Current client set to: my-project
    
  5. Create and finish a time entry using current client / project:

    $ ttrack start -s 2:00PM 'Doing something awesome'
    Using client: my-project
    
    Creating new time entry...
    
    Description: Doing something awesome
    Started At: Tue Mar 30 14:30:00 EDT 2021
    Finished At: In progress
    Duration: 0s
    ID: 0 (External ID: 134861033)
    Client ID: 158233
    
    $ ttrack finish
    Using client: my-project
    
    Finishing last time entry...
    
    Description: Doing something awesome
    Started At: Tue Mar 30 14:30:00 EDT 2021
    Finished At: Tue Mar 30 14:43:00 EDT 2021
    Duration: 13m0s
    ID: 478 (External ID: 134861033)
    Client ID: 158233
    
  6. List today's time entries:

    $ ttrack list --since 8:00AM
    
    # ignore real time entries ;)...
    
    Description: Doing something awesome
    Started At: Tue Mar 30 14:30:00 EDT 2021
    Finished At: Tue Mar 30 14:43:00 EDT 2021
    Duration: 13m0s
    ID: 478 (External ID: 134861033)
    Client ID: 158233
    
    Total hours recorded:  1h57m0s
    

    or this month's time entries:

    $ ttrack log --since 2021-03-21
    
    # ignore real time entries ;)...
    
    Description: Doing something awesome
    Started At: Tue Mar 30 14:30:00 EDT 2021
    Finished At: Tue Mar 30 14:43:00 EDT 2021
    Duration: 13m0s
    ID: 478 (External ID: 134861033)
    Client ID: 158233
    
    Total hours recorded:  76h34m0s
    

ttrack's People

Contributors

hdoupe avatar ljia9 avatar

Stargazers

Ben Bolte avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.