Skip to content

Commit 009e3a3

Browse files
committed
feat: update docs and clean code
1 parent 02cefa6 commit 009e3a3

File tree

2 files changed

+71
-80
lines changed

2 files changed

+71
-80
lines changed

README.md

Lines changed: 71 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,85 @@
1-
# 🖥️ Entiqon CLI
1+
# Entiqon CLI
22

3-
## Purpose
4-
The **Entiqon CLI** is a lightweight developer & DevOps toolkit designed to **streamline everyday workflows** inside the Entiqon ecosystem.
5-
It bridges the gap between **library development**, **release management**, and **runtime utilities**, offering consistent, scriptable commands to help contributors and maintainers manage the project efficiently.
3+
**Developer & DevOps toolkit for the Entiqon ecosystem**
64

7-
Whereas **Entiqon libraries** (e.g., `db/builder`, `token/field`, `core/contracts`) provide compile-time tools for building queryable Go systems, the CLI provides **runtime developer ergonomics**—automation for Git, tests, coverage, tagging, release notes, and package lifecycle.
5+
The Entiqon CLI provides a collection of tools to streamline development, testing, release automation, and operational workflows.
6+
All tools are distributed under the `entiqon/cli` module and live inside the `cmd/` directory.
87

98
---
109

11-
## Philosophy
12-
- **Minimal dependencies** — plain Bash/POSIX tools (works on macOS/Linux, extensible for Windows WSL).
13-
- **Self-documented** — every script provides `-h`/`--help` output.
14-
- **Composable** — individual commands solve one thing well, can be chained.
15-
- **Versioned** — each CLI script is tied to Entiqon’s semver release cycle.
16-
- **Safe** — designed to *never lose work* (e.g., stash before rebases, confirmations for destructive ops).
10+
## 📦 Tools
11+
12+
### ✅ Go-native binaries
13+
- **gotestx** — Go Test eXtended tool with coverage support
14+
- Extends `go test` with coverage, quiet, and clean modes.
15+
- Supports combined flags (`-cqC`, etc.) and auto package detection.
16+
- Supersedes legacy Bash helpers `run-tests.sh` and `open-coverage.sh`.
17+
18+
### 📝 Bash-based tools (planned migration to Go)
19+
- **gcpr** — create GitHub Pull Requests
20+
- **gce** — extract commit history
21+
- **gcr** — generate release notes
22+
- **gct** — create and sign tags
23+
- **gsux** — stash/unstash workflow utility
24+
- **gcch** — changelog helper
25+
- **ddc** — deploy Docker container
26+
27+
These remain Bash scripts for now but will gradually be ported to Go under `cmd/`.
1728

1829
---
1930

20-
## Tooling Overview
31+
## 🚀 Installation
2132

22-
### Git & Release Automation (`bin/`)
23-
- **`gcpr`** – Create GitHub PRs quickly (auto-fills title, branch).
24-
- **`gce`** – Extract commits between tags (`-s`, `-e` for ranges).
25-
- **`gcr`** – Create GitHub releases with changelogs & notes.
26-
- **`gct`** – Automated tagging (`--title`, `--date`, `--notes`, `--sign`).
27-
- **`gsux`** – Git Stash Utility Extended (stash/apply/pop/drop/clear/list).
28-
- **`gcch`** – Cherry-pick helpers for backports.
29-
- **`ddc`** – Deploy Docker containers with standard flags.
33+
From the root of `entiqon`:
3034

31-
### Testing & Coverage
32-
- **`gotestx`** – Extended test runner: coverage, HTML reports, filters, CI mode.
33-
- **`run-tests.sh`** – Runs all packages with coverage (`go test ./... -cover`).
34-
- **`open-coverage.sh`** – Opens `coverage.html` after generation.
35-
- **CI Integration** – Used in GitHub Actions to enforce thresholds and upload to Codecov.
35+
```bash
36+
go install ./cli/cmd/gotestx
37+
```
3638

37-
### Documentation
38-
- **Markdown helpers** – regenerate `README.md`, update `CHANGELOG.md`.
39-
- **Release notes** – auto-generate from commits with semantic prefixes (`feat:`, `fix:`, `docs:`, etc.).
39+
or directly via GitHub (released versions):
4040

41-
---
41+
```bash
42+
go install github.com/entiqon/cli/cmd/gotestx@latest
43+
```
4244

43-
## Example Workflow
45+
Check installation:
4446

45-
A typical **release cycle** with Entiqon CLI:
47+
```bash
48+
gotestx -v
49+
```
4650

47-
\`\`\`bash
48-
# Run all tests with coverage
49-
gotestx --cover --open
51+
---
52+
53+
## 🛠 Development
54+
55+
All CLI tools live under `cmd/`. Shared logic is placed in `internal/`.
56+
57+
```text
58+
cli/
59+
├── cmd/
60+
│ ├── gotestx/ # Go-native binary
61+
│ ├── gcpr/ # planned Go migration
62+
│ ├── gcr/
63+
│ ├── gce/
64+
│ ├── gct/
65+
│ ├── gsux/
66+
│ ├── gcch/
67+
│ └── ddc/
68+
├── internal/ # shared logic for CLI tools
69+
├── go.mod
70+
└── go.sum
71+
```
5072

51-
# Stage changes and stash WIP if needed
52-
gsux stash -m "WIP: refactor token.Field validation" -u -v
73+
---
5374

54-
# Generate changelog entries since last release
55-
gce -s v1.13.0
75+
## 🔮 Future
5676

57-
# Tag and sign a new release
58-
gct -t v1.14.0 --title "Token Enhancements" --notes "Adds ResolveExpressionType and ValidateWildcard" --sign
77+
For now, all CLI tools remain inside this repository. In the future, some may be split into standalone modules (e.g., `entiqon/gotestx`) if they grow beyond Entiqon-specific workflows.
5978

60-
# Push release to GitHub
61-
gcr v1.14.0
62-
\`\`\`
79+
This setup ensures:
80+
- Unified release cycle for Entiqon CLI tools.
81+
- Shared infrastructure for CI/CD.
82+
- Simple contributor workflow.
6383

6484
---
6585

@@ -70,7 +90,14 @@ gcr v1.14.0
7090
- **Plugin architecture** – let projects extend CLI with their own subcommands.
7191
- **Improved test harness** – Bats/shunit2 suites for CLI validation.
7292

73-
---
7493

7594
✅ In short: **Entiqon CLI = developer efficiency + project discipline**.
7695
It codifies the workflows we already practice (TDD, semantic commits, 100% coverage, structured releases) into **repeatable, versioned, safe automation.**
96+
97+
---
98+
99+
## 📄 License
100+
101+
Part of the [Entiqon Project](https://github.com/entiqon).
102+
Licensed under the MIT License.
103+

main.go

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)