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.
- 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.
- Go (Golang) environment set up on your machine.
- Access to the Forest App.
- Clone the repository:
git clone [email protected]:kierenfunk/forest-cli.git
- Navigate to the project directory:
cd forest-cli
- Build the project:
make
Before using the CLI commands, make sure to set your Forest App credentials as environment variables or pass them as arguments.
export FOREST_USERNAME="[email protected]"
export FOREST_PASSWORD="your_password"
List all trees associated with the user's account.
forest list
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
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"
List all user-defined tags.
forest tags
List all unlocked tree types for the user.
forest trees
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.