Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
---
name: Bug report
about: Report a bug in zcp-cli
title: '[BUG] '
title: "[BUG] "
labels: bug
assignees: ''
assignees: ""
---

## Description

<!-- A clear and concise description of the bug -->

## Steps to reproduce

```
zcp <command> --flags
```

## Expected behavior

<!-- What you expected to happen -->

## Actual behavior

<!-- What actually happened, including any error output -->

## Environment

- zcp version (`zcp version`):
- OS / Architecture:
- Shell:

## Debug output

<!-- Optional: run the same command with --debug and paste the output -->
<details>
<summary>Debug output</summary>

```
paste here
```

</details>
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
---
name: Feature request
about: Suggest a new feature or improvement
title: '[FEATURE] '
title: "[FEATURE] "
labels: enhancement
assignees: ''
assignees: ""
---

## Summary

<!-- A clear and concise description of the feature you'd like -->

## Motivation

<!-- Why is this feature needed? What problem does it solve? -->

## Proposed behavior

<!-- How should the feature work? Include example commands if applicable -->

## Alternatives considered

<!-- Any alternative approaches you've considered -->
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tmp/
bin/
vendor/
node_modules/
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"proseWrap": "preserve",
"tabWidth": 2,
"useTabs": false
}
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,56 @@ All notable changes to zcp will be documented in this file.
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), using
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.6] - 2026-04-08

### Changed

- **API backend migration**: Migrated entire CLI from STKBILL to STKCNSL API backend
- **Authentication**: Switched from `apikey`/`secretkey` headers to Bearer token authentication
- **Config format**: Profile config now uses `bearer_token` instead of `apikey`/`secretkey`
- **API style**: All endpoints now use RESTful paths with slug identifiers instead of RPC-style paths with UUID query parameters
- **Response handling**: All API responses now parsed from `{status, message, data}` envelope format with built-in pagination support

### Added

- **`dns`**: Domain and record management (list, show, create, delete, record-create, record-delete)
- **`project`**: Project management (list, create, update, dashboard, icons, users)
- **`monitoring`**: Resource monitoring (global, per-VM CPU/memory/disk/network metrics)
- **`billing`**: Billing operations (costs, balance, invoices, subscriptions, usage, coupons, budget alerts)
- **`support`**: Support ticket management (CRUD, replies, feedback, FAQs)
- **`autoscale`**: VM autoscale groups with policies and conditions
- **`dashboard`**: Account service counts overview
- **`plan`**: Service plan listing for all resource types (VM, storage, K8s, LB, etc.)
- **`store`**: Store items and checkout
- **`marketplace`**: Marketplace app listing
- **`product`**: Product categories and listing
- **`iso`**: ISO image management (list, create, update, delete)
- **`affinity-group`**: Affinity group management (list, create, delete)
- **`backup`**: VM and block storage backup operations
- **`region`**: Region listing (replaces zone-based discovery)
- **`project delete`**: Delete projects with confirmation prompt
- **`--auto-approve` / `-y`**: Global flag to skip all confirmation prompts (useful for CI/CD automation)
- **`--blockstorage-plan`**: Required flag on `instance create` for selecting block storage plan size
- **`billing cancel-service`**: Now accepts `--service`, `--reason`, `--type` flags matching the API requirements
- **VM operations**: reboot, reset, tags, change-hostname, change-password, change-plan, change-OS, add-network, addons
- **Network egress rules**: list, create, delete egress firewall rules
- **VPC ACL management**: list, create, replace ACL rules
- **VPC VPN gateways**: list, create, delete
- **Load balancer rules**: create rules, attach VMs to rules
- **Discovery endpoints**: cloud-providers, currencies, storage-categories, billing-cycles, unit-pricings
- **Envelope helpers**: `GetEnvelope`/`PostEnvelope`/`PutEnvelope` on httpclient for clean response unwrapping
- **Generic response types**: `response.Envelope[T]` and `response.Single[T]` in new `api/response` package

### Removed

- **STKBILL API support**: All old `/restapi/` RPC-style endpoints removed
- **`apikey`/`secretkey` config fields**: Replaced by `bearer_token`
- **Zone-based filtering**: Replaced by region/slug-based resource identification

**Full Changelog**: https://github.com/zsoftly/zcp-cli/compare/0.0.5...0.0.6

---

## [0.0.5] - 2026-03-31

### Fixed
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Thank you for your interest in zcp-cli.
Please use [GitHub Issues](https://github.com/zsoftly/zcp-cli/issues) to report bugs or request features.

When filing a bug report, include:

- The `zcp` version (`zcp version`)
- Your operating system and architecture
- The exact command you ran
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GO := go
GOFMT := gofmt
GOVET := $(GO) vet
GOTEST := $(GO) test
PRETTIER := $(shell command -v prettier 2>/dev/null || echo "npx prettier")

.DEFAULT_GOAL := help

Expand Down Expand Up @@ -68,8 +69,14 @@ test-race: ## Run all tests with race detector
##@ Quality

.PHONY: fmt
fmt: ## Format all Go source files
fmt: ## Format all Go source files and Markdown docs
$(GOFMT) -w .
$(PRETTIER) --write '**/*.md' --prose-wrap preserve 2>/dev/null || true

.PHONY: fmt-check
fmt-check: ## Check formatting without writing (useful in CI)
@test -z "$$($(GOFMT) -l .)" || { echo "Go files need formatting:"; $(GOFMT) -l .; exit 1; }
$(PRETTIER) --check '**/*.md' --prose-wrap preserve 2>/dev/null || { echo "Markdown files need formatting — run: make fmt"; exit 1; }

.PHONY: vet
vet: ## Run go vet
Expand Down
Loading
Loading