# Artistic Style

> Source code indenter for C++/C/Java/C# source code

**Wikidata**: [Q112678](https://www.wikidata.org/wiki/Q112678)  
**Source**: https://4ort.xyz/entity/artistic-style

## Summary
Artistic Style (AStyle) is a free, open-source tool for automatically indenting and formatting C, C++, Java, and C# source code to improve readability. It is released under the GNU Lesser General Public License (LGPL) and supports Unix-like operating systems. The tool provides configurable formatting options to align with various coding standards.

## Key Facts
- **License**: GNU Lesser General Public License (LGPL), version 3.0 or later.
- **Latest Version**: 3.6.7 (released February 26, 2025), designated as the stable version.
- **Supported Languages**: C, C++, Java, C#, Objective-C, and JavaScript.
- **Operating Systems**: Runs on Unix-like systems, including Linux and macOS.
- **Repository**: Hosted on GitLab and SourceForge; uses Apache Subversion and Git.
- **Packages**: Available in Arch Linux, Debian, FreeBSD, Gentoo, OpenSUSE, and Homebrew.
- **Website**: http://astyle.sourceforge.net/.

## FAQs
### Q: What programming languages does Artistic Style support?
A: Artistic Style formats code for C, C++, Java, C#, Objective-C, and JavaScript, helping maintain consistent indentation and style across projects.

### Q: Is Artistic Style free to use?
A: Yes, it is free software distributed under the LGPL, allowing users to run, modify, and distribute the tool and its source code.

### Q: How do I install Artistic Style?
A: It is available via package managers like Homebrew (macOS), Arch Linux (astyle), and Debian (astyle), or by compiling from source via GitLab or SourceForge repositories.

## Why It Matters
Artistic Style addresses the critical need for consistent code formatting in collaborative software development. By automating indentation and style adjustments, it reduces manual effort and minimizes disputes over coding conventions. Its support for multiple languages and integration into various operating systems makes it a versatile tool for developers. As free software, it promotes accessibility and customization, ensuring that teams can adapt it to their workflows without licensing restrictions. Regular updates, such as the 2025 release of version 3.6.7, demonstrate ongoing maintenance and relevance in modern toolchains.

## Notable For
- **Multi-Language Support**: Formats code for C, C++, Java, C#, Objective-C, and JavaScript, catering to diverse development environments.
- **Long-Term Maintenance**: Actively updated since its initial release, with recent versions (e.g., 3.6.7 in 2025) ensuring compatibility with contemporary systems.
- **Cross-Platform Availability**: Packages exist for major Linux distributions, macOS (via Homebrew), and BSD variants, simplifying adoption.
- **Configurable Options**: Allows customization of indentation rules, bracket placement, and spacing to match project-specific standards.
- **Open-Source Transparency**: Hosted on GitLab and SourceForge, enabling community contributions and audits.

## Body
### Overview
Artistic Style is a command-line tool designed to automatically indent and reformat source code for C, C++, Java, and C#. It focuses on improving code readability by standardizing spacing, bracket placement, and line breaks according to configurable rules.

### Licensing
- Released under the **GNU Lesser General Public License (LGPL), version 3.0 or later**, ensuring freedom to use, modify, and distribute the software.
- Listed in the Free Software Directory under the entry "Artistic_Style".

### Supported Languages
- Formats code for **C, C++, Java, C#, Objective-C, and JavaScript** files.
- Recognizes language-specific syntax to apply appropriate styling rules.

### Availability
- **Operating Systems**: Primarily supports Unix-like systems, including Linux and macOS.
- **Package Managers**:
  - Arch Linux: `astyle`
  - Debian/Ubuntu: `astyle`
  - FreeBSD: `devel/astyle`
  - Gentoo: `dev-util/astyle`
  - Homebrew (macOS): `astyle`
  - OpenSUSE: `astyle`

### Technical Details
- **Version History**:
  - 2.05.1 (released December 11, 2014).
  - 3.1 (released January 2018).
  - 3.6.7 (released February 26, 2025, as the current stable version).
- **Repositories**:
  - Source code hosted on **GitLab** (https://gitlab.com/saalen/astyle) and **SourceForge** (https://svn.code.sf.net/p/astyle/code/trunk/AStyle).
- **Configuration**: Allows customization via command-line options or configuration files to define indentation width, bracket alignment, and other formatting preferences.

### History
- Initially released as a tool for C/C++ formatting, later expanded to support Java, C#, and JavaScript.
- Maintained by a community of developers, with updates tracked through GitLab and SourceForge.
- Documented on its official website (http://astyle.sourceforge.net/) with guides for usage and integration into development workflows.

## References

1. [Source](https://directory.fsf.org/wiki/Artistic_Style#tab=Details)
2. [Source](http://astyle.sourceforge.net/notes.html)
3. [3.6.7 Tags. 2025](https://gitlab.com/saalen/astyle/-/tags/3.6.7)
4. [Source](https://astyle.sourceforge.net/)