Skip to content

Commit 7b011fb

Browse files
mycollablabclaude
andcommitted
Initial commit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 parents  commit 7b011fb

136 files changed

Lines changed: 16501 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-go@v5
15+
with:
16+
go-version: "1.23"
17+
18+
- run: go build ./...
19+
20+
- run: go vet ./...

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: actions/setup-go@v5
20+
with:
21+
go-version: "1.23"
22+
23+
- uses: goreleaser/goreleaser-action@v6
24+
with:
25+
version: latest
26+
args: release --clean
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Binary
2+
cupi
3+
4+
# Integration test binaries/artifacts
5+
*.test
6+
7+
# Go build artifacts
8+
*.test
9+
*.out
10+
11+
# Scraper output
12+
api_reference.json
13+
api_reference.md
14+
tools/*.pdf
15+
16+
# macOS
17+
.DS_Store
18+
19+
# Editor
20+
.idea/
21+
.vscode/
22+
*.swp
23+
*.swo
24+
25+
# Claude Code
26+
.claude/

.goreleaser.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
version: 2
2+
3+
project_name: cupi
4+
5+
before:
6+
hooks:
7+
- go mod tidy
8+
9+
builds:
10+
- binary: cupi
11+
env:
12+
- CGO_ENABLED=0
13+
ldflags:
14+
- -s -w -X github.com/Cloverhound/cupi-cli/cmd.Version={{.Version}}
15+
goos:
16+
- darwin
17+
- linux
18+
- windows
19+
goarch:
20+
- amd64
21+
- arm64
22+
23+
archives:
24+
- formats:
25+
- tar.gz
26+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
27+
format_overrides:
28+
- goos: windows
29+
formats:
30+
- zip
31+
32+
checksum:
33+
name_template: "checksums.txt"
34+
35+
release:
36+
github:
37+
owner: Cloverhound
38+
name: cupi-cli
39+
draft: false
40+
prerelease: auto
41+
42+
changelog:
43+
sort: asc
44+
filters:
45+
exclude:
46+
- "^docs:"
47+
- "^test:"
48+
- "^chore:"
49+
- Merge pull request
50+
- Merge branch

CLAUDE.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# cupi — Cisco Unity Connection CLI
2+
3+
## Overview
4+
5+
Go CLI tool (`cupi`) for Cisco Unity Connection (CUC). Wraps:
6+
- **CUPI** — REST/JSON provisioning (`/vmrest/`) — users, distlists, handlers, COS, templates, schedules
7+
- **PAWS** — Platform admin SOAP (`/platform-services/services/`) — cluster status, DRS backup
8+
- **AST** — System health XML (`/ast/Astisapi.dll`) — disk, heartbeat, alerts, perfmon
9+
- **DIME** — Log collection (`/logcollectionservice/services/DimeGetFileService`) — log file downloads
10+
11+
## Key Paths
12+
13+
- Config: `~/.cupi/config.json` (servers map, not `clusters`)
14+
- Keyring service: `cupi`
15+
- Module: `github.com/Cloverhound/cupi`
16+
- Binary: `cupi`
17+
- Env vars: `CUPI_DEBUG`, `CUPI_DRY_RUN`
18+
19+
## Credential Types
20+
21+
- `cupi` — CUPI REST (default, analogous to `axl` in cucm-cli)
22+
- `application` — Application-level APIs
23+
- `platform` — OS admin for PAWS
24+
25+
## Development
26+
27+
```bash
28+
go build -o cupi . # Build (Version reports "dev")
29+
./cupi --help # Verify
30+
./cupi version # Print version
31+
./cupi upgrade --check # Check for newer release on GitHub
32+
bash install-local.sh # Install binary (embeds git tag as version) + skill
33+
go run ./tools/scraper/ # Run API doc scraper
34+
go test ./tests/ -run TestCLI # Run CLI validation tests (no live server needed)
35+
36+
# Build with explicit version:
37+
go build -ldflags "-X github.com/Cloverhound/cupi-cli/cmd.Version=v1.2.3" -o cupi .
38+
```
39+
40+
## Architecture
41+
42+
- `internal/appconfig/``ServerConfig` (not `ClusterConfig`), `defaultServer`, `servers`
43+
- `internal/auth/``CredTypeCUPI="cupi"`, keyring service `"cupi"`
44+
- `internal/client/rest.go` — JSON REST: `Request/Get/Post/Put/Delete`
45+
- `internal/client/ast.go` — VOS-common AST only (disk, tftp, heartbeat, alerts, perfmon)
46+
- `internal/client/paws.go` — PAWS SOAP (identical to cucm-cli, CUPI_DEBUG)
47+
- `internal/client/dime.go` — DIME log download (identical to cucm-cli, CUPI_DEBUG)
48+
- `tools/scraper/` — Phase 1 HTML scraper for CUPI API docs

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Cloverhound
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)