Skip to content

Commit

Permalink
Patch install and README
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy Fagerholm committed Jan 12, 2022
1 parent 5b2aadc commit 19ba789
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 50 deletions.
60 changes: 15 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,27 @@
![.github/workflows/release.yaml](https://github.com/Faagerholm/clockify-cli/workflows/.github/workflows/release.yaml/badge.svg?branch=v1.1&event=release)
[![CLI Best Practices](https://bestpractices.coreinfrastructure.org/projects/4331/badge)](https://bestpractices.coreinfrastructure.org/projects/4331)

<a href="https://www.buymeacoffee.com/Faagerholm" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

# clockify-cli
**Version 2.0 is out!**

Now with to new UI for a better experiance
Integrate your clocking with your favorite CLI.

*Please note: This tool does not take any responsibilities of spam on behalf of the user against the clockify API.*

## Install:

```bash
wget https://raw.githubusercontent.com/Faagerholm/clockify-cli/master/install.sh && ./install.sh
```

## Usage:
### Usage:
```
clockify-cli [flags]
clockify-cli [command]
clockift-cli // Start menu
```
## Available commands:
### Available commands:
```
Available Commands:
add-key Add users API-KEY, this will store it in a yaml file.
add-part-time Add part-time work to your account
check-balance Check balance
current-user get current user
default-project Select default workspace project
help Help about any command
list-projects List all projects
menu Select action to perform
reset Resets viper values
setup Setup
start-timer Select a project and start a timer
stop-timer Stop timer
add-key Add users API-KEY
balance Display if you're above or below zero balance.
help Help about any command
off-projects Select which projects should be omitted from reports
projects Select default workspace project
reset Resets viper values
start start timer for project. Use 'default' flag to use default project id.
stop Stops an active timer.
user get current user
version Print the version number of Clockify-cli
workspace Get workspaces
Flags:
--config string config file (default is $HOME/.clockify-cli/config.yaml)
--config string config file (default is $HOME/.clockify-cli/config.yaml) (default "./config.yaml")
-h, --help help for clockify-cli
--viper use Viper for configuration (default true)
Use "clockify-cli [command] --help" for more information about a command.
```

## Contributing:

Please open an issue if there is something that is not working or you would like to be added to this project.

## External API:

Clockify has an API that this project heavily depends on. The API can be accessed by any user that has generated an API key from their user settings page.
More information about the API can be found here: https://clockify.me/developers-api
```
9 changes: 4 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ fi
echo "Creating alias for clockify"
if [ -f "$HOME/.zshrc" ]; then
echo "Adding it to your zshrc file."
alias clockify >/dev/null 2>&1 && echo "clockify is set as an alias, skipping update of source file." || echo "alias clockify='$PROJECT_HOME/clockify-cli'" >> $HOME/.zshrc
alias clockify >/dev/null 2>&1 && echo "clockify is set as an alias, skipping update of source file." || echo "alias clockify='$PROJECT_HOME/clockify-cli'" >>$HOME/.zshrc
elif [ -f "$HOME/.bash_profile" ]; then
echo "Adding it to your bash_profile file."
alias clockify >/dev/null 2>&1 && echo "clockify is set as an alias, skipping update of source file." || echo "alias clockify='$PROJECT_HOME/clockify-cli'" >>$HOME/.bash_profile
else
echo "Could not fine a terminal profile, please manually add 'alias clockify='$PROJECT_HOME/clockify-cli' to your profile.";
else
echo "Could not fine a terminal profile, please manually add 'alias clockify='$PROJECT_HOME/clockify-cli' to your profile."
fi

processor="$(uname -m)"
Expand Down Expand Up @@ -164,7 +164,7 @@ fi

echo 'Done!'
echo '-------------------'
mv clockify-cli $PROJECT_HOME/clockify-cli
mv clockify-cli $PROJECT_HOME
echo 'To get started you will need a API-key. The key can be genereted on your profile page.'

$PROJECT_HOME/clockify-cli init
Expand All @@ -173,4 +173,3 @@ $PROJECT_HOME/clockify-cli user
echo "Initialization completed, please run 'clockify help' to get started."
echo "You will have to restart any active terminal instance to access you newly created command."
echo "You can also read the source file with e.g. 'source ~/.zshrc'".

0 comments on commit 19ba789

Please sign in to comment.