Skip to content

Repository files navigation

AstroCode πŸ“Έ

AstroCode Logo

AstroCode

Turn your code into beautiful images.

A simple and powerful Visual Studio Code extension for creating clean, customizable code screenshots β€” directly from your editor.

Visual Studio Marketplace Installs License

Install AstroCode Β Β·Β  View on GitHub


✨ What is AstroCode?

AstroCode is a Visual Studio Code extension that lets you transform selected code into clean, polished and customizable images.

Instead of taking a screenshot of your entire editor, cropping it manually and trying to make it look good, AstroCode gives you a dedicated interface for creating code captures.

Select your code. Customize the design. Export the result.

Everything happens directly inside Visual Studio Code.

Perfect for

  • 🐦 Social media and developer communities
  • πŸ“š Documentation
  • πŸ“ GitHub README files
  • πŸŽ“ Tutorials and educational content
  • πŸ’Ό Portfolios and presentations
  • πŸ–₯️ Technical articles
  • πŸ“Έ Sharing code with other developers

πŸš€ Why AstroCode?

Your code deserves more than a basic screenshot.

AstroCode is built around a simple idea:

Make sharing code as easy as writing it.

There is no need to copy your code into an external website, open an image editor, crop screenshots manually or spend time fixing the appearance.

AstroCode gives you the tools to create a professional-looking code image without leaving your editor.


✨ Features

🎨 Beautiful Syntax Highlighting

AstroCode uses Shiki for accurate and high-quality syntax highlighting.

Your code maintains a familiar developer-friendly appearance while looking polished in the final image.


🌈 Modern Themes

Choose from a selection of popular themes designed to make your code look great.

Currently available themes include:

  • Dracula
  • GitHub Dark
  • Nord
  • Tokyo Night
  • Catppuccin Mocha
  • RosΓ© Pine
  • Vitesse Light

πŸ–ΌοΈ Full Visual Customization

Make your capture fit your style.

Customize:

  • Corner radius
  • Padding
  • Font size
  • Shadows
  • Window title
  • Syntax theme

You can adjust the appearance before exporting and see how your capture looks.


⚑ Quick Presets

Create the right image for the right platform without configuring everything from scratch.

X / Twitter

Designed for sharing code on social media.

GitHub README

Perfect for adding polished code images to your projects and documentation.

High Resolution

Create high-quality captures suitable for presentations, articles and other professional content.


πŸ“Έ High-Quality PNG Export

Export your captures as high-resolution PNG images.

Your code stays sharp, readable and ready to share.


🧩 Built Into Visual Studio Code

AstroCode is designed to work as part of your existing development workflow.

You don't need to:

  • Open another application
  • Upload your code to a website
  • Copy and paste your code elsewhere
  • Manually crop screenshots
  • Use an external image editor

Your code stays in Visual Studio Code from start to finish.


πŸ› οΈ How to Use

Creating a capture with AstroCode only takes a few seconds.

1. Select the code you want to capture

This step is important.

First, select/highlight the exact piece of code you want AstroCode to capture inside the Visual Studio Code editor.

For example, you can select:

function helloWorld() {
    console.log("Hello, world!");
}

AstroCode will use the code you have selected as the content of your image.

You must select your code before running the AstroCode command.


2. Open the Command Palette

Once your code is selected, open the Visual Studio Code Command Palette.

On Windows/Linux:

Ctrl + Shift + P

On macOS:

Cmd + Shift + P

3. Run AstroCode

With your code still selected, search for:

AstroCode: Capture Selection

Then press Enter.

AstroCode will open its capture interface using the code you selected in step 1.


4. Customize your capture

Now you can customize how your code image looks.

Choose your preferred theme and adjust options such as:

  • Font size
  • Padding
  • Corner radius
  • Shadows
  • Window title

Experiment with the settings until your capture looks the way you want.


5. Export your image

When you're happy with the result, export your capture as a high-quality PNG.

That's it.

Your code is ready to share.


πŸ’» Supported Languages

AstroCode supports 40+ programming and markup languages.

Language Language Language Language
JavaScript TypeScript Python Rust
Go PHP Ruby Swift
Kotlin Dart C# Java
SQL YAML CSS HTML
Markdown JSX TSX JSON
Bash C C++ And more

Syntax highlighting is powered by Shiki, providing accurate highlighting across a wide range of supported languages.


πŸ“¦ Installation

Visual Studio Code Marketplace

The easiest way to install AstroCode is directly from the Visual Studio Marketplace.

Install AstroCode

Or install it directly from Visual Studio Code:

  1. Open Visual Studio Code.
  2. Open the Extensions panel.
  3. Search for AstroCode.
  4. Select AstroCode.
  5. Click Install.

Once installed, AstroCode is ready to use.

Direct Marketplace Link

Install AstroCode from the Visual Studio Marketplace


βš™οΈ Requirements

AstroCode is designed to run directly inside Visual Studio Code.

Make sure you have a supported version of Visual Studio Code installed before installing the extension.


πŸ”— Links

Resource Link
🧩 Visual Studio Marketplace Install AstroCode
πŸ’» GitHub Repository GKPROEJECT/astrocode
πŸ› Issues & Feedback Report an issue

🀝 Contributing

AstroCode is open source and contributions are welcome.

If you find a bug, have an idea or want to improve the project, feel free to open an issue or submit a pull request.

Before submitting a contribution, please make sure your changes are tested and clearly documented.


⭐ Support the Project

If AstroCode helps you create better code content, consider giving the project a ⭐ on GitHub.

It helps more developers discover AstroCode and supports the continued development of the project.


πŸ“„ License

AstroCode is released under the MIT License.

See LICENSE for the complete license.


Beautiful code. Simple workflow. One extension.

Made with ❀️ for developers.

Install AstroCode Β· GitHub

About

πŸ“Έ Create beautiful, polished screenshots of your code directly from Visual Studio Code. Customize the appearance and share your code in style.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages