# ALTO Code Slicer > Extract source-code slices by line, text, or language structure while preserving original line numbers. Explore [ALTO Code Slicer](https://altophp.com/code-slicer/) on the ALTO PHP website for guides and examples. Extract source by line range, text, or language structure, preserving exact byte ranges and original line numbers. Language-aware selectors locate PHP classes and methods, JavaScript functions, CSS rules, and Twig blocks for documentation excerpts that stay tied to real source files. Install with `composer require alto/code-slicer`. [Packagist package](https://packagist.org/packages/alto/code-slicer) and [source repository](https://github.com/altophp/code-slicer). License: MIT. Composer runtime requirements: `php ^8.4`, `ext-tokenizer *`, `alto/language ^1.0`. PSR-4 autoloading: `Alto\Code\Slicer\` maps to `src/`. ALTO PHP is a family of open-source PHP libraries for building content tools, documentation systems, developer interfaces, and asset pipelines. Its packages cover document processing, source code, images, fonts, and web standards. Install the components your application needs; each has its own Composer package and repository, and complementary packages can be composed into a larger workflow. The family is created and maintained by [Simon André](https://smnandre.dev/) ([smnandre on GitHub](https://github.com/smnandre)), a PHP and Symfony developer, Symfony UX core team member, and creator of ALTO, Atelier SVG, PHPColor, and Playwright PHP. The [ALTO PHP GitHub organization](https://github.com/altophp) hosts the source repositories, issue trackers, and contributions. Development can be supported through [GitHub Sponsors](https://github.com/sponsors/smnandre). The shared foundation is MIT licensing, Composer installation, PSR-4 autoloading under `Alto\`, typed PHP APIs, and repository checks using PHPUnit, PHPStan, and PHP CS Fixer. The focus is on explicit behavior, standards-based formats, and small components with documented contracts. Core libraries work independently of a web framework; integration packages connect them to tools such as Twig. Runtime dependencies and PHP extensions vary by package. Markdown, RST, Image, and Code Highlight have no third-party Composer runtime dependencies; Image rendering still requires GD or Imagick. Names follow three related conventions: `alto/` on [Packagist](https://packagist.org/packages/alto/), `altophp/` on GitHub, and a package-specific PSR-4 prefix in PHP. For example, `alto/markdown` maps to `altophp/markdown` and `Alto\Markdown\`; `alto/code-highlight` maps to `altophp/code-highlight` and `Alto\Code\Highlight\`. Use each package's published Composer metadata for its exact requirements and available releases. Documentation describes the source used to build this site; check the installed version when adopting an API. ## Documentation - [Overview](https://altophp.com/code-slicer/): [Markdown](https://altophp.com/code-slicer/index.md). - [Installation](https://altophp.com/code-slicer/installation/): [Markdown](https://altophp.com/code-slicer/installation.md). - [Getting started](https://altophp.com/code-slicer/getting-started/): [Markdown](https://altophp.com/code-slicer/getting-started.md). - [Selectors](https://altophp.com/code-slicer/selectors/): [Markdown](https://altophp.com/code-slicer/selectors.md). - [Languages](https://altophp.com/code-slicer/languages/): [Markdown](https://altophp.com/code-slicer/languages.md). ## Additional reference - [CSS selectors](https://altophp.com/code-slicer/languages/css/): [Markdown](https://altophp.com/code-slicer/languages/css.md). - [JavaScript](https://altophp.com/code-slicer/languages/js/): [Markdown](https://altophp.com/code-slicer/languages/js.md). - [PHP selectors](https://altophp.com/code-slicer/languages/php/): [Markdown](https://altophp.com/code-slicer/languages/php.md). - [Text](https://altophp.com/code-slicer/languages/text/): [Markdown](https://altophp.com/code-slicer/languages/text.md). - [TypeScript](https://altophp.com/code-slicer/languages/ts/): [Markdown](https://altophp.com/code-slicer/languages/ts.md). - [Twig selectors](https://altophp.com/code-slicer/languages/twig/): [Markdown](https://altophp.com/code-slicer/languages/twig.md). ## Optional - [Complete documentation](https://altophp.com/code-slicer/llms-full.txt): All published documentation pages in one file. - [Source repository](https://github.com/altophp/code-slicer)