Skip to main content

unlegacy-cli

Installable CLI for connecting local coding agents to Unlegacy MCP.

Unlegacy generates repository documentation, API references, knowledge graph data, and Vault investigation docs in the platform. This CLI configures external coding agents so they can consume that MCP surface.

Install

Published package:

uv tool install unlegacy-cli

or:

pip install unlegacy-cli

After install, the command is saved on the user's machine as:

unlegacy --help

From a checkout:

pip install .

or:

uv tool install .

One-shot setup without preinstalling:

uv tool run --from 'unlegacy-cli>=0.7.1' unlegacy setup

Distribution

Build the package artifacts:

uv build

Version 0.7.0 introduces device sign-in and project scope. Deploy the matching backend and publish this version before distributing the frontend setup command. For local verification before publication, use uv run unlegacy setup from this checkout with --project /path/to/project and the local --endpoint.

The build creates dist/unlegacy_cli-<version>.tar.gz and dist/unlegacy_cli-<version>-py3-none-any.whl. Publish those artifacts to the Python package index used by Unlegacy clients.

Setup

unlegacy setup

The interactive client picker supports Windows, macOS and Linux. Version 0.7.1 fixes the Windows termios import error; Windows users can use the same setup command without extra flags. To refresh a cached one-shot installation:

uv tool run --refresh --from 'unlegacy-cli>=0.7.1' unlegacy setup

Keep any existing --endpoint option when upgrading a customer installation.

Run setup from your project folder. The wizard chooses only this project by default, or all projects for this user, then lets you select clients. The choice applies to both MCP configuration and the bundled skills.

On first setup, the CLI displays an eight-character code and opens the browser at /mcp?step=code. Sign in, choose the organization and approve your code. The terminal then installs the selected clients and runs doctor. Nothing is approved merely by opening the page. Use --no-browser on a headless terminal.

The credential is saved privately in ~/.config/unlegacy/credentials.json, separately for each endpoint. Running setup in another project reuses that connection after validating it; no new browser approval is needed. An expired or revoked credential requires approval again. Use --reconnect to change the connected organization. A network failure does not create another connection. The production endpoint defaults to https://app.unlegacy.ai/ai/mcp.

# Configure the current project, or another folder, without repeating sign-in.
unlegacy setup --scope project --client claude-code --client codex
unlegacy setup --project /path/to/another-repository --client codex

# Explicitly make MCP and skills available in every project.
unlegacy setup --scope global --client claude-code --client codex

# Preview paths without authentication, network requests or writes.
unlegacy setup --project /path/to/repository --client all --dry-run

# Use this checkout's development server.
unlegacy setup --endpoint http://localhost:25250/ai/mcp

For automation, an existing credential can still be supplied with UNLEGACY_MCP_TOKEN (or --token). The CLI never prints the token. HTTPS is required except on loopback development hosts, and credential requests do not follow redirects.

Moving an existing global installation

Project setup detects global Unlegacy configuration and skills. The wizard asks to migrate them; unattended setup requires --remove-global. Global entries are removed only after project setup and doctor succeed. Other MCP servers and unrelated skills are preserved; backups go under ~/.config/unlegacy/backups. Shared compatibility skill directories are included, so moving one may also remove the global Unlegacy skill from another client that reads the same folder. The wizard explains this before proceeding. Restart affected clients afterward.

unlegacy setup --scope project --client codex --remove-global

Native installation locations

PROJECT means the enclosing Git repository root, or the specified/current folder outside Git. HOME means your user profile. Client trust prompts still apply; Codex loads project configuration only for trusted projects.

Client Project MCP Global MCP Project skills Global skills
Claude Code Private project entry in HOME/.claude.json HOME/.claude.json .claude/skills HOME/.claude/skills
Codex .codex/config.toml HOME/.codex/config.toml .agents/skills HOME/.agents/skills
Cursor .cursor/mcp.json HOME/.cursor/mcp.json .cursor/skills HOME/.cursor/skills
VS Code Copilot .vscode/mcp.json Default user profile mcp.json .github/skills HOME/.copilot/skills
OpenCode opencode.json HOME/.config/opencode/opencode.json .opencode/skills HOME/.config/opencode/skills

The VS Code default user profile is Library/Application Support/Code/User on macOS, %APPDATA%/Code/User on Windows and .config/Code/User on Linux. Custom profiles, portable installs and custom client directory overrides are not detected by this release. Scope controls where clients load Unlegacy; it does not narrow the credential's organization/repository permissions.

Credential-bearing config files and backups use owner-only permissions on POSIX. Project configs are added to Git's local info/exclude; setup refuses tracked config files instead of inserting credentials into version control. Untrack a personal config before setup, or keep a shared config and configure credentials manually. Symlinked project targets outside the project are refused. Packaged skills contain no credentials and may be versioned if desired.

Native behavior references: Claude scopes, Codex configuration, Codex skills, Cursor skills, VS Code skills, and OpenCode MCP.

Supported client values:

  • claude-code
  • codex
  • cursor
  • vscode-copilot
  • opencode
  • all

Commands

unlegacy setup
unlegacy doctor
unlegacy install-skills --client codex
unlegacy status

Bundled skill

unlegacy setup and unlegacy install-skills install one versioned skill bundle:

  • unlegacy - authorized repository Knowledge and content retrieval

The bundle is self-contained; installing the external Superpowers plugin is not required.

The skill is used only when you explicitly ask to consult Unlegacy: for example, "ask Unlegacy about authentication", "pergunte ao legacy", "faça um legacy", or $unlegacy. General code questions, mentions of legacy code, and work on the Unlegacy project itself do not activate it. The request covers the current task and its follow-ups, not unrelated later tasks. Codex also receives agents/openai.yaml with implicit invocation disabled; use $unlegacy to explicitly load the skill there. Natural-language selection depends on the client's skill discovery behavior.

Canonical MCP contract

The bundled skill targets Backend-authorized Catalog, Knowledge and content reads. list_repos, find_repos and repo_brief resolve repository names and availability. search and org_survey discover evidence in one repository, a project or the organization. Survey coverage is the top 20 rank-fused hits, not an exhaustive inventory or confidence estimate.

get_symbol returns literal symbols and canonical entity refs. Pass those complete refs to symbol_context and impact. File and docs tools use canonical version IDs, paths, revisions and page cursors. No client constructs object-store keys or sends physical graph identifiers.

Arbitrary cypher currently returns CYPHER_NOT_SUPPORTED; it does not call KG. Vault-specific tools are not registered by this MCP server. unlegacy doctor checks the repository tool inventory, not permissions or the full runtime pipeline. Install this skill version with the matching server.

Development

uv run pytest

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unlegacy_cli-0.7.1.tar.gz (46.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

unlegacy_cli-0.7.1-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

File details

Details for the file unlegacy_cli-0.7.1.tar.gz.

File metadata

  • Download URL: unlegacy_cli-0.7.1.tar.gz
  • Upload date:
  • Size: 46.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for unlegacy_cli-0.7.1.tar.gz
Algorithm Hash digest
SHA256 f568115789afba95499514f65e2683aaba5b650e75cd5dc1ccbf5bb2fe22bd4d
MD5 0cf5c2beb48faac15cd8f3629217632c
BLAKE2b-256 1f6f350300e9005637a47058801f36314590fd298d1e4d1b534ae287b14dc636

See more details on using hashes here.

File details

Details for the file unlegacy_cli-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: unlegacy_cli-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 36.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.8 {"installer":{"name":"uv","version":"0.12.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for unlegacy_cli-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 262aa9222a180a434f9596092c3c46277a11728b379cabe89a5b996a48fc73da
MD5 c838f914c7ea7eacb112f8ce7f1c9ee0
BLAKE2b-256 ec20b620f7afa8d4197f19f9c6743a2aa90f3c9fe619dc1988ddecdfd8004dce

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

This release

0.7.1 This release

2 files

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page