Giter Site home page Giter Site logo

iris-cli's Introduction

Iris CLI (Work In Progress)

build status report card

Iris Command Line Interface is your buddy when it comes to get started with Iris and Go.

This project is not finished. It is under active development. TEST ONLY

Installation

The only requirement is the Go Programming Language.

$ go install github.com/kataras/iris-cli@main

Troubleshooting

If you get a network error during installation please make sure you set a valid GOPROXY environment variable.

$ go env -w GOPROXY=https://goproxy.cn,https://gocenter.io,https://goproxy.io,direct

If you get a network error during iris-cli execution, retry with the --proxy global flag.

$ iris-cli --proxy=env [COMMAND] [FLAGS]
#          --proxy=119.28.233.135:8080

List all Releases

Table of Contents

New Command

$ iris-cli new [--module=my_app] basic
#                                mvc
#                                svelte
#                                react-typescript
#                                go-admin

Run Command

$ iris-cli run
# optional argument, the project directory or
# a project template.

Download, install and run a project template at once.

$ iris-cli run react-typescript

Clean Command

$ iris-cli clean
# optional argument, the project directory,
# defaults to the current working directory.

Unistall Command

$ iris-cli unistall
# optional argument, the project directory,
# defaults to the current working directory.

Init Command

Create a new local iris project file through a local git repository.

$ iris-cli init

It creates the .iris.yml file for you. Note that, it adds a .gitignore entry of .iris.yml too. Therefore .iris.yml SHOULD be git-ignored as its settings depend on the current environment. Contributors of an iris-cli project should use their own versions of .iris.yml file.

Add Command

$ iris-cli add file.go
$ iris-cli add [--repo=iris-contrib/snippets] [--pkg=my_package] [--data=repo.json] [--replace=oldValue=newValue,oldValue2=newValue2] file.go[@version]

Check Command

$ iris-cli check [module]  
#              [iris]
#              [gopkg.in/yaml.v2]
#              [all]

Stats Command

Stats command shows stats for a collection of modules based on the major Go Proxies (goproxy.cn, gocenter.io, goproxy.io). Modules are separated by spaces.

Get Download Count

Download count per GOPROXY for a module and total for repository.

$ iris-cli stats --download-count [modules]
#  github.com/kataras/iris github.com/kataras/iris/v12 \
#  gopkg.in/yaml.v3 gopkg.in/yaml.v2

[github.com/kataras/iris]
• goproxy.cn: 27474
• gocenter.io: 5560
• total: 33034
[github.com/kataras/iris/v12]
• goproxy.cn: 33589
• gocenter.io: 3024
• total: 36613
[gopkg.in/yaml.v2]
• goproxy.cn: 2306257
• gocenter.io: 1686035
• total: 3992292
[gopkg.in/yaml.v3]
• goproxy.cn: 241121
• gocenter.io: 37909
• total: 279030

[repository total]
• github.com/kataras/iris: 69647
• gopkg.in/yaml: 4271322

Export & Compare Download Count Stats

To export the result of stats --download-count command you have to use the --out=downloads.yml flag.

$ iris-cli stats --download-count --out=downloads.yml \
  gopkg.in/yaml.v2 gopkg.in/yaml.v3 \
  github.com/kataras/iris github.com/kataras/irisv12

The above command will export the stats data to the downloads.yml file. When it contains data, the stats will be appended, so you have a history of stats. Run that command multiple times, e.g. wait 1minute, then wait 30 seconds and e.t.c. so we can have a sample data for the example.

Now, with that history, we can view the total downloads per repository with the stats compare --download-count command.

$ stats compare --download-count --since=24h --src=downloads.yml
          
[27 minutes ago]
  • github.com/kataras/iris: 70320
  • gopkg.in/yaml: 4295883
[22 minutes ago]
  • github.com/kataras/iris: 70327
  • gopkg.in/yaml: 4295886

[diff]
  • github.com/kataras/iris: +7
  • gopkg.in/yaml: +3

That will fetch the history and show the stats of the last 24 hours sorted by ascending timestamp of history entry. And shows how many new downloads each repository (base of one or more modules) has since the first entry(oldest) and the last one(newest).

The --src flag is required. You can disable the humanize time of the above by setting the --pretty=false flag. Customize its time format through the --time-format flag.

Note that the history file should be always generated through the iris-cli tool for consistent results.

List Versions

List all available releases Go Proxies have cached.

$ iris-cli stats --versions github.com/aws/copilot-cli gopkg.in/yaml.v2

[github.com/aws/copilot-cli]
• goproxy.io:
  • v0.0.4
  • v0.0.5
  • v0.0.6
  • v0.0.7
  • v0.0.8
  • v0.0.9
  • v0.1.0
  • v0.2.0
[gopkg.in/yaml.v2]
• goproxy.io:
  • v2.0.0
  • v2.1.0
  • v2.1.1
  • v2.2.0
  • v2.2.1
  • v2.2.2
  • v2.2.3
  • v2.2.4
  • v2.2.5
  • v2.2.6
  • v2.2.7
  • v2.2.8
  • v2.3.0

Contributing

We'd love to see your contribution to the Iris CLI! For more information about contributing to the Iris Command Line Interface please check the CONTRIBUTING.md file.

List of all Contributors

License

Iris CLI is free and open-source software licensed under the MIT License.

iris-cli's People

Contributors

dependabot[bot] avatar kataras avatar tautastic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

iris-cli's Issues

Document if .iris.yml should be git ignored or not.

What's the recommendation on .iris.yml? It seems like the "Dest" property contains the full path of the source, which can be different per developer. I assume this means it should not be commited to git? What's your suggestion here.

Also, have you though of naming the binary simply 'iris' instead of 'iris-cli'? Similar to rails and buffalo, for example

[BUG]

Describe the bug
Run iris-cli run . An error occurred.
fork/exec /bin/sh: operation not permitted

To Reproduce
Steps to reproduce the behavior:

  1. iris-cli run

Expected behavior
Run the project normally

Screenshots
image

Desktop (please complete the following information):

  • OS: ubuntu19.04
    Linux version 4.4.0-18362-Microsoft ([email protected]) (gcc version 5.4.0 (GCC) ) #476-Microsoft Fri Nov 01 16:53:00 PST 2019

Additional context

iris-cli run react-typescript requires npm [BUG]

Describe the bug
The command iris-cli run react-typescript requires npm to be installed. I have [email protected] and [email protected] installed, I don't see why the CLI can't use whatever node package manger is installed.

To Reproduce
Steps to reproduce the behavior:

  1. Have nodejs but not npm installed on your system.
  2. Run iris-cli run react-typescript

Expected behavior
I would either expect iris-cli to auto recognize any node package manger available on my system or have me set my prefered node package manger in .iris.yml

Screenshots
Screenshot from 2023-01-14 17-47-12

Desktop (please complete the following information):

  • OS: [Manjaro Linux x86_64]
  • Kernel: [6.1.1-1-MANJARO]
  • Shell: zsh 5.9
  • DE: GNOME 43.2
  • WM: Mutter (X11)
  • Terminal: gnome-terminal-server

Additional context
I'm not familiar with iris or iris-cli but I will try to implement a solution if I can.

Address not found

~ go get github.com/kataras/iris-cli
unrecognized import path "golang.org/x/sys/unix": https fetch: Get "https://golang.org/x/sys/unix?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
unrecognized import path "golang.org/x/sync/errgroup": https fetch: Get "https://golang.org/x/sync/errgroup?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
unrecognized import path "golang.org/x/crypto/openpgp": https fetch: Get "https://golang.org/x/crypto/openpgp?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
unrecognized import path "golang.org/x/net/context": https fetch: Get "https://golang.org/x/net/context?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
unrecognized import path "golang.org/x/crypto/ssh/agent": https fetch: Get "https://golang.org/x/crypto/ssh/agent?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
unrecognized import path "golang.org/x/crypto/ssh": https fetch: Get "https://golang.org/x/crypto/ssh?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
unrecognized import path "golang.org/x/crypto/ssh/knownhosts": https fetch: Get "https://golang.org/x/crypto/ssh/knownhosts?go-get=1": dial tcp 216.239.37.1:443: i/o timeout
unrecognized import path "golang.org/x/net/proxy": https fetch: Get "https://golang.org/x/net/proxy?go-get=1": dial tcp 216.239.37.1:443: i/o timeout

go get iris-cli error

rayner-mac:~ rayner$ go get github.com/kataras/iris-cli
go: finding github.com/kataras/iris-cli latest
go: downloading github.com/kataras/iris-cli v0.0.0-20200206040818-a782c6323472
go: extracting github.com/kataras/iris-cli v0.0.0-20200206040818-a782c6323472
go get: github.com/kataras/[email protected] requires
github.com/AlecAivazis/survey/[email protected]: reading https://goproxy.io/github.com/%21alec%21aivazis/survey/v2/@v/v2.0.0-00010101000000-000000000000.mod: 404 Not Found

iris-cli command not found error

I've installed iris-cli on my system(ubuntu 21,Go version 1.17) using
go install github.com/kataras/iris-cli@main
When i try to run iris-cli i get
iris-cli: command not found
any idea about this?

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.