Giter Club home page Giter Club logo

toggl-cli's Introduction

toggl-cli

Unofficial CLI for Toggl Track written in Rust, using the v9 API.

Usage

Building the binary.

cargo build # or cargo build --release

Installing the binary.

cargo install --path .

This places the release optimized binary at ~/.cargo/bin/toggl. Make sure to add ~/.cargo/bin to your $PATH so that you can run the binary from any directory.

You can invoke the binary using the toggl command now. Alternatively you can also run the command directly using cargo run

cargo run [command]


# To list the last 3 time-entries
cargo run list -n 3

The first command you need to run is auth to set up your Toggl API token.

cargo run auth [API_TOKEN] # or toggl auth [API_TOKEN]

The API token is stored securely in your Operating System's keychain using the keyring crate.

Commands

Run the help command to see a list of available commands.

$ toggl help
toggl 0.3.0
Toggl command line app.

USAGE:
    toggl [FLAGS] [OPTIONS] [SUBCOMMAND]

FLAGS:
        --fzf        Use fzf instead of the default picker
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --proxy <proxy>    Use custom proxy

SUBCOMMANDS:
    auth
    config      Manage auto-tracking configuration
    continue
    current
    help        Prints this message or the help of the given subcommand(s)
    list
    running
    start       Start a new time entry. Call with no arguments to start in interactive mode.
    stop

You can also run the help command on a specific subcommand.

$ toggl help start
toggl-start 0.1.0
Start a new time entry. Call with no arguments to start in interactive mode.

USAGE:
    toggl start [FLAGS] [OPTIONS] [description]

FLAGS:
    -b, --billable
    -h, --help        Prints help information
    -V, --version     Prints version information

OPTIONS:
    -p, --project <project>

ARGS:
    <description>

Testing

To run the unit-tests

cargo test

Linting

Common lint tools

cargo fmt # Formatting the code to a unified style.

cargo clippy --fix # To automatically fix common mistakes.

The CI will also run the lint commands for all pull-requests. See pull_request.yml for more details.


Built by the Watercooler Studio

toggl-cli's People

Contributors

shantanuraj avatar heytherewill avatar tcrammond 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.