Skip to content

Commit b008f84

Browse files
chore: remove deprecated commands, PRAXIS_PROFILE, and dead scaffolding (#46)
The deprecation layer was stamped "removed in v0.8" but the CLI has been at v0.x well past that (now v0.17.0), so the hidden commands and the PRAXIS_PROFILE env var have outlived their migration window by ~10 minor releases. Drop them for the next major. Removed commands (each already has a live replacement): init, install-skill -> login uninstall-skill -> logout whoami -> status use -> login --profile <name> Also removed: - PRAXIS_PROFILE env var: dropped from the active-profile resolution chain entirely (not just un-warned), incl. the SourceEnv source and the per-invocation deprecation warning (warnDeprecatedEnvVars). - cmd/deprecated.go and the deprecate() wrapper + their tests. - install-skill/uninstall-skill helpers that were deprecated-only (installCatalogSkills, snapshotMCPManifest, uninstallSkill seam, skillName const, harnessNames). Kept (verified still used by the live login path): installSkill, installSkillBody, fetchCatalog, listInstalledSkill seams; fetchAuthMe; list-skills and refresh-skills commands. skillInstallationLite moved from the deleted init.go into login_setup.go where it's consumed. Left in place by design: orphaned-skill/agent cleanup, forward-compat Kind fields, and omitempty receipt migration — defensive compat code that helps users crossing this major boundary, not deprecated surface. Updated stale doc/comment references (README, CLAUDE.md, profiles, paths, mcpmanifest, skillcatalog, exitcode) and the list-skills hint string, and removed now-dead t.Setenv("PRAXIS_PROFILE", "") test resets. make build / go vet / gofmt clean; go test -race ./... green. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e58a9b9 commit b008f84

31 files changed

Lines changed: 46 additions & 1182 deletions

CLAUDE.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ cmd/ cobra command tree (only commands that DO something
5151
update.go `praxis update` (self-update via GitHub Releases)
5252
completion.go `praxis completion {bash|zsh|fish|powershell}`
5353
logout.go `praxis logout` (deletes ~/.praxis/credentials)
54-
use.go `praxis use <profile>` (sets the GLOBAL active-profile
55-
pointer; local mode is `praxis login --local`)
5654
duty.go `praxis duty *` (Agent Schedule runs/findings/reports)
5755
internal/ pure logic, unit-tested
5856
paths/ Praxis filesystem locations. Two roots: the HOME root
@@ -70,8 +68,9 @@ Makefile build (with ldflags), install, test, lint, clean
7068
**Don't add stub commands.** A cobra command that prints "not yet
7169
implemented" is worse than no command — it lies to users and to
7270
`--help`. Skill sourcing and the server gateway are now live:
73-
`login`, `whoami`, `mcp`, `install-skill`, `uninstall-skill`,
74-
`list-skills`, and `refresh-skills` are all implemented. Skills are
71+
`login`, `logout`, `status`, `profiles`, `mcp`, `list-skills`, and
72+
`refresh-skills` are all implemented (skills install automatically as
73+
part of `login`/`refresh-skills`). Skills are
7574
fetched from the server, name-prefixed (`praxis-*`), and have the
7675
`render.ExecutionPreamble` inserted after their frontmatter so any
7776
in-process MCP reference (`run_cloud_cli(...)`) is rewritten to a
@@ -114,7 +113,7 @@ Invariants to preserve when touching this area:
114113
resolve the global profile (`credentials.ResolveActiveGlobal`), so being
115114
inside a project tree never redirects them.
116115
- **Active-profile resolution** (`credentials.resolveName`): `--profile`
117-
flag → project pointer → global pointer → `PRAXIS_PROFILE``"default"`.
116+
flag → project pointer → global pointer → `"default"`.
118117
`SourceProject` marks the project case; a project pointer to an unknown
119118
profile falls back to the global resolution.
120119
- Discovery is **home-subtree only** — matches the intended use case and

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,6 @@ praxis duty <subcommand> [--agent <name|id>] [--json]
177177
report <run_id> the report artifact a run produced
178178
findings <duty> [--status open|resolved|all] [--limit N]
179179
180-
praxis use <profile> [--json]
181-
Set the GLOBAL active profile (~/.praxis/config.json) without
182-
re-authenticating — kubectl-style. The profile must already exist
183-
(created by `praxis login --profile <name>`). To pin a profile to
184-
one directory tree instead, use `praxis login --local` (see "Local
185-
mode" below).
186-
187180
praxis refresh-skills [--project] [--json]
188181
Re-fetch this profile's catalog and rewrite skill files + MCP
189182
snapshot, without re-authenticating. Use when the org has
@@ -309,7 +302,7 @@ Now each repo is permanently "logged in" as its own profile:
309302
```text
310303
~/work/acme-repo/ → profile acme, skills in ./.claude/skills
311304
~/work/bigcorp-repo/ → profile bigcorp, skills in ./.claude/skills
312-
~/ (everywhere else) → the global profile (set by login / `praxis use`)
305+
~/ (everywhere else) → the global profile (set by `praxis login`)
313306
```
314307

315308
`praxis login --profile <name> --local`:
@@ -328,9 +321,8 @@ Active-profile resolution walks this chain (first match wins):
328321
```text
329322
1. --profile flag on the command
330323
2. <cwd>/.praxis/config.json ← project pointer (walks up to your home dir)
331-
3. ~/.praxis/config.json ← global pointer (set by `praxis use`)
332-
4. PRAXIS_PROFILE env var
333-
5. "default"
324+
3. ~/.praxis/config.json ← global pointer (set by `praxis login --profile`)
325+
4. "default"
334326
```
335327

336328
Local mode only activates when **you actually have the pinned profile**.
@@ -393,7 +385,7 @@ praxis logout --all
393385
```text
394386
~/.praxis/credentials INI, one [section] per profile (chmod 0600)
395387
— ALWAYS global; shared across every directory
396-
~/.praxis/config.json global active-profile pointer (login / `praxis use`)
388+
~/.praxis/config.json global active-profile pointer (set by `praxis login`)
397389
~/.praxis/mcp-tools.json manifest snapshot of gateway tools
398390
~/.praxis/installed.json receipt of skill files written across hosts
399391

cmd/deprecated.go

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

cmd/deprecated_test.go

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

cmd/duty_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ func stubScheduleResolution(t *testing.T, name, id string) func() {
4646
func seedDutyProfile(t *testing.T) {
4747
t.Helper()
4848
t.Setenv("HOME", t.TempDir())
49-
t.Setenv("PRAXIS_PROFILE", "")
5049
if err := credentials.Put("default", credentials.Profile{
5150
URL: "https://x.test", Username: "u@x.com", Token: "sk_test_T",
5251
}); err != nil {

cmd/init.go

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

0 commit comments

Comments
 (0)