Skip to content

Commit cdf2c4c

Browse files
committed
docs: improve readme
1 parent 61dced1 commit cdf2c4c

File tree

2 files changed

+99
-13
lines changed

2 files changed

+99
-13
lines changed

Makefile

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
APP_NAME ?= nctl
2+
3+
# try getconf (linux / macos), getconf (BSD), nproc, then fallback to 1
4+
NPROCS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || nproc 2>/dev/null || echo 1)
5+
MAKEFLAGS += --jobs=$(NPROCS)
6+
7+
.PHONY: all build test clean lint update help
8+
9+
all: build
10+
11+
build:
12+
GITHUB_REPOSITORY=ninech/nctl goreleaser build --clean --snapshot --single-target
13+
14+
test:
15+
go test -race ./...
16+
17+
lint: mod-tidy vet staticcheck golangci-lint modernize govulncheck
18+
19+
lint-fix:
20+
go mod tidy
21+
golangci-lint run --fix
22+
go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -test -fix ./...
23+
$(MAKE) lint
24+
25+
mod-tidy:
26+
go mod tidy -diff
27+
28+
vet:
29+
go vet ./...
30+
31+
golangci-lint:
32+
golangci-lint run
33+
34+
staticcheck:
35+
go run honnef.co/go/tools/cmd/staticcheck@latest ./...
36+
37+
modernize:
38+
go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -test ./...
39+
40+
govulncheck:
41+
go run golang.org/x/vuln/cmd/govulncheck@latest ./...
42+
43+
update:
44+
go get -v -u ./... && go mod tidy
45+
46+
clean:
47+
rm -rf dist/
48+
49+
help:
50+
@echo "make # Build $(APP_NAME)"
51+
@echo "make test # Run tests"
52+
@echo "make lint-fix # Run linters and try fix issues"
53+
@echo "make lint # Run linters"
54+
@echo "make update # Update dependencies"
55+
@echo "make clean # Remove built app"

README.md

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
# nctl
22

3-
```bash
4-
$ nctl --help
5-
Usage: nctl <command>
3+
[![CI](https://github.com/ninech/nctl/actions/workflows/go.yml/badge.svg)](https://github.com/ninech/nctl/actions/workflows/go.yml)
4+
[![Release](https://img.shields.io/github/v/release/ninech/nctl)](https://github.com/ninech/nctl/releases)
5+
[![Go Report Card](https://goreportcard.com/badge/github.com/ninech/nctl)](https://goreportcard.com/report/github.com/ninech/nctl)
6+
[![License](https://img.shields.io/github/license/ninech/nctl)](LICENSE)
67

7-
Interact with Nine API resources. See https://docs.nineapis.ch for the full API docs.
8+
`nctl` is the command-line interface for [Nine](https://nine.ch)'s cloud platform.
9+
It lets you manage applications, services, storage, and more from your terminal.
810

9-
Run "nctl <command> --help" for more information on a command.
10-
```
11+
**[Documentation](https://docs.nine.ch/docs/nctl/)**
12+
13+
## Resources
1114

12-
## Setup
15+
| Category | Resources |
16+
| -------------------------- | ------------------------------------------------------------------ |
17+
| **deplo.io** | Applications, Builds, Releases, Configs |
18+
| **storage.nine.ch** | PostgreSQL, MySQL, OpenSearch, KeyValueStore, Buckets, BucketUsers |
19+
| **infrastructure.nine.ch** | Kubernetes Clusters, CloudVMs |
20+
| **networking.nine.ch** | ServiceConnections |
21+
| **iam.nine.ch** | APIServiceAccounts |
22+
| **management.nine.ch** | Projects |
23+
24+
## Installation
1325

1426
```bash
1527
# If you have go already installed
@@ -37,13 +49,32 @@ dnf install nctl
3749
# Install yay: https://github.com/Jguer/yay#binary
3850
yay --version
3951
yay -S nctl-bin
52+
53+
# EGet
54+
# Install eget https://github.com/zyedidia/eget
55+
eget ninech/nctl
4056
```
4157

42-
For Windows users, nctl is also built for arm64 and amd64. You can download the
43-
latest exe file from the [releases](https://github.com/ninech/nctl/releases) and
44-
install it.
58+
Binaries for macOS, Linux and Windows can be found on the [releases](https://github.com/ninech/nctl/releases) page.
59+
60+
## Getting Started
61+
62+
1. Login to the API: `nctl auth login`
63+
2. Explore available commands: `nctl --help`
64+
65+
For complete documentation, tutorials, and guides, visit **[docs.nine.ch/docs/nctl/](https://docs.nine.ch/docs/nctl/)**.
66+
67+
## Development
68+
69+
```bash
70+
make # Build nctl
71+
make test # Run tests
72+
make lint # Run linters
73+
make lint-fix # Run linters and fix issues
74+
make update # Update dependencies
75+
make clean # Remove built artifacts
76+
```
4577

46-
## Getting started
78+
## License
4779

48-
* login to the API using `nctl auth login`
49-
* run `nctl --help` to get a list of all available commands
80+
[Apache 2.0](LICENSE)

0 commit comments

Comments
 (0)