Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"name": "archastro",
"source": "./.claude-plugins/archastro",
"description": "The complete ArchAstro developer plugin: install and authenticate the public ArchAstro CLI, then author agents, build scripts and workflows, manage configs, deploy agents, chat with running agents, and impersonate agents from Claude Code.",
"version": "0.3.3",
"version": "0.3.4",
"category": "development",
"tags": [
"archastro",
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugins/archastro/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "archastro",
"description": "The complete ArchAstro developer plugin: install and authenticate the public ArchAstro CLI, then author agents, build scripts and workflows, manage configs, deploy agents, chat with running agents, and impersonate agents from Claude Code.",
"version": "0.3.3",
"version": "0.3.4",
"author": { "name": "ArchAstro" },
"license": "MIT",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions .claude-plugins/archastro/commands/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ Install or upgrade the public `archastro` binary from Homebrew or GitHub Release
```
- On Linux or macOS without Homebrew:
```
curl -fsSL https://raw.githubusercontent.com/ArchAstro/archastro-cli/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/ArchAstro/archastro/main/install.sh | bash
```
- On Windows PowerShell:
```powershell
irm https://raw.githubusercontent.com/ArchAstro/archastro-cli/main/install.ps1 | iex
irm https://raw.githubusercontent.com/ArchAstro/archastro/main/install.ps1 | iex
```

5. **Verify installation**:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,31 @@ brew install ArchAstro/tools/archastro
Fallback to the installer script:

```bash
curl -fsSL https://raw.githubusercontent.com/ArchAstro/archastro-cli/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/ArchAstro/archastro/main/install.sh | bash
```

### Linux

Use the installer script:

```bash
curl -fsSL https://raw.githubusercontent.com/ArchAstro/archastro-cli/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/ArchAstro/archastro/main/install.sh | bash
```

### Windows

Use the PowerShell installer:

```powershell
irm https://raw.githubusercontent.com/ArchAstro/archastro-cli/main/install.ps1 | iex
irm https://raw.githubusercontent.com/ArchAstro/archastro/main/install.ps1 | iex
```

## Claude Code Plugin

Add the marketplace and install the `archastro` plugin:

```text
/plugin marketplace add archastro/archastro-cli
/plugin marketplace add archastro/archastro
/plugin install archastro@archastro
```

Expand Down
2 changes: 1 addition & 1 deletion install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function Resolve-BoolEnv {
}

$Owner = "ArchAstro"
$Repo = "archastro-cli"
$Repo = "archastro"
$BinaryName = "archastro.exe"

if ([string]::IsNullOrWhiteSpace($Version)) {
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

OWNER="ArchAstro"
REPO="archastro-cli"
REPO="archastro"
BINARY_NAME="archastro"
DEFAULT_VERSION="latest"
INSTALL_DIR="${ARCHASTRO_INSTALL_DIR:-}"
Expand Down
8 changes: 4 additions & 4 deletions plugins/archastro/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "archastro",
"version": "0.3.3",
"version": "0.3.4",
"description": "Author, deploy, manage, chat with, and impersonate ArchAstro agents from Codex through the ArchAstro CLI.",
"author": {
"name": "ArchAstro",
"email": "dev@archastro.com",
"url": "https://github.com/ArchAstro"
},
"homepage": "https://github.com/ArchAstro/archastro-cli",
"repository": "https://github.com/ArchAstro/archastro-cli",
"homepage": "https://github.com/ArchAstro/archastro",
"repository": "https://github.com/ArchAstro/archastro",
"license": "MIT",
"keywords": [
"archastro",
Expand All @@ -31,7 +31,7 @@
"Write",
"Shell"
],
"websiteURL": "https://github.com/ArchAstro/archastro-cli",
"websiteURL": "https://github.com/ArchAstro/archastro",
"defaultPrompt": [
"Author a config-driven ArchAstro agent.",
"Set up local configs for this repo.",
Expand Down
4 changes: 2 additions & 2 deletions plugins/archastro/skills/install/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ Install or upgrade the public `archastro` binary from Homebrew or GitHub Release
```
- On Linux or macOS without Homebrew:
```
curl -fsSL https://raw.githubusercontent.com/ArchAstro/archastro-cli/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/ArchAstro/archastro/main/install.sh | bash
```
- On Windows PowerShell:
```powershell
irm https://raw.githubusercontent.com/ArchAstro/archastro-cli/main/install.ps1 | iex
irm https://raw.githubusercontent.com/ArchAstro/archastro/main/install.ps1 | iex
```

5. **Verify installation**:
Expand Down
37 changes: 37 additions & 0 deletions scripts/check_plugin_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
CHECKS
Implemented: check_manifest_consistency, check_compat_key_refs,
check_slash_command_refs, check_hardcoded_versions,
check_legacy_repository_refs,
check_version_bump_on_content_change
"""
from __future__ import annotations
Expand Down Expand Up @@ -69,6 +70,20 @@
REPO_ROOT / "plugins" / "archastro" / "skills",
]

PUBLIC_REPOSITORY_REFERENCE_FILES: tuple[Path, ...] = (
REPO_ROOT / "README.md",
REPO_ROOT / "install.sh",
REPO_ROOT / "install.ps1",
REPO_ROOT / "sources" / "install.md",
REPO_ROOT / ".claude-plugins" / "archastro" / "commands" / "install.md",
REPO_ROOT / "plugins" / "archastro" / "skills" / "install" / "SKILL.md",
REPO_ROOT / "plugins" / "archastro" / ".codex-plugin" / "plugin.json",
)

LEGACY_REPOSITORY_SLUG = "ArchAstro/archastro-cli"
LEGACY_REPOSITORY_NAME = "archastro-cli"
CANONICAL_REPOSITORY_SLUG = "ArchAstro/archastro"


def _rel(p: Path) -> str:
"""Return `p` relative to REPO_ROOT, or absolute (tests use tmpdirs)."""
Expand Down Expand Up @@ -127,6 +142,27 @@ def _load_json_dict(path: Path) -> tuple[dict | None, str | None]:
return data, None


def check_legacy_repository_refs(
files: Iterable[Path] = PUBLIC_REPOSITORY_REFERENCE_FILES,
) -> list[str]:
"""Reject public links that still use the repository's pre-rename slug."""
errors: list[str] = []
for path in files:
try:
lines = path.read_text(encoding="utf-8").splitlines()
except OSError as exc:
errors.append(f"{_rel(path)}: cannot read ({exc})")
continue
for lineno, line in enumerate(lines, start=1):
if LEGACY_REPOSITORY_NAME in line.lower():
errors.append(
f"{_rel(path)}:{lineno}: references renamed repository "
f"`{LEGACY_REPOSITORY_SLUG}`; use "
f"`{CANONICAL_REPOSITORY_SLUG}`"
)
return errors


def check_manifest_consistency(
marketplace_path: Path = CLAUDE_MARKETPLACE_PATH,
claude_plugin_path: Path = CLAUDE_PLUGIN_MANIFEST_PATH,
Expand Down Expand Up @@ -586,6 +622,7 @@ def _git(*args: str) -> subprocess.CompletedProcess[str] | None:
# manifest's version against the PR base).
CHECKS: list[tuple[str, Callable[[], list[str]]]] = [
("manifest consistency", check_manifest_consistency),
("canonical repository refs", check_legacy_repository_refs),
("compat key refs", check_compat_key_refs),
("slash command refs", check_slash_command_refs),
("hardcoded versions", check_hardcoded_versions),
Expand Down
52 changes: 51 additions & 1 deletion scripts/test_check_plugin_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,55 @@ def test_multiple_file_errors_reported_together(self):
self.assertTrue(any("codex-plugin.json" in e for e in errors))


class LegacyRepositoryRefsTest(unittest.TestCase):
"""Tests for check_legacy_repository_refs()."""

def setUp(self) -> None:
self._tmp = tempfile.TemporaryDirectory()
self.tmp = Path(self._tmp.name)

def tearDown(self) -> None:
self._tmp.cleanup()

def test_canonical_repository_urls_pass(self):
path = self.tmp / "README.md"
path.write_text("https://github.com/ArchAstro/archastro\n")
self.assertEqual(
check_plugin_repo.check_legacy_repository_refs(files=[path]),
[],
)

def test_default_file_set_covers_both_installers(self):
self.assertIn(
check_plugin_repo.REPO_ROOT / "install.sh",
check_plugin_repo.PUBLIC_REPOSITORY_REFERENCE_FILES,
)
self.assertIn(
check_plugin_repo.REPO_ROOT / "install.ps1",
check_plugin_repo.PUBLIC_REPOSITORY_REFERENCE_FILES,
)

def test_renamed_repository_url_fails_with_line_number(self):
path = self.tmp / "README.md"
path.write_text(
"# Install\n"
"https://raw.githubusercontent.com/ArchAstro/archastro-cli/main/install.sh\n"
)
errors = check_plugin_repo.check_legacy_repository_refs(files=[path])
self.assertEqual(len(errors), 1)
self.assertIn(f"{path}:2:", errors[0])
self.assertIn("ArchAstro/archastro-cli", errors[0])
self.assertIn("ArchAstro/archastro", errors[0])

def test_separate_repository_variable_fails(self):
path = self.tmp / "install.ps1"
path.write_text('$Owner = "ArchAstro"\n$Repo = "archastro-cli"\n')
errors = check_plugin_repo.check_legacy_repository_refs(files=[path])
self.assertEqual(len(errors), 1)
self.assertIn(f"{path}:2:", errors[0])
self.assertIn("archastro-cli", errors[0])


class CompatKeyRefsTest(unittest.TestCase):
"""Tests for check_compat_key_refs()."""

Expand Down Expand Up @@ -1155,14 +1204,15 @@ def test_multiple_errors_from_single_check_all_printed(self):
# Real CHECKS registry sanity ----------------------------------------

def test_real_checks_registry_has_expected_entries(self):
# The real CHECKS list should contain all 5 checks in the expected
# The real CHECKS list should contain all 6 checks in the expected
# order. This guards against accidental removal or reordering that
# would break invariants documented in the comment above CHECKS.
names = [name for name, _ in self._original_checks]
self.assertEqual(
names,
[
"manifest consistency",
"canonical repository refs",
"compat key refs",
"slash command refs",
"hardcoded versions",
Expand Down
4 changes: 2 additions & 2 deletions sources/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ Install or upgrade the public `archastro` binary from Homebrew or GitHub Release
```
- On Linux or macOS without Homebrew:
```
curl -fsSL https://raw.githubusercontent.com/ArchAstro/archastro-cli/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/ArchAstro/archastro/main/install.sh | bash
```
- On Windows PowerShell:
```powershell
irm https://raw.githubusercontent.com/ArchAstro/archastro-cli/main/install.ps1 | iex
irm https://raw.githubusercontent.com/ArchAstro/archastro/main/install.ps1 | iex
```

5. **Verify installation**:
Expand Down
Loading