• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[WIP] Iris Command Line Interface

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.

More Repositories

1

iris

The fastest HTTP/2 Go Web Framework. New, modern and easy to learn. Fast development with Code you control. Unbeatable cost-performance ratio 🚀
Go
24,911
star
2

neffos

A modern, fast and scalable websocket framework with elegant API written in Go
Go
563
star
3

golog

A high-performant Logging Foundation for Go Applications. X3 faster than the rest leveled loggers.
Go
321
star
4

muxie

Muxie is a modern, fast and light HTTP multiplexer for Go. Fully compatible with the http.Handler interface. Written for everyone.
Go
283
star
5

go-sessions

🔐 The sessions manager for the Go Programming Language. Supports both net/http and fasthttp.
Go
207
star
6

jwt

A fast and simple JWT implementation for Go
Go
194
star
7

rizla

👀 Rizla builds, runs and monitors your Go Applications with ease. See https://github.com/kataras/iris-cli for Iris users.
Go
190
star
8

i18n

🆕 High-performant and powerful localization and internationalization support for Go
Go
108
star
9

go-events

📣 Pure nodejs EventEmmiter for the Go Programming Language.
Go
96
star
10

server-benchmarks

🚀 Cross-platform transparent benchmarks for HTTP/2 Web Servers at 2020-2024
Go
89
star
11

blocks

Go-idiomatic View Engine
Go
70
star
12

go-websocket

🔈 Deprecated. Use https://github.com/kataras/neffos instead
Go
59
star
13

go-template

🔈 Deprecated. Use https://github.com/kataras/iris/wiki/View instead
Go
56
star
14

versioning

🆕 API Versioning for Go
Go
51
star
15

build-a-better-web-together

Deprecated. Moved to https://github.com/kataras/iris/wiki and https://docs.iris-go.com
CSS
48
star
16

httpcache

ABANDONED: Use https://github.com/kataras/iris instead. Extremely-easy cache service for HTTP/x . Supports both net/http and valyala/fasthttp
Go
43
star
17

neffos.js

Node.js and Browser support for the neffos real-time framework written in Typescript.
TypeScript
39
star
18

hcaptcha

hCaptcha HTTP middleware for Go web servers
Go
32
star
19

pg

PG is a Go library that simplifies PostgreSQL database interaction with struct-based entities, schema management, and repository pattern.
Go
28
star
20

tunnel

Public URLs for exposing your local web server
Go
26
star
21

go-fs

📁 Provides some common utilities which GoLang developers use when working with files, either system files or web files.
Go
26
star
22

rewrite

The rewrite middleware for Go. Perfect for SEO
Go
22
star
23

httpfs

Flexible and easy to use HTTP File Server for Go
Go
20
star
24

pio

Low-level package that provides an easy way to centralize different output targets. Supports colors and text decoration to all popular terminals
Go
20
star
25

sitemap

🆕 Sitemap Protocol for Go | https://support.google.com/webmasters/answer/189077?hl=en
Go
19
star
26

go-errors

⚠️ Better GoLang error handling.
Go
18
star
27

compress

HTTP Compression for Go
Go
16
star
28

go-serializer

➿ Serialize any custom type or convert any content to []byte or string, for Go Programming Language
Go
16
star
29

chronos

NEW: Chronos provides an easy way to limit X operations per Y time in accuracy of nanoseconds
Go
14
star
30

basicauth

The most advanced and powerful Go HTTP Basic Authentication middleware.
Go
13
star
31

gitbook-to-wiki

Export your GitBook as a GitHub Wiki or Docsify pages.
Go
13
star
32

sheets

📊 (Unofficial) A Lightweight Google Spreadsheets Client written in Go
Go
12
star
33

vscode-iris

Iris Web Framework snippets for Visual Studio Code
TypeScript
9
star
34

realip

Extract the real HTTP client's Remote IP Address
Go
8
star
35

methodoverride

🆕 Lets you use HTTP verbs such as PUT or DELETE in places where the client doesn't support it
Go
8
star
36

trie-examples-to-remember-again

A place to keep my coding examples for different kind of trie usage in order to remember them again - this time on github
Go
7
star
37

requestid

Unique Identifier for each HTTP request
Go
6
star
38

go-options

📦 Clean APIs for your Go Applications
Go
5
star
39

httpclient

HTTP/2 Client for Go Programming Language #golang #http
Go
4
star
40

mail

Mail is a ridiculous simple email sender written in Go
Go
4
star
41

pkg

Public Repository of the common packages that Gerasimos Maropoulos, the author of Iris, uses for various commercial or non-commercial projects.
Go
4
star
42

pgx-golog

pgx and golog integration
Go
3
star
43

ultrasecurity

10 seconds post-login OS security
Go
1
star
44

kataras

Gerasimos Maropoulos
1
star