@kubernetesjs/cli 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +137 -30
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,61 +1,168 @@
1
1
  # @kubernetesjs/cli
2
2
 
3
- <p align="center">
4
- <img src="https://user-images.githubusercontent.com/545047/188804067-28e67e5e-0214-4449-ab04-2e0c564a6885.svg" width="80"><br />
5
- KubernetesJS CLI
3
+ <p align="center" width="100%">
4
+ <img src="https://github.com/hyperweb-io/interweb-utils/assets/545047/89c743c4-be88-409f-9a77-4b02cd7fe9a4" width="80">
5
+ <br/>
6
+ TypeScript CLI for Kubernetes
7
+ <br />
8
+ <a href="https://github.com/hyperweb-io/kubernetesjs/actions/workflows/ci.yml">
9
+ <img height="20" src="https://github.com/hyperweb-io/kubernetesjs/actions/workflows/ci.yml/badge.svg"/>
10
+ </a>
11
+ <a href="https://github.com/hyperweb-io/kubernetesjs/blob/main/LICENSE">
12
+ <img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/>
13
+ </a>
6
14
  </p>
7
15
 
8
- ## install
16
+ A command-line interface for interacting with Kubernetes clusters, built with TypeScript.
17
+
18
+ ## Installation
19
+
20
+ ```sh
21
+ npm install -g @kubernetesjs/cli
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ The CLI provides several commands for managing Kubernetes resources. You can use either `k8s` or `kubernetes` as the command prefix:
27
+
28
+ ```sh
29
+ k8s <command> [options]
30
+ # or
31
+ kubernetes <command> [options]
32
+ ```
33
+
34
+ Options:
35
+ - `--client-url`: Kubernetes API server URL (default: http://localhost:8001)
36
+
37
+
38
+ ### Available Commands
39
+
40
+ #### Get
41
+ Retrieve information about Kubernetes resources.
42
+
43
+ ```sh
44
+ k8s get <resource> [options]
45
+ ```
46
+
47
+ #### Apply
48
+ Apply configurations to your Kubernetes cluster.
49
+
50
+ ```sh
51
+ k8s apply -f <file> [options]
52
+ ```
53
+
54
+ #### Delete
55
+ Delete resources from your Kubernetes cluster.
56
+
57
+ ```sh
58
+ k8s delete <resource> <name> [options]
59
+ ```
60
+
61
+ #### Describe
62
+ Show detailed information about a specific resource.
63
+
64
+ ```sh
65
+ k8s describe <resource> <name> [options]
66
+ ```
67
+
68
+ #### Logs
69
+ View logs from pods.
70
+
71
+ ```sh
72
+ k8s logs <pod-name> [options]
73
+ ```
74
+
75
+ #### Port Forward
76
+ Forward ports from pods to your local machine.
77
+
78
+ ```sh
79
+ k8s port-forward <pod-name> <local-port>:<pod-port> [options]
80
+ ```
81
+
82
+ #### Exec
83
+ Execute commands in a container.
84
+
85
+ ```sh
86
+ k8s exec <pod-name> -- <command> [options]
87
+ ```
88
+
89
+ #### Cluster Info
90
+ Display information about the current cluster.
91
+
92
+ ```sh
93
+ k8s cluster-info
94
+ ```
95
+
96
+ #### Config
97
+ Manage Kubernetes configuration.
98
+
99
+ ```sh
100
+ k8s config [options]
101
+ ```
102
+
103
+ ## Examples
104
+
105
+ ### Get Pod Information
106
+
107
+ ```sh
108
+ k8s get pods
109
+ ```
110
+
111
+ ### Apply a Configuration File
112
+
113
+ ```sh
114
+ k8s apply -f deployment.yaml
115
+ ```
116
+
117
+ ### View Pod Logs
118
+
119
+ ```sh
120
+ k8s logs my-pod
121
+ ```
122
+
123
+ ### Port Forward to a Service
9
124
 
10
125
  ```sh
11
- npm install cli
126
+ k8s port-forward my-pod 8080:80
12
127
  ```
13
- ## Table of contents
14
128
 
15
- - [cli](#cli)
16
- - [Install](#install)
17
- - [Table of contents](#table-of-contents)
18
- - [Developing](#developing)
19
- - [Credits](#credits)
129
+ ## Configuration
20
130
 
21
- ## Developing
131
+ The CLI uses the default Kubernetes configuration from `~/.kube/config`. You can specify a different configuration file using the `--kubeconfig` option.
132
+
133
+ ## Development
22
134
 
23
135
  When first cloning the repo:
24
136
 
25
137
  ```sh
26
138
  yarn
27
- # build the prod packages. When devs would like to navigate to the source code, this will only navigate from references to their definitions (.d.ts files) between packages.
139
+ # Build the production packages
28
140
  yarn build
29
141
  ```
30
142
 
31
- Or if you want to make your dev process smoother, you can run:
143
+ For development with source maps:
32
144
 
33
145
  ```sh
34
146
  yarn
35
- # build the dev packages with .map files, this enables navigation from references to their source code between packages.
147
+ # Build with source maps for better debugging
36
148
  yarn build:dev
37
149
  ```
38
150
 
39
- ## Interchain JavaScript Stack
151
+ ## Related
40
152
 
41
- A unified toolkit for building applications and smart contracts in the Interchain ecosystem ⚛️
153
+ Checkout these related projects:
42
154
 
43
- | Category | Tools | Description |
44
- |----------------------|------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
45
- | **Chain Information** | [**Chain Registry**](https://github.com/hyperweb-io/chain-registry), [**Utils**](https://www.npmjs.com/package/@chain-registry/utils), [**Client**](https://www.npmjs.com/package/@chain-registry/client) | Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application. |
46
- | **Wallet Connectors**| [**Interchain Kit**](https://github.com/hyperweb-io/interchain-kit)<sup>beta</sup>, [**Cosmos Kit**](https://github.com/hyperweb-io/cosmos-kit) | Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface. |
47
- | **Signing Clients** | [**InterchainJS**](https://github.com/hyperweb-io/interchainjs)<sup>beta</sup>, [**CosmJS**](https://github.com/cosmos/cosmjs) | A single, universal signing interface for any network |
48
- | **SDK Clients** | [**Telescope**](https://github.com/hyperweb-io/telescope) | Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules. |
49
- | **Starter Kits** | [**Create Interchain App**](https://github.com/hyperweb-io/create-interchain-app)<sup>beta</sup>, [**Create Cosmos App**](https://github.com/hyperweb-io/create-cosmos-app) | Set up a modern Interchain app by running one command. |
50
- | **UI Kits** | [**Interchain UI**](https://github.com/hyperweb-io/interchain-ui) | The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit. |
51
- | **Testing Frameworks** | [**Starship**](https://github.com/hyperweb-io/starship) | Unified Testing and Development for the Interchain. |
52
- | **TypeScript Smart Contracts** | [**Create Hyperweb App**](https://github.com/hyperweb-io/create-hyperweb-app) | Build and deploy full-stack blockchain applications with TypeScript |
53
- | **CosmWasm Contracts** | [**CosmWasm TS Codegen**](https://github.com/CosmWasm/ts-codegen) | Convert your CosmWasm smart contracts into dev-friendly TypeScript classes. |
155
+ * [`schema-typescript`](https://github.com/hyperweb-io/schema-typescript/tree/main/packages/schema-typescript)
156
+ Provides robust tools for handling JSON schemas and converting them to TypeScript interfaces with ease and efficiency.
157
+ * [`@schema-typescript/cli`](https://github.com/hyperweb-io/schema-typescript/tree/main/packages/cli)
158
+ CLI is the command line utility for `schema-typescript`.
159
+ * [`schema-sdk`](https://github.com/hyperweb-io/schema-typescript/tree/main/packages/schema-sdk)
160
+ Provides robust tools for handling OpenAPI schemas and converting them to TypeScript clients with ease and efficiency.
161
+ * [`starship`](https://github.com/hyperweb-io/starship) Unified Testing and Development for the Interchain.
54
162
 
55
163
  ## Credits
56
164
 
57
- 🛠 Built by Hyperweb (formerly Cosmology) — if you like our tools, please checkout and contribute to [our github ⚛️](https://github.com/hyperweb-io)
58
-
165
+ 🛠 Built by Hyperweb if you like our tools, please checkout and contribute to [our github ⚛️](https://github.com/hyperweb-io)
59
166
 
60
167
  ## Disclaimer
61
168
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubernetesjs/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "author": "Dan Lynch <pyramation@gmail.com>",
5
5
  "description": "KubernetesJS CLI",
6
6
  "main": "index.js",
@@ -42,8 +42,8 @@
42
42
  "deepmerge": "^4.3.1",
43
43
  "inquirerer": "^2.0.8",
44
44
  "js-yaml": "^4.1.0",
45
- "kubernetesjs": "^0.5.1",
45
+ "kubernetesjs": "^0.5.2",
46
46
  "minimist": "^1.2.8"
47
47
  },
48
- "gitHead": "26b897ec6d8fbb4c1b940e699ea22ce87bd463e7"
48
+ "gitHead": "2a067742f0591aecb0481f8cef4285400fa72926"
49
49
  }