Skip to content

Commit 499d3ff

Browse files
v0.2.3: setup wizard adds service install, Claude Code registration, PATH check
- cortex setup now handles full onboarding: init, embeddings, password, LLM test, background service install, Claude Code registration, PATH symlink - Homebrew formula fixed: installs from wheel, includes virtualenv mixin
1 parent 74d6bbe commit 499d3ff

7 files changed

Lines changed: 103 additions & 19 deletions

File tree

CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [0.2.3] — 2026-04-12
11+
12+
### Changed
13+
14+
- **Setup wizard enhanced**`cortex setup` now installs the background service (LaunchAgent/systemd), registers with Claude Code, and offers to add `cortex` to PATH. Two commands is all a new user needs: `brew install` + `cortex setup`.
15+
- **Homebrew formula fixed** — installs from PyPI wheel instead of building from source (avoids Rust toolchain requirement). Added `include Language::Python::Virtualenv` and `ensurepip` bootstrap.
16+
1017
## [0.2.2] — 2026-04-11
1118

1219
### Fixed
@@ -538,6 +545,7 @@ If you're upgrading from a pre-2026-04-07 install:
538545
> (MCP, dashboard, REST API) plus the CLI now route through the
539546
> canonical MCP HTTP server.
540547
541-
[Unreleased]: https://github.com/abbacusgroup/Cortex/compare/v0.2.2...HEAD
548+
[Unreleased]: https://github.com/abbacusgroup/Cortex/compare/v0.2.3...HEAD
549+
[0.2.3]: https://github.com/abbacusgroup/Cortex/compare/v0.2.2...v0.2.3
542550
[0.2.2]: https://github.com/abbacusgroup/Cortex/compare/v0.2.0...v0.2.2
543551
[0.2.0]: https://github.com/abbacusgroup/Cortex/releases/tag/v0.2.0

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1111
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
1212

1313
# Copy project files
14-
COPY pyproject.toml uv.lock* ./
14+
COPY pyproject.toml uv.lock* README.md LICENSE ./
1515
COPY src/ src/
1616
COPY ontology/ ontology/
1717
COPY llms.txt ./
1818

1919
# Install dependencies
2020
RUN uv sync --no-dev --frozen 2>/dev/null || uv sync --no-dev
2121

22-
# Create data directory
22+
# Create data directory and initialize
2323
RUN mkdir -p /data
2424

2525
ENV CORTEX_DATA_DIR=/data
@@ -28,9 +28,9 @@ ENV CORTEX_PORT=1314
2828

2929
EXPOSE 1314
3030

31-
# Health check
32-
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \
33-
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:1314/health')" || exit 1
31+
# Health check — JSON-RPC ping to MCP endpoint
32+
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s \
33+
CMD python -c "import urllib.request,json; r=urllib.request.Request('http://localhost:1314/mcp',data=json.dumps({'jsonrpc':'2.0','id':1,'method':'ping'}).encode(),headers={'Content-Type':'application/json','Accept':'application/json, text/event-stream'},method='POST'); urllib.request.urlopen(r)" || exit 1
3434

35-
# Default: run HTTP API server
36-
CMD ["uv", "run", "cortex", "serve", "--transport", "http", "--host", "0.0.0.0", "--port", "1314"]
35+
# Init data dir if empty (handles mounted volumes), then start server
36+
CMD ["sh", "-c", "uv run cortex init 2>/dev/null; uv run cortex serve --transport mcp-http --host 0.0.0.0 --port 1314"]

homebrew/Formula/abbacus-cortex.rb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
class AbbacusCortex < Formula
2+
include Language::Python::Virtualenv
3+
24
desc "AI knowledge pipeline -- capture, search, and reason over your knowledge"
35
homepage "https://github.com/abbacusgroup/Cortex"
4-
url "https://files.pythonhosted.org/packages/source/a/abbacus-cortex/abbacus_cortex-0.2.1.tar.gz"
5-
sha256 "0cebbd3846b7e8d90cb3c4ecc4f44805f05616c066371f09810fb71217c53f47"
6+
url "https://files.pythonhosted.org/packages/source/a/abbacus-cortex/abbacus_cortex-0.2.2.tar.gz"
7+
sha256 "88f3ce14c64e3c5826fa2ee3ee273f2b6216b737835a99d3d53146106444dc5a"
68
license "BUSL-1.1"
79

810
depends_on "python@3.12"
911

1012
def install
11-
venv = virtualenv_create(libexec, "python3.12")
12-
venv.pip_install_and_link buildpath
13+
python3 = "python3.12"
14+
venv = virtualenv_create(libexec, python3)
15+
# Install from PyPI wheel (avoids building from source)
16+
system libexec/"bin/python", "-m", "ensurepip", "--default-pip"
17+
system libexec/"bin/python", "-m", "pip", "install", "--upgrade", "pip"
18+
system libexec/"bin/python", "-m", "pip", "install", "abbacus-cortex==#{version}"
19+
bin.install_symlink libexec/"bin/cortex"
1320
end
1421

1522
def post_install

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "abbacus-cortex"
3-
version = "0.2.2"
3+
version = "0.2.3"
44
description = "Cognitive knowledge system with formal ontology, reasoning, and intelligence serving"
55
readme = "README.md"
66
authors = [
@@ -74,7 +74,7 @@ dev = [
7474
]
7575

7676
[build-system]
77-
requires = ["uv_build>=0.10.12,<0.11.0"]
77+
requires = ["uv_build>=0.10.12,<1.0.0"]
7878
build-backend = "uv_build"
7979

8080
[tool.uv]

src/cortex/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Cortex — Cognitive knowledge system."""
22

3-
__version__ = "0.2.2"
3+
__version__ = "0.2.3"

src/cortex/cli/main.py

Lines changed: 72 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,9 +1101,78 @@ def setup(
11011101
else:
11021102
typer.echo(" LLM: not configured (set CORTEX_LLM_MODEL and CORTEX_LLM_API_KEY)")
11031103

1104-
typer.echo(f"\nCortex ready at {config.data_dir}")
1105-
typer.echo(" Run `cortex status` to verify.")
1106-
typer.echo(" Run `cortex serve` to start the server.")
1104+
# 5. Install background service
1105+
if not auto:
1106+
install_svc = typer.confirm(
1107+
"\n Install as background service? (auto-starts on login)", default=True
1108+
)
1109+
else:
1110+
install_svc = True
1111+
1112+
if install_svc:
1113+
try:
1114+
from cortex.cli.install import do_install
1115+
1116+
do_install(config=config, service="mcp")
1117+
except Exception as e:
1118+
typer.echo(f" Service install failed: {e}")
1119+
typer.echo(" You can start manually: cortex serve --transport mcp-http")
1120+
else:
1121+
typer.echo(" Skipped. Start manually: cortex serve --transport mcp-http")
1122+
1123+
# 6. Register with Claude Code
1124+
register_cc = typer.confirm(" Register with Claude Code?", default=True) if not auto else True
1125+
1126+
if register_cc:
1127+
try:
1128+
import json
1129+
1130+
settings_path = Path.home() / ".claude" / "settings.json"
1131+
settings: dict[str, Any] = {}
1132+
if settings_path.exists():
1133+
settings = json.loads(settings_path.read_text())
1134+
mcp_servers = settings.setdefault("mcpServers", {})
1135+
mcp_servers["cortex"] = {
1136+
"type": "http",
1137+
"url": config.mcp_server_url,
1138+
}
1139+
settings_path.parent.mkdir(parents=True, exist_ok=True)
1140+
settings_path.write_text(json.dumps(settings, indent=2) + "\n")
1141+
typer.echo(f" Registered with Claude Code ({config.mcp_server_url})")
1142+
except Exception as e:
1143+
typer.echo(f" Registration failed: {e}")
1144+
typer.echo(" You can register later: cortex register")
1145+
1146+
# 7. PATH check
1147+
import shutil
1148+
1149+
if not shutil.which("cortex"):
1150+
cortex_bin = Path(sys.executable).parent / "cortex"
1151+
if cortex_bin.exists():
1152+
link_path = Path("/usr/local/bin/cortex")
1153+
if not auto:
1154+
add_path = typer.confirm(
1155+
" Add `cortex` to your PATH? (creates symlink in /usr/local/bin)",
1156+
default=True,
1157+
)
1158+
else:
1159+
add_path = True
1160+
1161+
if add_path:
1162+
try:
1163+
link_path.symlink_to(cortex_bin)
1164+
typer.echo(f" Linked: {link_path} -> {cortex_bin}")
1165+
except PermissionError:
1166+
typer.echo(f" Needs sudo. Run: sudo ln -sf {cortex_bin} {link_path}")
1167+
except FileExistsError:
1168+
typer.echo(f" {link_path} already exists — skipping")
1169+
else:
1170+
typer.echo(f" Skipped. Run: sudo ln -sf {cortex_bin} /usr/local/bin/cortex")
1171+
1172+
typer.echo("\nCortex is ready!")
1173+
typer.echo(f" Data: {config.data_dir}")
1174+
typer.echo(f" Server: http://{config.host}:{config.port}/mcp")
1175+
typer.echo('\n Try: cortex capture "My first note" --type idea --content "Hello Cortex!"')
11071176

11081177
global _store
11091178
_store = store

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)