Code Monkey home page Code Monkey logo

arcli's Introduction

arcli

Go Report Card arcli

arcli - Awesome Redmine CLI

arcli is CLI for Redmine that simplifies some actions such as checking for issue details and tracking time. It supports Redmine v3.3.1+ (tested with v3.3.1 and v4.1.0).

Quick examples

Listing (ls) all assigned issues (i) to current user.

➜  ~ arcli i ls  
    ID  PROJECT           SUBJECT                   URL                                       
 20123  Webshop           Managing users            https://custom.url.com/issues/20123 
 20660  Webshop Android   Notification management   https://custom.url.com/issues/20460 

Log spent time (l) for issue (i) with ID 20123 with time duration (-t) of 1.5 hours.

➜  ~ arcli l i 20123 -t 1.5
Time entry created!
 ENTRY ID  PROJECT NAME  ISSUE ID  HOURS  ACTIVITY     COMMENT  SPENT ON        
 39458     Webshop       20123     1.5    programming           Thu, 2020-03-12 

Show tracking time status.

➜  ~ arcli status
[324] John Doe ([email protected])
PERIOD       HOURS   H/LOG   # of I   # of P  
Today        0       0       0        0       
Yesterday    0       0       0        0       
This Week    0       0       0        0       
Last Week    40      6.7     3        2       
This Month   40      6.7     3        2       
Last Month   160     5.5     8        6 

Installation

macOS

$ brew tap mightymatth/arcli https://github.com/mightymatth/arcli
$ brew install arcli

Linux

Get it from the Snap Store

snap install arcli

Usage

➜  ~ arcli -h
Awesome Redmine CLI. Wrapper around Redmine API

Usage:
  arcli [flags]
  arcli [command]

Available Commands:
  aliases     Words that can be used instead of issue or project ids
  completion  Generate the autocompletion script for the specified shell
  defaults    User session defaults
  help        Help about any command
  issues      Shows issue details
  log         Time entries on projects and issues
  login       Opens login interactive login session
  logout      Logout current user
  projects    Shows project details
  search      Search Redmine
  status      Overall account info

Flags:
  -h, --help      help for arcli
  -v, --version   Current arcli and supported Redmine API version

Use "arcli [command] --help" for more information about a command.

Development

# start local Redmine server
docker compose up -d

# use `go run main.go <command>` instead of `arcli <command>`

# login with admin user (username: admin, password: admin)
go run main.go login inline -s http://localhost:3000 -u admin -p admin

# shut down Redmine server
docker compose down

Release

CLI is released using goreleaser via GitHub Releases, using GitHub Actions.

To run a dry release locally, install goreleaser and run:

goreleaser release --skip-publish --skip-validate --clean

... and the artifacts will be in dist/.

FAQ

My username and password is correct, but I get 403. What's the problem?

On freshly installed Redmine server, REST API web service is turned off by default. To turn it on, go to browser, open Redmine server URL, log in with administrator, go to Administrator tab > Settings > API tab and turn on Enable REST web service option.

I have a server with self-signed certificate. How to connect?

You can provide a self-signed certificate in login commands:

arcli login inline -s https://path.to.redmine.server -c path/to/cert/server.crt -u username -p password

To make a local development setup with SSL, check out this guide.

arcli's People

Contributors

mightymatth avatar goreleaserbot avatar dependabot[bot] avatar azhuchkov 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.