Giter Club home page Giter Club logo

forest-cli's Introduction

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.


forest-cli's People

Contributors

kierenfunk avatar

Watchers

 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.