Categorygithub.com/kierenfunk/forest-cli
module
0.0.0-20240517092804-4ce7aaf39c03
Repository: https://github.com/kierenfunk/forest-cli.git
Documentation: pkg.go.dev

# README

Forest App CLI (Unofficial)

This command line interface (CLI) tool is designed to interact with the Forest App API. It provides functionality for listing, adding, updating, and managing trees and tags associated with a user's account.

Features

  • Login: Authenticate with the Forest App API.
  • List Trees: Retrieve and display all trees associated with the user's account.
  • Add Tree: Add a new tree with customizable start time, end time, tag, tree type, and notes.
  • Update Tree: Update an existing tree's details.
  • List Tags: Retrieve and display all user-defined tags.
  • List Unlocked Trees: Display all the user's unlocked tree types.

Prerequisites

  • Go (Golang) environment set up on your machine.
  • Access to the Forest App.

Installation

  1. Clone the repository:
    git clone [email protected]:kierenfunk/forest-cli.git 
    
  2. Navigate to the project directory:
    cd forest-cli
    
  3. Build the project:
    make
    

Usage

Before using the CLI commands, make sure to set your Forest App credentials as environment variables or pass them as arguments.

Setting Up Environment Variables

export FOREST_USERNAME="[email protected]"
export FOREST_PASSWORD="your_password"

Available Commands

1. List Trees

List all trees associated with the user's account.

forest list

2. Add Tree

Add a new tree to the user's account.

forest add --start-time "2024-01-01T00:00:00+00:00" --end-time "2024-01-01T01:00:00+00:00" --tag "Work" --tree "Cedar" --note "Focus session"

Alternatively you can set the tree as chosen randomly from your set of unlocked trees.

forest add --start-time "2024-01-01T00:00:00+00:00" --end-time "2024-01-01T01:00:00+00:00" --tag "Work" --note "Focus session" --random

3. Update Tree

Update an existing tree's details.

forest update --plant-id 123 --start-time "2024-01-02T00:00:00+00:00" --end-time "2024-01-02T01:00:00+00:00" --tag "Study" --note "Study session" 

4. List Tags

List all user-defined tags.

forest tags

5. List Unlocked Trees

List all unlocked tree types for the user.

forest trees

Contributing

Contributions are welcome! If you have suggestions for improvements or encounter any issues, please feel free to open an issue or submit a pull request.


# Packages

No description provided by the author
No description provided by the author