You can only reap what you sow in any Harvest. For the CLI junkies, waiting for a web page to load and react can be frustrating. Sow helps relieve that frustration by making it possible to interact with Harvest without needing to wait on the web UI. Hopefully, this will help you sow faster and reap more in Harvest!
$ npm install -g sow
Sow focuses on time entry and history. Its aim is to make it easy to do CRUD- like actions on time tracking, and produce some very simple reports all from the CLI. Most commands have a shortcut as well to make usage as fast as possible.
Guided prompts to create an initial configuration. For the optimist, the base
config items can be passed as options. Unless --force is used, this will test
the settings and prompt in the case of a failure. Can also be called using the
Parameters: [--subdomain ] [--email <email_address>] [--password ] [--force]
Harvest provides multiple resources, with the primary ones being clients, projects, tasks, and users. All resource commands have an option to select the resource type: --type. These can be either singular or plural or even a single letter. Valid Resource types are:
Create an alias for a resource. The alias must be unique for its type and cannot contain dots (.). The second parameter can be either the resource's ID (if known) or a string for fuzzy searching. If multiple matches are found by the search, the first 9 medium or strong matches will be provided as options from which you can choose the correct client.
Parameters: [--type <resource_type>] <target_resource>
$ sow alias cool "Cool Project" // Set a project alias for Cool Project $ sow a -t c joeco Joe // Set a client alias for Joe, Corp $ sow alias --type tasks design "Print Design" // Set a task alias for Print Design
Shows all aliases. Optionally, this can be restricted to a single resource type.
Parameters: [--type <resource_type>]
$ sow aliases $ sow la -t c // Lists all saved client aliases
Shows all resource of a given type. This defaults to showing all active (and in the case of tasks, default) resources. The --all option will show inactive (and, for tasks, non-default) resources as well. In the case of projects, the --client option can restrict the listing to a given client alias.
Parameters: [--type <resource_type>] [--client ] [--all]
$ sow list // Lists all active projects $ sow ls -a -c joeco // List all projects for the Joe, Corp client $ sow ls -t t // Lists all active and default tasks
Entering time is a heavily opiniated thing. Sow tries to be as flexible as possible so that you can continue doing work without worrying about entering the right format. Most time entry commands take a few common parameters.
Create a new inactive timer.
Parameters: <task_string> [comment]
$ sow log cool design 0:45 $ sow l cool.design +0.75 $ sow l design@cool +0:45 "Some kind of comment" All examples a timer for the design task under "Cool Project" with 45 minutes
Create a new running timer, optionally adding time to it.
Parameters: <task_string> [time] [comment]
$ sow start cool design $ sow s cool.design +0.75 // Add 45 minutes to the timer $ sow s design@cool "Some kind of comment" // Add a comment
Pause the active timer. Can also use
stop as an alternative command.
$ sow pause $ sow stop
Continue an existing timer. This has three different forms:
Parameters: [index] [--negative] or [task_string] [comment]
$ sow resume $ sow r design@cool $ sow resume -n 2
Updates the comment/note for the currently running timer.
$ sow note "Some other comment"
Sow can provide a simple, tree-structured output for summarising time, well, spent. Each of the time reporting commands takes an optional parameter of a specific date. Sow uses the excellent chrono package to parse the date string. Some examples of valid date strings include:
Day provides, as may be expected, a summary of a day's entries. If a date is not provided, today will be used.
$ sow day // Today's entries $ sow d 2012-12-01 // 01 Dec 2012 $ sow day yesterday $ sow d "last Tuesday"
Provides a summary of all entries within a week (Mon - Sun). The result will be for the week in which the provided date exists.
$ sow week // This week's entries $ sow w 2012-12-01 // Week of 01 Dec 2012
Provides a summary of all entries within a range of dates.
Parameters: from_date to_date
Configuration settings are stored in a single JSON file. The init command
Sow requires only three settings to operate:
Sow assumes some things, but makes it possible for you to override those assumptions without needing to alter the core files.