Documentation

Astra is a cross-language code migration CLI that helps you refactor and migrate code between different programming languages with semantic understanding.

Note: Astra is currently in active development. Some features may be experimental.

What is Astra?

Astra is a powerful CLI tool designed to help developers migrate code between different programming languages while preserving semantic meaning and structure. Unlike simple syntax translators, Astra understands the intent behind your code and generates idiomatic code in the target language.

Key Features

Semantic Understanding

Astra analyzes your code at the semantic level, understanding types, scopes, and relationships to ensure accurate migrations.

Type-Safe Migrations

Preserve type safety across languages with intelligent type mapping and inference.

Idiomatic Output

Generated code follows best practices and idioms of the target language.

Installation

Install Astra using the installation script (recommended):

curl -fsSL https://astra.sh/install | sh

Or install with Cargo if you have Rust installed:

cargo install astra-cli

Verify your installation:

astra --version

Quick Start

Migrate your first file in seconds:

1. Initialize Astra in your project

astra init

2. Run a migration

astra migrate --from typescript --to rust src/

3. Review and apply changes

astra review

Common Commands

astra migrate --from <lang> --to <lang> <dir>

Migrate entire codebase between languages with semantic understanding

astra :index

Index your codebase and build semantic graph

astra :health

Check codebase health metrics (code quality, security, test coverage)

astra :bisect "bug description"

Time travel debugging - find the commit that introduced a bug

astra :security-scan

Scan for security vulnerabilities, secrets, and unsafe patterns

astra :graph

Generate dependency graph visualization

astra team sync --cloud

Sync team tasks and productivity metrics to cloud

astra --watch

Monitor file changes in real-time

astra --mcp

Start Model Context Protocol server for Cursor/Claude integration

astra --agent

Enable agentic mode - AI can autonomously read/write files

Need Help?

Explore our comprehensive documentation or join our community: