Skip to content
Open
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ ZCP CLI (`zcp`) is a full-featured command-line tool for managing resources on t
### Quick Install — Linux / macOS

```bash
curl -fsSL https://raw.githubusercontent.com/zsoftly/zcp-cli/main/scripts/install.sh | bash
curl -fsSL https://github.com/zsoftly/zcp-cli/releases/latest/download/install.sh | bash
```

The script installs `zcp` to `/usr/local/bin`. You may be prompted for `sudo` access.

### PowerShell — Windows

```powershell
irm https://raw.githubusercontent.com/zsoftly/zcp-cli/main/scripts/install.ps1 | iex
irm https://github.com/zsoftly/zcp-cli/releases/latest/download/install.ps1 | iex
```

### Manual Download
Expand Down
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The CLI can now run with just environment variables — no config file needed:

```bash
export ZCP_BEARER_TOKEN=your-token
export ZCP_API_URL=https://api.zcp.zsoftly.ca
export ZCP_API_URL=https://api.zcp.zsoftly.ca/api
zcp region list
```

Expand Down
11 changes: 11 additions & 0 deletions cmd/zcp/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ Get started:
zcp region list List available regions
zcp instance list List your instances

Environment variables:
ZCP_BEARER_TOKEN Bearer token for zero-config or CI use
ZCP_API_URL API base URL override
ZCP_PROFILE Profile name when --profile is not provided
ZCP_PROJECT Default project slug for create commands
ZCP_REGION Default region slug for create commands
ZCP_CLOUD_PROVIDER Default cloud provider slug for create commands
ZCP_OUTPUT Default output format: table, json, or yaml
ZCP_DEBUG Enable debug output when true, 1, or yes

Documentation: https://docs.zsoftly.com/zcp-cli`,
SilenceUsage: true,
SilenceErrors: true,
Expand Down Expand Up @@ -110,6 +120,7 @@ func init() {
rootCmd.AddCommand(commands.NewCurrencyCmd())
rootCmd.AddCommand(commands.NewBillingCycleCmd())
rootCmd.AddCommand(commands.NewStorageCategoryCmd())
rootCmd.AddCommand(commands.NewObjectStorageCmd())

// Flag completions — static values, no network calls
rootCmd.RegisterFlagCompletionFunc("output", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
Expand Down
2 changes: 1 addition & 1 deletion docs/command-taxonomy.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ZCP CLI Command Taxonomy (v0.0.6)

**CLI name**: `zcp`
**Base URL**: `https://api.zcp.zsoftly.ca`
**Base URL**: `https://api.zcp.zsoftly.ca/api`
**Authentication**: Bearer token (`--bearer-token` during profile add)

---
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Each profile supports the following fields:
The default API URL when `api_url` is blank or omitted is:

```
https://api.zcp.zsoftly.ca
https://api.zcp.zsoftly.ca/api
```

---
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/zsoftly/zcp-cli

go 1.25.0

toolchain go1.26.2
toolchain go1.26.3

require (
github.com/olekukonko/tablewriter v0.0.5
Expand Down
9 changes: 5 additions & 4 deletions internal/api/billing/billing.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,11 @@ func (s *Service) ListCancelRequests(ctx context.Context) (json.RawMessage, erro

// CancelServiceRequest holds parameters for service cancellation.
type CancelServiceRequest struct {
ServiceName string `json:"service_name"`
Reason string `json:"reason"`
Type string `json:"type"`
Description string `json:"description,omitempty"`
ServiceName string `json:"service_name"`
Reason string `json:"reason"`
Type string `json:"type"`
Description string `json:"description,omitempty"`
DeletePublicIP *bool `json:"delete_public_ip,omitempty"`
}

// CancelService submits a cancellation request for a service by subscription slug.
Expand Down
19 changes: 10 additions & 9 deletions internal/api/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@ type StorageCategory struct {

// ActivityLog represents a VM activity log entry.
type ActivityLog struct {
ID string `json:"id"`
Category string `json:"category"`
Action string `json:"action"`
Status string `json:"status"`
Error string `json:"error"`
Description string `json:"description"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Project string `json:"project"`
ID json.Number `json:"id"`
Category string `json:"category"`
Action string `json:"action"`
Status string `json:"status"`
Error string `json:"error"`
Description string `json:"description"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Project string `json:"project"`
}

// Addon represents a VM addon.
Expand Down Expand Up @@ -210,6 +210,7 @@ type CreateRequest struct {
StorageCategory string `json:"storage_category,omitempty"`
ComputeCategory string `json:"compute_category,omitempty"`
BlockstoragePlan string `json:"blockstorage_plan,omitempty"`
NetworkPlan string `json:"network_plan,omitempty"`
IsVNF bool `json:"is_vnf"`
IsVMPasswordRequired bool `json:"is_vm_password_required"`
IsVMSSHRequired bool `json:"is_vm_ssh_required"`
Expand Down
44 changes: 23 additions & 21 deletions internal/api/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,29 @@ type Project struct {

// CreateRequest holds parameters for creating a Kubernetes cluster.
type CreateRequest struct {
Name string `json:"name"`
Version string `json:"version"`
NodeSize int `json:"node_size"`
ControlNodes int `json:"control_nodes"`
CloudProvider string `json:"cloud_provider"`
Region string `json:"region"`
Project string `json:"project"`
BillingCycle string `json:"billing_cycle"`
EnableHA bool `json:"enable_ha"`
Networks []string `json:"networks"`
Plan string `json:"plan"`
WithPoolCard bool `json:"with_pool_card"`
IsCustomPlan bool `json:"is_custom_plan"`
CustomPlan interface{} `json:"custom_plan"`
VirtualMachine string `json:"virtual_machine"`
Coupon *string `json:"coupon"`
StorageCategory string `json:"storage_category"`
SSHKey string `json:"ssh_key"`
AuthMethod string `json:"authMethod"`
Username string `json:"username"`
Password string `json:"password"`
Name string `json:"name"`
Version string `json:"version"`
NodeSize int `json:"node_size"`
WorkerNodeSize int `json:"worker_node_size"`
ControlNodes int `json:"control_nodes"`
CloudProvider string `json:"cloud_provider"`
CloudProviderSetup string `json:"cloud_provider_setup,omitempty"`
Region string `json:"region"`
Project string `json:"project"`
BillingCycle string `json:"billing_cycle"`
EnableHA bool `json:"enable_ha"`
Networks []string `json:"networks"`
Plan string `json:"plan"`
WithPoolCard bool `json:"with_pool_card"`
IsCustomPlan bool `json:"is_custom_plan"`
CustomPlan interface{} `json:"custom_plan"`
VirtualMachine string `json:"virtual_machine"`
Coupon *string `json:"coupon"`
StorageCategory string `json:"storage_category"`
SSHKey string `json:"ssh_key"`
AuthMethod string `json:"authMethod"`
Username string `json:"username"`
Password string `json:"password"`
}

// UpgradeRequest holds parameters for upgrading (changing plan of) a Kubernetes cluster.
Expand Down
Loading
Loading