Skip to content

Commit ec62895

Browse files
committed
Initial release: appwrite-cli v0.1.0
Fast, single-binary CLI for Appwrite — built for power users and CI/CD. - 75+ commands across 13 resource groups - Multi-profile auth with per-profile endpoints (cloud + self-hosted) - 6 output formats: JSON, table, CSV, TSV, YAML, minimal - Full CRUD: databases, collections, documents, storage, functions, users, teams, messaging - Power commands: status, doctor, watch, diff, export/import, report - Health monitoring with live terminal dashboard - Infrastructure-as-code via YAML export/import - Dynamic shell completions (bash, zsh, fish, powershell) - Dry-run mode on all mutations, --confirm on destructive ops - CI/CD ready: env vars, zero dependencies, clean exit codes - GoReleaser + GitHub Actions for automated cross-platform releases
0 parents  commit ec62895

File tree

36 files changed

+5774
-0
lines changed

36 files changed

+5774
-0
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-go@v5
16+
with:
17+
go-version: '1.23'
18+
19+
- name: Build
20+
run: go build ./...
21+
22+
- name: Test
23+
run: go test -v -race -coverprofile=coverage.txt ./...
24+
25+
- name: Vet
26+
run: go vet ./...

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
- name: Test
24+
run: go test -v -race ./...
25+
26+
- name: Run GoReleaser
27+
uses: goreleaser/goreleaser-action@v6
28+
with:
29+
version: latest
30+
args: release --clean
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
bin/
2+
dist/
3+
coverage.out
4+
coverage.html
5+
.DS_Store
6+
*.exe

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
linters:
2+
enable:
3+
- govet
4+
- unused

.goreleaser.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# GoReleaser configuration for appwrite-cli
2+
# https://goreleaser.com
3+
4+
version: 2
5+
6+
project_name: appwrite-cli
7+
8+
before:
9+
hooks:
10+
- go mod tidy
11+
12+
builds:
13+
- id: appwrite-cli
14+
main: ./cmd/appwrite-cli
15+
binary: appwrite-cli
16+
env:
17+
- CGO_ENABLED=0
18+
goos:
19+
- linux
20+
- darwin
21+
- windows
22+
goarch:
23+
- amd64
24+
- arm64
25+
ldflags:
26+
- -s -w
27+
- -X main.version={{.Version}}
28+
- -X main.commit={{.Commit}}
29+
- -X main.date={{.Date}}
30+
31+
archives:
32+
- id: default
33+
format: tar.gz
34+
name_template: >-
35+
{{ .ProjectName }}_
36+
{{- .Version }}_
37+
{{- .Os }}_
38+
{{- .Arch }}
39+
format_overrides:
40+
- goos: windows
41+
format: zip
42+
files:
43+
- README.md
44+
- LICENSE
45+
46+
checksum:
47+
name_template: 'checksums.txt'
48+
49+
snapshot:
50+
version_template: "{{ incpatch .Version }}-next"
51+
52+
changelog:
53+
sort: asc
54+
filters:
55+
exclude:
56+
- '^docs:'
57+
- '^test:'
58+
- '^chore:'
59+
- Merge pull request
60+
- Merge branch
61+
62+
brews:
63+
- name: appwrite-cli
64+
repository:
65+
owner: AndroidPoet
66+
name: homebrew-tap
67+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
68+
directory: Formula
69+
homepage: https://github.com/AndroidPoet/appwrite-cli
70+
description: "Fast, single-binary CLI for Appwrite — multi-profile, multi-format, multi-environment"
71+
license: MIT
72+
install: |
73+
bin.install "appwrite-cli"
74+
bin.install_symlink "appwrite-cli" => "aw"
75+
test: |
76+
system "#{bin}/aw", "version"
77+
78+
nfpms:
79+
- id: packages
80+
package_name: appwrite-cli
81+
vendor: AndroidPoet
82+
homepage: https://github.com/AndroidPoet/appwrite-cli
83+
description: "Fast, single-binary CLI for Appwrite — multi-profile, multi-format, multi-environment"
84+
license: MIT
85+
formats:
86+
- deb
87+
- rpm
88+
89+
release:
90+
github:
91+
owner: AndroidPoet
92+
name: appwrite-cli
93+
draft: false
94+
prerelease: auto
95+
footer: |
96+
## Installation
97+
```bash
98+
brew tap AndroidPoet/tap && brew install appwrite-cli
99+
```
100+
Or download from the assets below.

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 AndroidPoet
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.

Makefile

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# appwrite-cli - Appwrite CLI
2+
# Makefile for building, testing, and releasing
3+
4+
BINARY_NAME=appwrite-cli
5+
VERSION?=$(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
6+
COMMIT?=$(shell git rev-parse --short HEAD 2>/dev/null || echo "none")
7+
DATE?=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
8+
LDFLAGS=-ldflags "-X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.date=$(DATE)"
9+
10+
.PHONY: all build install clean test lint fmt deps help
11+
12+
all: build
13+
14+
## Build
15+
16+
build: ## Build the binary
17+
go build $(LDFLAGS) -o bin/$(BINARY_NAME) ./cmd/appwrite-cli
18+
19+
build-all: ## Build for all platforms
20+
GOOS=darwin GOARCH=amd64 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-darwin-amd64 ./cmd/appwrite-cli
21+
GOOS=darwin GOARCH=arm64 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-darwin-arm64 ./cmd/appwrite-cli
22+
GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-linux-amd64 ./cmd/appwrite-cli
23+
GOOS=linux GOARCH=arm64 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-linux-arm64 ./cmd/appwrite-cli
24+
GOOS=windows GOARCH=amd64 go build $(LDFLAGS) -o bin/$(BINARY_NAME)-windows-amd64.exe ./cmd/appwrite-cli
25+
26+
install: build ## Install to $GOPATH/bin
27+
cp bin/$(BINARY_NAME) $(GOPATH)/bin/$(BINARY_NAME)
28+
29+
## Development
30+
31+
deps: ## Download dependencies
32+
go mod download
33+
go mod tidy
34+
35+
fmt: ## Format code
36+
go fmt ./...
37+
38+
lint: ## Run linter
39+
golangci-lint run
40+
41+
test: ## Run tests
42+
go test -v ./...
43+
44+
test-coverage: ## Run tests with coverage
45+
go test -v -coverprofile=coverage.out ./...
46+
go tool cover -html=coverage.out -o coverage.html
47+
48+
## Release
49+
50+
release-snapshot: ## Create a snapshot release (no publish)
51+
goreleaser release --snapshot --clean
52+
53+
release: ## Create a release (requires GITHUB_TOKEN)
54+
goreleaser release --clean
55+
56+
## Utilities
57+
58+
clean: ## Remove build artifacts
59+
rm -rf bin/
60+
rm -rf dist/
61+
rm -f coverage.out coverage.html
62+
63+
version: ## Print version
64+
@echo $(VERSION)
65+
66+
help: ## Show this help
67+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

0 commit comments

Comments
 (0)