{"id":28335363,"url":"https://github.com/joeymckenzie/artisense","last_synced_at":"2026-03-01T22:01:58.922Z","repository":{"id":293513999,"uuid":"984272450","full_name":"JoeyMckenzie/artisense","owner":"JoeyMckenzie","description":"📕 Laravel docs from the comfort of your terminal.","archived":false,"fork":false,"pushed_at":"2025-07-25T06:36:50.000Z","size":1733,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-12T05:23:23.302Z","etag":null,"topics":["artisan","documentation","laravel","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JoeyMckenzie.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"Artisense"}},"created_at":"2025-05-15T16:58:49.000Z","updated_at":"2025-07-25T06:36:54.000Z","dependencies_parsed_at":"2025-05-30T19:59:44.604Z","dependency_job_id":"df548ce3-61e5-45a0-af3b-9fc0b9d00d3a","html_url":"https://github.com/JoeyMckenzie/artisense","commit_stats":null,"previous_names":["joeymckenzie/artisense"],"tags_count":6,"template":false,"template_full_name":"spatie/package-skeleton-laravel","purl":"pkg:github/JoeyMckenzie/artisense","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeyMckenzie%2Fartisense","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeyMckenzie%2Fartisense/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeyMckenzie%2Fartisense/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeyMckenzie%2Fartisense/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoeyMckenzie","download_url":"https://codeload.github.com/JoeyMckenzie/artisense/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoeyMckenzie%2Fartisense/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29986241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T21:06:37.093Z","status":"ssl_error","status_checked_at":"2026-03-01T21:05:45.052Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artisan","documentation","laravel","php"],"created_at":"2025-05-26T21:57:54.368Z","updated_at":"2026-03-01T22:01:58.888Z","avatar_url":"https://github.com/JoeyMckenzie.png","language":"PHP","funding_links":["https://github.com/sponsors/Artisense"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" style=\"padding-top: 2rem;\"\u003e\n    \u003cimg src=\"art/logo.png\" height=\"300\" width=\"300\" alt=\"logo\"/\u003e\n    \u003cdiv style=\"display: inline-block; margin-top: 2rem\"\u003e\n        \u003cimg src=\"https://img.shields.io/packagist/v/joeymckenzie/artisense.svg\" alt=\"packgist downloads\" /\u003e\n        \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/joeymckenzie/artisense/run-ci.yml?branch=main\u0026label=ci\" alt=\"ci\" /\u003e\n        \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/joeymckenzie/artisense/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\" alt=\"packgist downloads\" /\u003e\n        \u003cimg src=\"https://img.shields.io/packagist/dt/joeymckenzie/artisense.svg\" alt=\"packgist downloads\" /\u003e\n        \u003cimg src=\"https://codecov.io/gh/JoeyMckenzie/artisense/graph/badge.svg?token=AXMP8ZTMKD\u0026style=flat-square\" alt=\"codecov coverage report\"/\u003e \n    \u003c/div\u003e\n\u003c/div\u003e\n\n# Artisense 📕\n\nLaravel docs from the comfort of your terminal.\n\n## Table of Contents\n\n- [Motivation](#motivation)\n- [How it works](#how-it-works)\n- [Requirements](#requirements)\n- [Getting started](#getting-started)\n- [Usage](#usage)\n    - [Versions](#versions)\n    - [Formatting](#formatting)\n- [Changelog](#changelog)\n- [Credits](#credits)\n- [License](#license)\n\n## Motivation\n\nArtisense is meant to be a local-first offline copy of the Laravel documentation. Artisense is a set of artisan\ncommands that allow you to locally store and search the laravel documentation from the comfort of your terminal.\n\nIf you're anything like me and living in the terminal, those precious seconds `alt` + `tab`ing between code editor and\nbrowser to review the Laravel documentation really adds up (who has that kinda time?). Why not make docs accessible from\nthe terminal?\n\n## How it works\n\nAt its core, artisense is a SQLite database that lives within your `storage_path()` underneath an `artisense/` folder:\n\n```bash\nyour-laravel-app/\n  app/\n  config/\n  ...\n  storage/\n    artisense/\n      artisense.sqlite // Where docs are stored\n      docs-11.x/ // Documentation markdown files from 11.x\n        artisan.md\n        ...\n      docs-12.x/ // Documentation markdown files from 12.x\n        artisan.md\n        ...\n      docs-master.x/ // Documentation markdown files from master\n        artisan.md\n        ...\n      zips/ // Zip archives of the documentation\n        laravel-12.x.zip\n        laravel-11.x.zip\n        laravel-master.x.zip\n        ...\n```\n\nArtisense uses SQLite to store documentation pulled from the Laravel\ndocumentation [source](https://github.com/laravel/docs).\nThe documentation is downloaded as a zip file, extracted into a `artisense/docs-{version}.x/` folder, then processed\ninto sections to allow full-text search using SQLite's [FTS5](https://www.sqlite.org/fts5.html) extension. Since\nartisense is just a SQLite file, you may connect and query it like any other SQLite database.\n\n## Requirements\n\n- Laravel 12 or greater\n- PHP 8.4 or greater\n\n## Getting started\n\nInstall artisense with composer:\n\n```bash\ncomposer require --dev joeymckenzie/artisense\n```\n\nYou may also publish the configuration file with:\n\n```bash\nphp artisan vendor:publish --tag=\"artisense-config\"\n```\n\nThis will create the following `config/artisense.php` file:\n\n```php\nreturn [\n\n    /*\n    |--------------------------------------------------------------------------\n    | Documentation version\n    |--------------------------------------------------------------------------\n    |\n    | Specifies the version of the documentation to use, with both numbered\n    | versions and master available. By default, the most recent numbered\n    | is used if no version is specified while attempting to download.\n    |\n    */\n\n    'versions' =\u003e DocumentationVersion::VERSION_12,\n\n    /*\n    |--------------------------------------------------------------------------\n    | Output Formatter\n    |--------------------------------------------------------------------------\n    |\n    | Specifies the optional formatter that the output should use for markdown.\n    | Markdown content will be returned from artisense and can be formatted\n    | Using any formatting tools installed wherever artisense is running.\n    |\n    */\n\n    'formatter' =\u003e BasicMarkdownFormatter::class,\n\n    /*\n    |--------------------------------------------------------------------------\n    | Search Preference\n    |--------------------------------------------------------------------------\n    |\n    | Specifies the search preferences to use when querying for documentation.\n    | Ordered searches are used by default, returning results using ordered\n    | phrase matching. You may choose your preference to adjust results.\n    |\n    */\n\n    'search' =\u003e [\n        'preference' =\u003e SearchPreference::ORDERED,\n        'proximity' =\u003e 10,\n    ],\n\n    /*\n    |--------------------------------------------------------------------------\n    | Retain Artifacts\n    |--------------------------------------------------------------------------\n    |\n    | Specifies the artificat retention policy artisense should use when processing\n    | Laravel documentation. If set to true, documentation markdown files along\n    | zip archives will be retained within the storage folder during install.\n    |\n    */\n\n    'retain_artifacts' =\u003e true,\n\n];\n```\n\nArtisense has a few tuning knobs within its configuration:\n\n- **Version**: specifies the version to run queries against, as multiple versions of the documentation may all be stored\n  alongside one another\n    - Accepts either a single `DocumentationVersion` or an array of `DocumentationVersions`, e.g.\n\n```php\nreturn [\n    // Accepts a singe version\n    'versions' =\u003e DocumentationVersion::VERSION_12,\n    \n    // You may also specify multiple versions\n    'versions' =\u003e [\n        DocumentationVersion::VERSION_11,\n        DocumentationVersion::VERSION_12,\n        DocumentationVersion::MASTER,\n    ],\n];\n```\n\n- **Formatter**: specifies any custom formatting the markdown output should use when results are found\n- **Search preference**: SQLite full-text search preference, either `ordered` or `unordered`\n- **Search proximity**: relative distance between terms full-text search should consider when querying using an\n  `unordered` preference\n\n## Usage\n\nFirst, prepare artisense by running the install command:\n\n```bash\nphp artisan artisense:install\n```\n\nYou'll be prompted with a choice of versions to install:\n\n```bash\n🔧 Installing artisense...\n\n ┌ Which version of documentation would you like to install? ───┐\n │ › ◼ 12.x                                                     │\n │   ◻ 11.x                                                     │\n │   ◻ 10.x                                                     │\n │   ◻ master                                                   │\n └──────────────────────────────────────────────────────────────┘\n  You can change the default version within the artisense.php config file.\n```\n\nArtisense uses [Laravel Prompts](https://laravel.com/docs/12.x/prompts), so any supported version of the documentation\nmay be selected. Multiple versions of the documentation may be selected, where each will be processed and stored within\nthe database allowing for querying across Laravel versions.\n\nThe install command will do a few things:\n\n1. Download the Laravel markdown documentation files based on the configured version\n2. Create a local SQLite database in your project within the storage folder under `storage/artisense`\n3. Seed the database with the processed Laravel documentation\n\n## Usage\n\nArtisense uses SQLite's full-text search extension [FTS5](https://www.sqlite.org/fts5.html) to query Laravel\ndocumentation. Once you've successfully installed a version of the documentation using artisense, you may use the\n`artisense:search` artisan command to search relevant sections:\n\n```bash\nphp artisan artisense:search\n\n ┌ Enter a search term to find relevant information: ───────────┐\n │ Installing Reverb, handling Stripe webhooks, etc.            │\n └──────────────────────────────────────────────────────────────┘\n  Use at least a few characters to get relevant results.\n```\n\nIf any relevant documentation is found, matches will be displayed in the terminal:\n\n```bash\n ┌ Enter a search term to find relevant information: ───────────────┐\n │ pennant                                                          │\n ├──────────────────────────────────────────────────────────────────┤\n │   2407 - 12.x - Laravel Pennant - Configuration                ┃ │\n │   2406 - 12.x - Laravel Pennant - Installation                 │ │\n │   2433 - 12.x - Laravel Pennant - Store Configuration          │ │\n └──────────────────────────────────────────────────────────────────┘\n  Use at least a few characters to get relevant results.\n```\n\nand if you select an entry:\n\n\u003e Laravel Pennant - Defining Features Externally - 12.x\n\u003e ### Defining Features Externally\n\u003e\n\u003e If your driver is a wrapper around a third-party feature flag platform, you will likely define features on the\n\u003e platform rather than using Pennant's `Feature::define` method. If that is the case, your custom driver should also\n\u003e implement the `Laravel\\Pennant\\Contracts\\DefinesFeaturesExternally` interface:\n\u003e\n\u003e ```\n\u003e \u003c?php\n\u003e \n\u003e namespace App\\Extensions;\n\u003e \n\u003e use Laravel\\Pennant\\Contracts\\Driver;\n\u003e use Laravel\\Pennant\\Contracts\\DefinesFeaturesExternally;\n\u003e \n\u003e class FeatureFlagServiceDriver implements Driver, DefinesFeaturesExternally\n\u003e {\n\u003e     /**\n\u003e      * Get the features defined for the given scope.\n\u003e      */\n\u003e     public function definedFeaturesForScope(mixed $scope): array {}\n\u003e \n\u003e     /* ... */\n\u003e }\n\u003e ```\n\u003e\n\u003e The `definedFeaturesForScope` method should return a list of feature names defined for the provided scope.\n\u003e\n\u003e \u003ca name=\"events\"\u003e\u003c/a\u003e\n\u003e\n\u003e\n\u003e Learn more: https://laravel.com/docs/12.x/pennant#defining-features-externally\n\nBy default, artisense returns the raw markdown from the content that was used to find the relevant section. A link to\nthe section within the documentation will also included.\n\n### Versions\n\nWithin your `artisense.php` configuration file, you may specify one or more versions of Laravel documentation to use\nwhen processes, storing, and searching documentations with artisense commands:\n\n```php\nreturn [\n\n    // Other configurations...\n    \n    // Specify a version using the `DocumentationVersion` enum\n    'versions' =\u003e DocumentationVersion::MASTER\n    \n    // Specify versions using the `DocumentationVersion` enum\n    'versions' =\u003e [\n        DocumentationVersion::VERSION_12,\n        DocumentationVersion::VERSION_11,\n        DocumentationVersion::MASTER,\n    ]\n    \n]\n```\n\nWhen installing documentation, artisense will default to using the versions specified within your configuration file.\nWhen using the search commands, artisense will also use whichever versions are specified within your configuration to\nfilter on search results.\n\nFor example, if you have versions `12.x`, `11.x`, and master installed, all search results will be returned:\n\n```bash\nphp artisan artisense:search\n\n ┌ Enter a search term to find relevant information: ─────────────────┐\n │ validation                                                         │\n ├────────────────────────────────────────────────────────────────────┤\n │   7494 - 11.x - Validation - Accessing Additional Data           ┃ │\n │   11237 - master - Validation - Accessing Additional Data        │ │\n │   3718 - 12.x - Validation - Accessing Additional Data           │ │\n └────────────────────────────────────────────────────────────────────┘\n  Use at least a few characters to get relevant results.\n```\n\n### Formatting\n\nYou may customize the output of the `artisense:search` command through the use of\nan [output formatter](https://github.com/JoeyMckenzie/artisense/blob/main/src/Contracts/OutputFormatterContract.php).\nThe search command will output the raw markdown processed from the identified documentation section, though if an output\nformatter is specified within configuration, it will use that format the output.\n\nBy default, artisense includes two simple output formatter:\n\n- a [basic](https://github.com/JoeyMckenzie/artisense/blob/main/src/Formatters/BasicMarkdownFormatter.php) markdown\n  formatter\n- a [glow-based](https://github.com/JoeyMckenzie/artisense/blob/main/src/Formatters/GlowOutputFormatter.php) output\n  formatter (requires [glow](https://github.com/charmbracelet/glow) to be installed)\n\nYou may specify a custom formatter within your `artisense.php` configuration:\n\n```php\nreturn [\n\n    // Other configuration...\n\n    'formatter' =\u003e \\App\\Support\\Formatters\\CustomMarkdownFormatter::class,\n\n];\n```\n\nYou may then implement the `OutputFormatterContract` to format the markdown:\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Support\\Formatters;\n\nuse Artisense\\Contracts\\OutputFormatterContract;\n\nfinal class TestOutputFormatter implements OutputFormatterContract\n{\n    public function format(string $markdown): string\n    {\n        return \"FORMATTED: $markdown\";\n    }\n}\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Credits\n\n- [Joey McKenzie](https://github.com/joeymckenzie)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeymckenzie%2Fartisense","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeymckenzie%2Fartisense","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeymckenzie%2Fartisense/lists"}