{"id":13396168,"url":"https://github.com/maaslalani/slides","last_synced_at":"2025-04-29T21:25:01.680Z","repository":{"id":37878274,"uuid":"364729022","full_name":"maaslalani/slides","owner":"maaslalani","description":"Terminal based presentation tool","archived":false,"fork":false,"pushed_at":"2024-08-21T14:16:54.000Z","size":4426,"stargazers_count":10582,"open_issues_count":69,"forks_count":286,"subscribers_count":64,"default_branch":"main","last_synced_at":"2025-04-29T17:47:38.487Z","etag":null,"topics":["markdown","presentation","slides","terminal"],"latest_commit_sha":null,"homepage":"http://maaslalani.com/slides/","language":"Go","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/maaslalani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"maaslalani"}},"created_at":"2021-05-05T23:13:42.000Z","updated_at":"2025-04-29T11:13:53.000Z","dependencies_parsed_at":"2022-07-10T01:46:48.649Z","dependency_job_id":"b9839962-de8b-4524-b868-06bce26ec7ba","html_url":"https://github.com/maaslalani/slides","commit_stats":{"total_commits":246,"total_committers":40,"mean_commits":6.15,"dds":0.6138211382113821,"last_synced_commit":"c6eea3330053045cede8d65ee1086fb5d4db6c43"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maaslalani%2Fslides","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maaslalani%2Fslides/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maaslalani%2Fslides/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maaslalani%2Fslides/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maaslalani","download_url":"https://codeload.github.com/maaslalani/slides/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251584469,"owners_count":21613038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["markdown","presentation","slides","terminal"],"created_at":"2024-07-30T18:00:41.729Z","updated_at":"2025-04-29T21:25:01.663Z","avatar_url":"https://github.com/maaslalani.png","language":"Go","funding_links":["https://github.com/sponsors/maaslalani"],"categories":["Go","Productivity","开源类库","Command Line Utilities","Office work","HarmonyOS","Applications","Tools","Project","terminal","\u003ca name=\"office\"\u003e\u003c/a\u003eOffice tools","Command Line","\u003ca name=\"Go\"\u003e\u003c/a\u003eGo","Table of Contents","Markdown \u0026 Presentations","Presentation","ASCII"],"sub_categories":["Presentations","命令行","Tools","Misc","Windows Manager","Productivity and Organization","Go","Application","CLI Tools"],"readme":"# Slides\n\nSlides in your terminal.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/slides-1.gif?raw=true\" alt=\"Slides Presentation\" /\u003e\n\u003c/p\u003e\n\n### Installation\n[![Homebrew](https://img.shields.io/badge/dynamic/json.svg?url=https://formulae.brew.sh/api/formula/slides.json\u0026query=$.versions.stable\u0026label=homebrew)](https://formulae.brew.sh/formula/slides)\n[![Snapcraft](https://snapcraft.io/slides/badge.svg)](https://snapcraft.io/slides)\n[![AUR](https://img.shields.io/aur/version/slides?label=AUR)](https://aur.archlinux.org/packages/slides)\n\n\u003cdetails markdown=\"block\"\u003e\n\u003csummary\u003eInstructions\u003c/summary\u003e\n\n#### MacOS\n```\nbrew install slides\n```\n#### Arch\n```\nyay -S slides\n```\n#### Nixpkgs (unstable)\n```\nnix-env -iA nixpkgs.slides\n```\n#### Any Linux Distro running `snapd`\n```\nsudo snap install slides\n```\n#### Go\n```\ngo install github.com/maaslalani/slides@latest\n```\nFrom source:\n```\ngit clone https://github.com/maaslalani/slides.git\ncd slides\ngo install\n```\n\nYou can also download a binary from the [releases](https://github.com/maaslalani/slides/releases) page.\n\n\u003c/details\u003e\n\n\n### Usage\nCreate a simple markdown file that contains your slides:\n\n````markdown\n# Welcome to Slides\nA terminal based presentation tool\n\n---\n\n## Everything is markdown\nIn fact, this entire presentation is a markdown file.\n\n---\n\n## Everything happens in your terminal\nCreate slides and present them without ever leaving your terminal.\n\n---\n\n## Code execution\n```go\npackage main\n\nimport \"fmt\"\n\nfunc main() {\n  fmt.Println(\"Execute code directly inside the slides\")\n}\n```\n\nYou can execute code inside your slides by pressing `\u003cC-e\u003e`,\nthe output of your command will be displayed at the end of the current slide.\n\n---\n\n## Pre-process slides\n\nYou can add a code block with three tildes (`~`) and write a command to run *before* displaying\nthe slides, the text inside the code block will be passed as `stdin` to the command\nand the code block will be replaced with the `stdout` of the command.\n\n```\n~~~graph-easy --as=boxart\n[ A ] - to -\u003e [ B ]\n~~~\n```\n\nThe above will be pre-processed to look like:\n\n┌───┐  to   ┌───┐\n│ A │ ────\u003e │ B │\n└───┘       └───┘\n\nFor security reasons, you must pass a file that has execution permissions\nfor the slides to be pre-processed. You can use `chmod` to add these permissions.\n\n```bash\nchmod +x file.md\n```\n\n````\n\nCheckout the [example slides](https://github.com/maaslalani/slides/tree/main/examples).\n\nThen, to present, run:\n```\nslides presentation.md\n```\n\nIf given a file name, `slides` will automatically look for changes in the file and update the presentation live.\n\n`slides` also accepts input through `stdin`:\n```\ncurl http://example.com/slides.md | slides\n```\n\nGo to the first slide with the following key sequence:\n* \u003ckbd\u003eg\u003c/kbd\u003e \u003ckbd\u003eg\u003c/kbd\u003e\n\nGo to the next slide with any of the following key sequences:\n* \u003ckbd\u003espace\u003c/kbd\u003e\n* \u003ckbd\u003eright\u003c/kbd\u003e\n* \u003ckbd\u003edown\u003c/kbd\u003e\n* \u003ckbd\u003eenter\u003c/kbd\u003e\n* \u003ckbd\u003en\u003c/kbd\u003e\n* \u003ckbd\u003ej\u003c/kbd\u003e\n* \u003ckbd\u003el\u003c/kbd\u003e\n* \u003ckbd\u003ePage Down\u003c/kbd\u003e\n* number + any of the above (go forward n slides)\n\nGo to the previous slide with any of the following key sequences:\n* \u003ckbd\u003eleft\u003c/kbd\u003e\n* \u003ckbd\u003eup\u003c/kbd\u003e\n* \u003ckbd\u003ep\u003c/kbd\u003e\n* \u003ckbd\u003eh\u003c/kbd\u003e\n* \u003ckbd\u003ek\u003c/kbd\u003e\n* \u003ckbd\u003eN\u003c/kbd\u003e\n* \u003ckbd\u003ePage Up\u003c/kbd\u003e\n* number + any of the above (go back n slides)\n\nGo to a specific slide with the following key sequence:\n\n* number + \u003ckbd\u003eG\u003c/kbd\u003e\n\nGo to the last slide with the following key:\n\n* \u003ckbd\u003eG\u003c/kbd\u003e\n\n### Search\n\nTo quickly jump to the right slide, you can use the search function.\n\nPress \u003ckbd\u003e/\u003c/kbd\u003e, enter your search term and press \u003ckbd\u003eEnter\u003c/kbd\u003e  \n(*The search term is interpreted as a regular expression. The `/i` flag causes case-insensitivity.*).\n\nPress \u003ckbd\u003ectrl+n\u003c/kbd\u003e after a search to go to the next search result.\n\n### Code Execution\n\nIf slides finds a code block on the current slides it can execute the code block and display the result as virtual text\non the screen.\n\nPress \u003ckbd\u003ectrl+e\u003c/kbd\u003e on a slide with a code block to execute it and display the result.\n\n### Pre-processing\n\nYou can add a code block with three tildes (`~`) and write a command to run\n*before* displaying the slides, the text inside the code block will be passed\nas `stdin` to the command and the code block will be replaced with the `stdout`\nof the command. Wrap the pre-processed block in three backticks to keep\nproper formatting and new lines.\n\n````\n```\n~~~graph-easy --as=boxart\n[ A ] - to -\u003e [ B ]\n~~~\n```\n````\n\nThe above will be pre-processed to look like:\n\n```\n┌───┐  to   ┌───┐\n│ A │ ────\u003e │ B │\n└───┘       └───┘\n```\n\nFor security reasons, you must pass a file that has execution permissions\nfor the slides to be pre-processed. You can use `chmod` to add these permissions.\n\n```bash\nchmod +x file.md\n```\n\n### Configuration\n\n`slides` allows you to customize your presentation's look and feel with metadata at the top of your `slides.md`.\n\n\u003e This section is entirely optional, `slides` will use sensible defaults if this section or any field in the section is omitted.\n\n```yaml\n---\ntheme: ./path/to/theme.json\nauthor: Gopher\ndate: MMMM dd, YYYY\npaging: Slide %d / %d\n---\n```\n\n* `theme`: Path to `json` file containing a [glamour\n  theme](https://github.com/charmbracelet/glamour/tree/master/styles), can also\n  be a link to a remote `json` file which slides will fetch before presenting.\n* `author`: A `string` to display on the bottom-left corner of the presentation\n  view. Defaults to the OS current user's full name. Can be empty to hide the author.\n* `date`: A `string` that is used to format today's date in the `YYYY-MM-DD` format. If the date is not a valid\n  format, the string will be displayed. Defaults to `YYYY-MM-DD`.\n* `paging`: A `string` that contains 0 or more `%d` directives. The first `%d`\n  will be replaced with the current slide number and the second `%d` will be\n  replaced with the total slides count. Defaults to `Slide %d / %d`.\n  You will need to surround the paging value with quotes if it starts with `%`.\n\n#### Date format\n\nGiven the date _January 02, 2006_:\n\n| Value  | Translates to |\n|--------|---------------|\n| `YYYY` | 2006          |\n| `YY`   | 06            |\n| `MMMM` | January       |\n| `MMM`  | Jan           |\n| `MM`   | 01            |\n| `mm`   | 1             |\n| `DD`   | 02            |\n| `dd`   | 2             |\n\n### SSH\n\nSlides is accessible over `ssh` if hosted on a machine through the `slides\nserve [file]` command.\n\nOn a machine, run:\n\n```\nslides serve [file]\n```\n\nThen, on another machine (or same machine), `ssh` into the port specified by\nthe `slides serve [file]` command:\n```\nssh 127.0.0.1 -p 53531\n```\n\nYou will be able to access the presentation hosted over SSH! You can use this\nto present with `slides` from a computer that doesn't have `slides` installed,\nbut does have `ssh`. Or, let your viewers have access to the slides on their\nown computer without needing to download `slides` and the presentation file.\n\n### Alternatives\n\n**Credits**: This project was heavily inspired by [`lookatme`](https://github.com/d0c-s4vage/lookatme).\n\n* [`lookatme`](https://github.com/d0c-s4vage/lookatme)\n* [`sli.dev`](https://sli.dev/)\n* [`sent`](https://tools.suckless.org/sent/)\n* [`presenterm`](https://github.com/mfontanini/presenterm)\n\n### Development\nSee the [development documentation](./docs/development)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaaslalani%2Fslides","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaaslalani%2Fslides","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaaslalani%2Fslides/lists"}