Skip to content

Commit 4e197a5

Browse files
committed
fix(cli): rename aactl binary to awrit (TD-CLI-001)
Mechanical rename of the CLI binary from aactl to awrit across the ship-to-main surface. No logic changes — pure directory/file/string rename to align the CLI identity with the product brand. Production: - cmd/aactl/ -> cmd/awrit/ (directory rename via git mv, preserves history) - docs/aactl-reference.md -> docs/awrit-reference.md (file rename) - cmd/awrit/root.go: Cobra Use field "aactl" -> "awrit" - cmd/broker/main.go: error message "Run 'aactl init'..." -> "Run 'awrit init'..." - .github/workflows/ci.yml: go build ./cmd/aactl -> ./cmd/awrit - .gitignore: /awrit added alongside /aactl (both listed during transition so stray binaries under either name stay untracked) - internal/cfg/configfile.go: user-visible aactl references in comments updated - internal/cfg/cfg.go: aactl references in inline doc comments updated Docs + scripts + tests (bulk sed): - docs/api.md, docs/architecture.md, docs/awrit-reference.md, docs/common-tasks.md, docs/design-decisions.md, docs/getting-started-operator.md, docs/integration-patterns.md, docs/scenarios.md, docs/scope-model.md, docs/troubleshooting.md - scripts/gates.sh, scripts/stack_up.sh - README.md, CONTRIBUTING.md, docker-compose.yml - tests/LIVE-TEST-TEMPLATE.md, tests/app-launch-tokens/env.sh, tests/p0-production-foundations/{env.sh, user-stories.md}, tests/p1-admin-secret/{env.sh, user-stories.md}, tests/sec-l1/regression-plan.md, tests/sec-l2a/{env.sh, user-stories.md} Intentionally NOT updated (historical records): - tests/*/evidence/*.md — past test run evidence files describe what happened at the time using the tool name as it existed then. Rewriting these would misrepresent history. - CHANGELOG historical entries — same principle. Only the new "Unreleased" entry for this rename is added. - MEMORY.md, FLOW.md, .plans/**, .claude/**, .agents/** — stripped from main anyway, developer-facing tracking that uses the old name for historical context. NOT in scope: - Go module path rename (github.com/devonartis/agentauth) — gated on the GitHub repo rename, separate work - agentauth -> agentwrit brand sweep across docs for the TD-TOKEN-001 / TD-CFG-001 / TD-010 defaults — separate direct-push to develop per user instruction ("push not a pr for the docs") Validation: go build ./..., go vet ./..., gofmt -l, go test ./... all green across all 16 packages (cmd/awrit now compiles as the CLI binary). Marks TD-CLI-001 RESOLVED in TECH-DEBT.md.
1 parent 2a7d96c commit 4e197a5

43 files changed

Lines changed: 312 additions & 299 deletions

Some content is hidden

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

.claude/scheduled_tasks.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"sessionId":"15ed6d5b-da97-4056-bd7c-9cd50b309a62","pid":38820,"acquiredAt":1775846795737}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
with:
4141
go-version-file: go.mod
4242
cache: true
43-
- run: go build ./cmd/broker ./cmd/aactl
43+
- run: go build ./cmd/broker ./cmd/awrit
4444

4545
vet:
4646
name: vet

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
# Go build artifacts
99
*.test
10+
/awrit
1011
/aactl
1112
/broker
1213
/agentauth-broker

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Renamed CLI binary `aactl``awrit` (TD-CLI-001)
11+
12+
- **`cmd/aactl/``cmd/awrit/`** — directory renamed. Cobra command name changed (`Use: "aactl"``Use: "awrit"`). All internal CLI output, help text, and error messages updated.
13+
- **`docs/aactl-reference.md``docs/awrit-reference.md`** — reference doc renamed. All example commands in the doc rewritten to use `awrit`.
14+
- **Docs, scripts, tests, README, CONTRIBUTING, docker-compose.yml, .github/workflows/ci.yml, .gitignore** — every `aactl` reference in ship-to-main files rewritten to `awrit`. Evidence files under `tests/*/evidence/*.md` intentionally preserved as-is because they are historical records of past test runs (rewriting history would misrepresent what happened at the time).
15+
- **`cmd/broker/main.go`** — error message `"Run 'aactl init'..."``"Run 'awrit init'..."`.
16+
- **`.gitignore`** — both `/awrit` and `/aactl` listed so accidentally-built binaries under either name stay untracked during the transition.
17+
- **`internal/cfg/configfile.go`** — user-visible references in the env var comment block updated to `awrit`.
18+
19+
Scope: ~36 files touched plus directory + file renames. No production logic changes — pure mechanical rename. The `github.com/devonartis/agentauth` Go module path is NOT changed (that's gated on the GitHub repo rename, separate work).
20+
1021
### Promoted `adminTTL` const to configurable `cfg.AdminTokenTTL` (TD-010)
1122

1223
- **`internal/admin/admin_svc.go`** — deleted the magic-number const `adminTTL = 300`. Admin JWT TTL is now driven by `cfg.AdminTokenTTL` (seconds), wired through a new `tokenTTL` parameter on `NewAdminSvc`. Operators tune via `AA_ADMIN_TOKEN_TTL` (default 300 / 5 min).

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Substantial contributions (anything beyond typo fixes or minor doc corrections)
3333
agentauth/
3434
├── cmd/
3535
│ ├── broker/ # Credential broker HTTP server (main binary)
36-
│ └── aactl/ # Operator CLI — admin auth, app management, audit
36+
│ └── awrit/ # Operator CLI — admin auth, app management, audit
3737
├── internal/
3838
│ ├── admin/ # Admin authentication (bcrypt, shared secret)
3939
│ ├── app/ # App registration, credential lifecycle, launch tokens
@@ -88,7 +88,7 @@ Before you start, ensure you have:
8888

8989
```bash
9090
go build -o bin/broker ./cmd/broker/
91-
go build -o bin/aactl ./cmd/aactl/
91+
go build -o bin/awrit ./cmd/awrit/
9292
```
9393

9494
5. **Run unit tests:**
@@ -155,7 +155,7 @@ Examples: `feature/key-rotation`, `fix/renew-ttl-preservation`, `security/rate-l
155155
go vet ./... # Static analysis
156156
go test ./... # Unit tests
157157
go build -o bin/broker ./cmd/broker/ # Broker builds
158-
go build -o bin/aactl ./cmd/aactl/ # CLI builds
158+
go build -o bin/awrit ./cmd/awrit/ # CLI builds
159159
```
160160

161161
### Commit Messages
@@ -382,7 +382,7 @@ log.Printf("Token %s validated for scope %s", tokenID, scope)
382382
go vet ./... # No warnings
383383
go test ./... # All pass
384384
go build -o bin/broker ./cmd/broker/ # Broker builds
385-
go build -o bin/aactl ./cmd/aactl/ # CLI builds
385+
go build -o bin/awrit ./cmd/awrit/ # CLI builds
386386
```
387387

388388
3. **Submit your PR** against **`develop`** (not `main`) with:

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ curl -s -X POST http://localhost:8080/v1/admin/auth \
7878
```bash
7979
# 1. Build the broker and operator CLI
8080
go build -o bin/broker ./cmd/broker/
81-
go build -o bin/aactl ./cmd/aactl/
81+
go build -o bin/awrit ./cmd/awrit/
8282

8383
# 2. Generate a config file with a secure admin secret
84-
./bin/aactl init --config-path /tmp/agentauth/config
84+
./bin/awrit init --config-path /tmp/agentauth/config
8585

8686
# 3. Start the broker
8787
AA_CONFIG_PATH=/tmp/agentauth/config \
@@ -158,7 +158,7 @@ A FastAPI web app where you enter a patient ID and a plain-language request. A l
158158

159159
## Architecture
160160

161-
AgentAuth is a single broker binary. Operators manage it with the `aactl` CLI. Developers and agents interact with it over HTTP.
161+
AgentAuth is a single broker binary. Operators manage it with the `awrit` CLI. Developers and agents interact with it over HTTP.
162162

163163
```mermaid
164164
flowchart TB
@@ -181,7 +181,7 @@ flowchart TB
181181
STORE["Store\nSQLite persistence"]
182182
end
183183
184-
AACTL["aactl\nOperator CLI"]
184+
AACTL["awrit\nOperator CLI"]
185185
186186
AGENT -- "POST /v1/register\n(launch token + signed nonce)" --> IDENTITY
187187
AGENT -- "Bearer token" --> RS
@@ -261,13 +261,13 @@ All error responses use [RFC 7807](https://tools.ietf.org/html/rfc7807) `applica
261261

262262
## Configuration
263263

264-
All broker environment variables use the `AA_` prefix. The broker also reads config files generated by `aactl init` (see [Getting Started: Operator](docs/getting-started-operator.md)).
264+
All broker environment variables use the `AA_` prefix. The broker also reads config files generated by `awrit init` (see [Getting Started: Operator](docs/getting-started-operator.md)).
265265

266266
### Required
267267

268268
| Variable | Description |
269269
|----------|-------------|
270-
| `AA_ADMIN_SECRET` | Shared secret for admin authentication. Broker exits if unset. Use `aactl init` to generate one securely. |
270+
| `AA_ADMIN_SECRET` | Shared secret for admin authentication. Broker exits if unset. Use `awrit init` to generate one securely. |
271271

272272
### Broker settings
273273

@@ -296,7 +296,7 @@ If `AA_DEFAULT_TTL` exceeds `AA_MAX_TTL`, the broker logs a warning at startup a
296296
|----------|---------|-------------|
297297
| `AA_DB_PATH` | `./agentauth.db` | SQLite database path (audit events, revocations, agents, apps) |
298298
| `AA_SIGNING_KEY_PATH` | `./signing.key` | Ed25519 signing key path. Auto-generated on first startup. |
299-
| `AA_CONFIG_PATH` | *(none)* | Path to config file from `aactl init`. Optional — env vars override config file values. |
299+
| `AA_CONFIG_PATH` | *(none)* | Path to config file from `awrit init`. Optional — env vars override config file values. |
300300

301301
### TLS / mTLS
302302

@@ -312,7 +312,7 @@ If `AA_DEFAULT_TTL` exceeds `AA_MAX_TTL`, the broker logs a warning at startup a
312312
| Variable | Description |
313313
|----------|-------------|
314314
| `AACTL_BROKER_URL` | Broker base URL (e.g., `http://localhost:8080`) |
315-
| `AACTL_ADMIN_SECRET` | Admin secret for aactl authentication |
315+
| `AACTL_ADMIN_SECRET` | Admin secret for awrit authentication |
316316

317317
---
318318

@@ -355,13 +355,13 @@ The Docker Compose stack runs the broker on port 8080 (override with `AA_HOST_PO
355355

356356
---
357357

358-
## Operator CLI (aactl)
358+
## Operator CLI (awrit)
359359

360-
`aactl` is the operator's command-line tool for managing the AgentAuth broker. It auto-authenticates with the broker using `AACTL_BROKER_URL` and `AACTL_ADMIN_SECRET`.
360+
`awrit` is the operator's command-line tool for managing the AgentAuth broker. It auto-authenticates with the broker using `AACTL_BROKER_URL` and `AACTL_ADMIN_SECRET`.
361361

362362
```bash
363363
# Build
364-
go build -o bin/aactl ./cmd/aactl/
364+
go build -o bin/awrit ./cmd/awrit/
365365

366366
# Configure
367367
export AACTL_BROKER_URL=http://localhost:8080
@@ -371,37 +371,37 @@ export AACTL_ADMIN_SECRET="your-admin-secret-here"
371371
### Config generation
372372

373373
```bash
374-
aactl init # Dev mode (plaintext secret in config)
375-
aactl init --mode=prod # Prod mode (bcrypt hash in config, plaintext shown once)
376-
aactl init --force --config-path /etc/aa/cfg # Force overwrite at custom path
374+
awrit init # Dev mode (plaintext secret in config)
375+
awrit init --mode=prod # Prod mode (bcrypt hash in config, plaintext shown once)
376+
awrit init --force --config-path /etc/aa/cfg # Force overwrite at custom path
377377
```
378378

379379
### App management
380380

381381
```bash
382-
aactl app register --name my-pipeline --scopes "read:data:*,write:logs:*"
383-
aactl app list
384-
aactl app get <app-id>
385-
aactl app update --id <app-id> --scopes "read:data:*"
386-
aactl app remove --id <app-id>
382+
awrit app register --name my-pipeline --scopes "read:data:*,write:logs:*"
383+
awrit app list
384+
awrit app get <app-id>
385+
awrit app update --id <app-id> --scopes "read:data:*"
386+
awrit app remove --id <app-id>
387387
```
388388

389389
### Revocation and audit
390390

391391
```bash
392-
aactl revoke --level token --target <jti> # Revoke a single token
393-
aactl revoke --level agent --target <agent-id> # Revoke all tokens for an agent
394-
aactl audit events # Full audit trail
395-
aactl audit events --outcome denied --limit 20 # Filter for denied events
392+
awrit revoke --level token --target <jti> # Revoke a single token
393+
awrit revoke --level agent --target <agent-id> # Revoke all tokens for an agent
394+
awrit audit events # Full audit trail
395+
awrit audit events --outcome denied --limit 20 # Filter for denied events
396396
```
397397

398398
### Token operations
399399

400400
```bash
401-
aactl token release --token <jwt> # Self-revoke a token
401+
awrit token release --token <jwt> # Self-revoke a token
402402
```
403403

404-
All commands support `--json` for machine-readable output. See [aactl CLI Reference](docs/aactl-reference.md) for the complete command reference.
404+
All commands support `--json` for machine-readable output. See [awrit CLI Reference](docs/awrit-reference.md) for the complete command reference.
405405

406406
---
407407

@@ -477,7 +477,7 @@ server {
477477
| Document | Description |
478478
|----------|-------------|
479479
| [Integration Patterns](docs/integration-patterns.md) | Real-world patterns with Python examples: multi-agent pipelines, delegation chains, token release, emergency revocation |
480-
| [aactl CLI Reference](docs/aactl-reference.md) | Complete operator CLI reference: all commands, flags, examples |
480+
| [awrit CLI Reference](docs/awrit-reference.md) | Complete operator CLI reference: all commands, flags, examples |
481481

482482
### Project
483483

TECH-DEBT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ Audit triggered by discovery of hardcoded `iss: "agentauth"` in `internal/token/
348348
| TD-CFG-002 | ~~**Hardcoded FHS search path `/etc/agentauth/config`**~~ | ~~CRITICAL~~ | **RESOLVED 2026-04-10** — config search paths updated: `/etc/agentauth/config``/etc/broker/config` and `~/.agentauth/config``~/.broker/config`. Generated config file header `# AgentAuth Configuration``# Broker Configuration`. Same branch as TD-TOKEN-001. | `internal/cfg/configfile.go` |
349349
| TD-TOKEN-003 | ~~**Tests lock the issuer hardcode in place** — 6 assertions across `tkn_svc_test.go` and `val_mw_test.go`~~ | ~~HIGH~~ | **RESOLVED 2026-04-10** — all 6 assertions and 3 `cfg.Cfg{}` literal constructions updated to drive from fixture `Issuer: "test-issuer"`. Same branch as TD-TOKEN-001. | `internal/token/tkn_svc_test.go`, `internal/authz/val_mw_test.go`, `internal/deleg/deleg_svc_test.go`, `internal/admin/admin_svc_test.go` |
350350
| TD-TEST-001 | ~~**Test SPIFFE fixtures leak `agentauth.local`**~~ | ~~MEDIUM~~ | **RESOLVED 2026-04-10** — all `agentauth.local` references in test files swept to `test.local` (mechanical sed across `admin_hdl_test.go`, `identity/id_svc_test.go`, `mutauth/{heartbeat,discovery,mut_auth_hdl}_test.go`, `token/tkn_svc_test.go`). Same branch as TD-TOKEN-001. | `internal/admin/admin_hdl_test.go`, `internal/identity/id_svc_test.go`, `internal/mutauth/heartbeat_test.go`, `internal/mutauth/discovery_test.go`, `internal/mutauth/mut_auth_hdl_test.go`, `internal/token/tkn_svc_test.go` |
351-
| TD-CLI-001 | **Binary name `aactl``awrit` rename** — 227 occurrences across `cmd/aactl/`, scripts, docs, tests, CHANGELOG. Mechanical. No logic change. | **MEDIUM** | PR 2 (can parallel PR 1) | `cmd/aactl/` (→ `cmd/awrit/`), `docs/aactl-reference.md`, scripts, tests |
351+
| TD-CLI-001 | ~~**Binary name `aactl``awrit` rename**~~ | ~~MEDIUM~~ | **RESOLVED 2026-04-10**`cmd/aactl/``cmd/awrit/`, `docs/aactl-reference.md``docs/awrit-reference.md`, Cobra command `Use` field, all ship-to-main doc/script/test/config references rewritten. Evidence files under `tests/*/evidence/*.md` preserved as-is (historical records). Branch `fix/td-cli-001-aactl-to-awrit-rename`. | `cmd/awrit/`, `docs/awrit-reference.md`, scripts, docs, tests |
352352

353353
**Not creating a TD for env var prefix** — decided 2026-04-10 to keep `AA_*` indefinitely. Neutral enough (two letters), operator-facing, highest-friction change in the whole rebrand. Re-evaluate at 1.0 if ever.
354354

cmd/aactl/main.go

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// Package main — aactl app subcommands for managing registered apps.
1+
// Package main — awrit app subcommands for managing registered apps.
22
//
33
// Commands:
44
//
5-
// aactl app register --name NAME --scopes SCOPE_CSV [--token-ttl N]
6-
// aactl app list [--json]
7-
// aactl app get APP_ID
8-
// aactl app update --id APP_ID [--scopes SCOPE_CSV] [--token-ttl N]
9-
// aactl app remove --id APP_ID
5+
// awrit app register --name NAME --scopes SCOPE_CSV [--token-ttl N]
6+
// awrit app list [--json]
7+
// awrit app get APP_ID
8+
// awrit app update --id APP_ID [--scopes SCOPE_CSV] [--token-ttl N]
9+
// awrit app remove --id APP_ID
1010
package main
1111

1212
import (
@@ -19,21 +19,21 @@ import (
1919
)
2020

2121
// appCmd is the parent command grouping all app-related subcommands
22-
// under "aactl app".
22+
// under "awrit app".
2323
var appCmd = &cobra.Command{
2424
Use: "app",
2525
Short: "Manage registered apps",
2626
}
2727

2828
// appRegisterName, appRegisterScopes, and appRegisterTokenTTL hold flag values
29-
// for "aactl app register".
29+
// for "awrit app register".
3030
var (
3131
appRegisterName string
3232
appRegisterScopes string
3333
appRegisterTokenTTL int
3434
)
3535

36-
// appRegisterCmd implements "aactl app register", creating a new app registration
36+
// appRegisterCmd implements "awrit app register", creating a new app registration
3737
// and printing the generated client_id and client_secret.
3838
var appRegisterCmd = &cobra.Command{
3939
Use: "register",
@@ -92,7 +92,7 @@ var appRegisterCmd = &cobra.Command{
9292
},
9393
}
9494

95-
// appListCmd implements "aactl app list", printing all registered apps.
95+
// appListCmd implements "awrit app list", printing all registered apps.
9696
var appListCmd = &cobra.Command{
9797
Use: "list",
9898
Short: "List all registered apps",
@@ -144,7 +144,7 @@ var appListCmd = &cobra.Command{
144144
},
145145
}
146146

147-
// appGetCmd implements "aactl app get APP_ID", printing full details for one app.
147+
// appGetCmd implements "awrit app get APP_ID", printing full details for one app.
148148
var appGetCmd = &cobra.Command{
149149
Use: "get APP_ID",
150150
Short: "Get details of a specific app",
@@ -195,14 +195,14 @@ var appGetCmd = &cobra.Command{
195195
}
196196

197197
// appUpdateID, appUpdateScopes, and appUpdateTokenTTL hold flag values
198-
// for "aactl app update".
198+
// for "awrit app update".
199199
var (
200200
appUpdateID string
201201
appUpdateScopes string
202202
appUpdateTokenTTL int
203203
)
204204

205-
// appUpdateCmd implements "aactl app update --id APP_ID [--scopes SCOPE_CSV] [--token-ttl N]",
205+
// appUpdateCmd implements "awrit app update --id APP_ID [--scopes SCOPE_CSV] [--token-ttl N]",
206206
// updating scope ceiling and/or token TTL for an existing app.
207207
var appUpdateCmd = &cobra.Command{
208208
Use: "update",
@@ -252,10 +252,10 @@ var appUpdateCmd = &cobra.Command{
252252
},
253253
}
254254

255-
// appRemoveID holds the --id flag value for "aactl app remove".
255+
// appRemoveID holds the --id flag value for "awrit app remove".
256256
var appRemoveID string
257257

258-
// appRemoveCmd implements "aactl app remove --id APP_ID", deregistering an app
258+
// appRemoveCmd implements "awrit app remove --id APP_ID", deregistering an app
259259
// (soft delete — credentials stop working but record is retained).
260260
var appRemoveCmd = &cobra.Command{
261261
Use: "remove",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// audit.go implements the aactl audit command group.
1+
// audit.go implements the awrit audit command group.
22
package main
33

44
import (

0 commit comments

Comments
 (0)